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