diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 04e5a536ca..f45d062327 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: ~3.5.2 version: 3.5.2 '@autorest/powershell': - specifier: ~4.0.708 - version: 4.0.708 + specifier: ~4.0.721 + version: 4.0.723 '@azure-tools/async-io': specifier: ~3.0.0 version: 3.0.254 @@ -66,11 +66,11 @@ dependencies: specifier: ~5.62.0 version: 5.62.0(eslint@8.12.0)(typescript@5.1.6) '@typespec/compiler': - specifier: '>=0.58.0 <1.0.0' - version: 0.58.1 + specifier: '>=0.61.0 <1.0.0' + version: 0.61.2 '@typespec/openapi': - specifier: '>=0.58.0, <1.0.0' - version: 0.58.0(@typespec/compiler@0.58.1)(@typespec/http@0.58.0) + specifier: '>=0.61.0 <1.0.0' + version: 0.61.0(@typespec/compiler@0.61.2)(@typespec/http@0.61.0) autorest: specifier: ~3.6.3 version: 3.6.3 @@ -126,8 +126,8 @@ packages: vscode-jsonrpc: 3.6.2 dev: false - /@autorest/powershell@4.0.708: - resolution: {integrity: sha512-qRVA7Dbuy9x8cxFtXSoAy0Tj8hNLrcb2wKwGR4v9NQ+u1Oaigjf46roWvypr44hkeBHVBz5UML6VNHSUiB26ag==} + /@autorest/powershell@4.0.723: + resolution: {integrity: sha512-28JXxNgQFBw2BiH4Vx97D5Wy1DDv1nrglxviQWxa9iypZvRMgNw3oIaGxCxlI1bgAmA9uT30u7l85Xaz+L7Ikg==} engines: {node: '>=10.12.0'} dependencies: '@autorest/codemodel': 4.19.3 @@ -208,36 +208,36 @@ packages: engines: {node: '>=10.12.0'} dev: false - /@azure-tools/typespec-azure-core@0.44.0(@typespec/compiler@0.58.1)(@typespec/http@0.58.0)(@typespec/rest@0.58.0): - resolution: {integrity: sha512-d11QK2v5fOZH8YUqf42FsqHEirKCHzeKFq4Uo/51BXCXmJJahsTaFMAG2M0GoJe8tmTHeMijStnVMfzcGNqCAA==} + /@azure-tools/typespec-azure-core@0.47.0(@typespec/compiler@0.61.2)(@typespec/http@0.61.0)(@typespec/rest@0.61.0): + resolution: {integrity: sha512-RcBC5+dE1BVXTrUkkKULTImGxzM/ea3P3IL2kr9pk7r1uqF7D4CGqEKHFTg5L6QUtqc1f+zgTgQTNn6t4gI92w==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.58.0 - '@typespec/http': ~0.58.0 - '@typespec/rest': ~0.58.0 + '@typespec/compiler': ~0.61.0 + '@typespec/http': ~0.61.0 + '@typespec/rest': ~0.61.0 dependencies: - '@typespec/compiler': 0.58.1 - '@typespec/http': 0.58.0(@typespec/compiler@0.58.1) - '@typespec/rest': 0.58.0(@typespec/compiler@0.58.1)(@typespec/http@0.58.0) + '@typespec/compiler': 0.61.2 + '@typespec/http': 0.61.0(@typespec/compiler@0.61.2) + '@typespec/rest': 0.61.0(@typespec/compiler@0.61.2)(@typespec/http@0.61.0) dev: false - /@azure-tools/typespec-client-generator-core@0.44.2(@azure-tools/typespec-azure-core@0.44.0)(@typespec/compiler@0.58.1)(@typespec/http@0.58.0)(@typespec/openapi@0.58.0)(@typespec/rest@0.58.0)(@typespec/versioning@0.58.0): - resolution: {integrity: sha512-eIClpMxjMYxNeyYpdnD3BfWbPiDP0e7waTvBc5V1JQmFGKvh8H9dNeO4IaBqJ/O7WSDtuxweDmSUviZdBvuYNA==} + /@azure-tools/typespec-client-generator-core@0.47.4(@azure-tools/typespec-azure-core@0.47.0)(@typespec/compiler@0.61.2)(@typespec/http@0.61.0)(@typespec/openapi@0.61.0)(@typespec/rest@0.61.0)(@typespec/versioning@0.61.0): + resolution: {integrity: sha512-oXA8rHzBsoofzSXvGLGohj6VDYegtgAfGMWo2o4ubew1bS4cvl3CYl9DJ54blqafxtJXnNh4SdjadeHTsCz2mw==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.44.0 - '@typespec/compiler': ~0.58.0 - '@typespec/http': ~0.58.0 - '@typespec/openapi': ~0.58.0 - '@typespec/rest': ~0.58.0 - '@typespec/versioning': ~0.58.0 - dependencies: - '@azure-tools/typespec-azure-core': 0.44.0(@typespec/compiler@0.58.1)(@typespec/http@0.58.0)(@typespec/rest@0.58.0) - '@typespec/compiler': 0.58.1 - '@typespec/http': 0.58.0(@typespec/compiler@0.58.1) - '@typespec/openapi': 0.58.0(@typespec/compiler@0.58.1)(@typespec/http@0.58.0) - '@typespec/rest': 0.58.0(@typespec/compiler@0.58.1)(@typespec/http@0.58.0) - '@typespec/versioning': 0.58.0(@typespec/compiler@0.58.1) + '@azure-tools/typespec-azure-core': ~0.47.0 + '@typespec/compiler': ~0.61.0 + '@typespec/http': ~0.61.0 + '@typespec/openapi': ~0.61.0 + '@typespec/rest': ~0.61.0 + '@typespec/versioning': ~0.61.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.47.0(@typespec/compiler@0.61.2)(@typespec/http@0.61.0)(@typespec/rest@0.61.0) + '@typespec/compiler': 0.61.2 + '@typespec/http': 0.61.0(@typespec/compiler@0.61.2) + '@typespec/openapi': 0.61.0(@typespec/compiler@0.61.2)(@typespec/http@0.61.0) + '@typespec/rest': 0.61.0(@typespec/compiler@0.61.2)(@typespec/http@0.61.0) + '@typespec/versioning': 0.61.0(@typespec/compiler@0.61.2) change-case: 5.4.4 pluralize: 8.0.0 dev: false @@ -259,7 +259,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.24.7 - picocolors: 1.0.1 + picocolors: 1.1.1 dev: false /@babel/helper-validator-identifier@7.24.7: @@ -274,7 +274,7 @@ packages: '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.1 + picocolors: 1.1.1 dev: false /@esbuild/aix-ppc64@0.21.5: @@ -913,65 +913,69 @@ packages: eslint-visitor-keys: 3.4.3 dev: false - /@typespec/compiler@0.58.1: - resolution: {integrity: sha512-bVxxM35r40OtuL4+/9W/g1EevlnWnW6i151nsZAFOJj1xWHoE2G9zkx5/Feic8OlzArjhGGLJOLH3Ez1Wrw35A==} + /@typespec/compiler@0.61.2: + resolution: {integrity: sha512-6QxYJd09VWssd/BvY+8eBxTVv085s1UNK63FdPrgT2lgI+j8VMMcpNR9m5l1zWlgGDM7sniA/Or8VCdVA6jerg==} engines: {node: '>=18.0.0'} hasBin: true dependencies: '@babel/code-frame': 7.24.7 - ajv: 8.16.0 + ajv: 8.17.1 change-case: 5.4.4 globby: 14.0.2 mustache: 4.2.0 - picocolors: 1.0.1 - prettier: 3.3.2 + picocolors: 1.1.1 + prettier: 3.3.3 prompts: 2.4.2 - semver: 7.6.2 + semver: 7.6.3 temporal-polyfill: 0.2.5 vscode-languageserver: 9.0.1 - vscode-languageserver-textdocument: 1.0.11 - yaml: 2.4.5 + vscode-languageserver-textdocument: 1.0.12 + yaml: 2.5.1 yargs: 17.7.2 dev: false - /@typespec/http@0.58.0(@typespec/compiler@0.58.1): - resolution: {integrity: sha512-jQpkugg9AZVrNDMkDIgZRpIoRkkU2b0LtKWqMGg33MItYj9/DYSgDtY7xb7oCBppRtFFZ/h138HyhYl3zQxZRg==} + /@typespec/http@0.61.0(@typespec/compiler@0.61.2): + resolution: {integrity: sha512-7+AYHkzkc+p652GY9BcEbXY4OZa1fTr03MVmZeafvmbQbXfyzUU9eJld13M3v6NaUWqXWZ7nBNMISyKiXp/kSw==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.58.0 + '@typespec/compiler': ~0.61.0 + '@typespec/streams': ~0.61.0 + peerDependenciesMeta: + '@typespec/streams': + optional: true dependencies: - '@typespec/compiler': 0.58.1 + '@typespec/compiler': 0.61.2 dev: false - /@typespec/openapi@0.58.0(@typespec/compiler@0.58.1)(@typespec/http@0.58.0): - resolution: {integrity: sha512-gu6nXfmpfZrfq8Etpgl1dpMfsXii7EzQyhZgsPhIy7ZwV5bDmFk1/oyhTqIpWrnr4pD3r151T2BQjzJefjf15A==} + /@typespec/openapi@0.61.0(@typespec/compiler@0.61.2)(@typespec/http@0.61.0): + resolution: {integrity: sha512-3AF319Ae4yGVOscsCLQeedXUJJcL/NdGOR2/e/nFiL/AOVdgLfIRnpR0Ad9Zj9XAESh1fq9XSu4Mi7N1k4V7rw==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.58.0 - '@typespec/http': ~0.58.0 + '@typespec/compiler': ~0.61.0 + '@typespec/http': ~0.61.0 dependencies: - '@typespec/compiler': 0.58.1 - '@typespec/http': 0.58.0(@typespec/compiler@0.58.1) + '@typespec/compiler': 0.61.2 + '@typespec/http': 0.61.0(@typespec/compiler@0.61.2) dev: false - /@typespec/rest@0.58.0(@typespec/compiler@0.58.1)(@typespec/http@0.58.0): - resolution: {integrity: sha512-QBxkED0/KQKG22pwzis0n7BY+uLMSZZPSoVe/ESBFika9n5/yyeQ0l58xbFFwwfxAxe4xwuZ5PNwTdEXZbzr5g==} + /@typespec/rest@0.61.0(@typespec/compiler@0.61.2)(@typespec/http@0.61.0): + resolution: {integrity: sha512-L9Oyor+l42p6S8GE+UvaZTi+dcu6WubGZKmaBRpX8mCZGsa69EgIK8DQoyxrfMcxAO4I5U0sfkzCKwCVFtRr9g==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.58.0 - '@typespec/http': ~0.58.0 + '@typespec/compiler': ~0.61.0 + '@typespec/http': ~0.61.0 dependencies: - '@typespec/compiler': 0.58.1 - '@typespec/http': 0.58.0(@typespec/compiler@0.58.1) + '@typespec/compiler': 0.61.2 + '@typespec/http': 0.61.0(@typespec/compiler@0.61.2) dev: false - /@typespec/versioning@0.58.0(@typespec/compiler@0.58.1): - resolution: {integrity: sha512-brnQQ3wKWh4AbgqmnVLj+8zyOaDk9VPWg4QBecdQxzz7PrSrlAzIzRfeIyr67+hwi/0SvkTAB6GNH7YYTypKGA==} + /@typespec/versioning@0.61.0(@typespec/compiler@0.61.2): + resolution: {integrity: sha512-PIIug6eg3zc7E+BBHyNHHQD+OBq3FU465nhKrLEp35iVji/sYFuPc1ywnELDuwJVRWm6nvqNL1vtnc+4lEk+oA==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.58.0 + '@typespec/compiler': ~0.61.0 dependencies: - '@typespec/compiler': 0.58.1 + '@typespec/compiler': 0.61.2 dev: false /@vitest/expect@1.2.1: @@ -1079,13 +1083,13 @@ packages: uri-js: 4.4.1 dev: false - /ajv@8.16.0: - resolution: {integrity: sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==} + /ajv@8.17.1: + resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} dependencies: fast-deep-equal: 3.1.3 + fast-uri: 3.0.3 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - uri-js: 4.4.1 dev: false /align-text@0.1.4: @@ -2095,6 +2099,10 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: false + /fast-uri@3.0.3: + resolution: {integrity: sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==} + dev: false + /fastq@1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: @@ -3133,6 +3141,10 @@ packages: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} dev: false + /picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + dev: false + /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -3171,6 +3183,12 @@ packages: hasBin: true dev: false + /prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + engines: {node: '>=14'} + hasBin: true + dev: false + /pretty-format@29.7.0: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3591,8 +3609,8 @@ packages: lru-cache: 6.0.0 dev: false - /semver@7.6.2: - resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + /semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} hasBin: true dev: false @@ -4247,8 +4265,8 @@ packages: vscode-languageserver-types: 3.17.5 dev: false - /vscode-languageserver-textdocument@1.0.11: - resolution: {integrity: sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==} + /vscode-languageserver-textdocument@1.0.12: + resolution: {integrity: sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==} dev: false /vscode-languageserver-types@3.17.5: @@ -4380,8 +4398,8 @@ packages: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: false - /yaml@2.4.5: - resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==} + /yaml@2.5.1: + resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} engines: {node: '>= 14'} hasBin: true dev: false @@ -4456,7 +4474,7 @@ packages: dev: false file:projects/powershell.tgz: - resolution: {integrity: sha512-g+2G98k1uy6WYWIz2YpqovxGt8rcL0RxWA6Zx8iROMAxurDEnhto1UzalzXAuGu7QSqy7suBvPQGATb0Y77W9A==, tarball: file:projects/powershell.tgz} + resolution: {integrity: sha512-/cTXzGUZTDhTv00X96g/ev5R8DhTdsQMIKOfHnwTU5XV+VHjonfZkNAE/F4J6Nx+PlUMQDOpu2l8WODdTfbxZQ==, tarball: file:projects/powershell.tgz} name: '@rush-temp/powershell' version: 0.0.0 dependencies: @@ -4492,21 +4510,21 @@ packages: dev: false file:projects/typespec-powershell.tgz: - resolution: {integrity: sha512-FEyIs94S0ytHp2gxuA2ZcEN7YOzvAPKpxNgNDEOEb3aK5brakvfUK/qW8UZaFgd2zA6+pPehphG/XlHsvshnDw==, tarball: file:projects/typespec-powershell.tgz} + resolution: {integrity: sha512-PSu8ZQsZBCgTeksV91vUpSH7jY9PFvUsgm/Rl7qwwvvDLUE+aa9MA1eAnNn2ZzOYaBviAl1dOs3E4U7dfpk6eA==, tarball: file:projects/typespec-powershell.tgz} name: '@rush-temp/typespec-powershell' version: 0.0.0 dependencies: '@autorest/codemodel': 4.19.3 '@autorest/extension-base': 3.5.2 - '@autorest/powershell': 4.0.708 + '@autorest/powershell': 4.0.723 '@azure-tools/async-io': 3.0.254 '@azure-tools/codegen': 2.5.294 '@azure-tools/codegen-csharp': 3.0.264 '@azure-tools/codemodel-v3': 3.1.266 '@azure-tools/linq': 3.1.263 '@azure-tools/tasks': 3.0.255 - '@azure-tools/typespec-azure-core': 0.44.0(@typespec/compiler@0.58.1)(@typespec/http@0.58.0)(@typespec/rest@0.58.0) - '@azure-tools/typespec-client-generator-core': 0.44.2(@azure-tools/typespec-azure-core@0.44.0)(@typespec/compiler@0.58.1)(@typespec/http@0.58.0)(@typespec/openapi@0.58.0)(@typespec/rest@0.58.0)(@typespec/versioning@0.58.0) + '@azure-tools/typespec-azure-core': 0.47.0(@typespec/compiler@0.61.2)(@typespec/http@0.61.0)(@typespec/rest@0.61.0) + '@azure-tools/typespec-client-generator-core': 0.47.4(@azure-tools/typespec-azure-core@0.47.0)(@typespec/compiler@0.61.2)(@typespec/http@0.61.0)(@typespec/openapi@0.61.0)(@typespec/rest@0.61.0)(@typespec/versioning@0.61.0) '@testdeck/mocha': 0.3.3 '@types/js-yaml': 3.12.1 '@types/mocha': 5.2.5 @@ -4514,11 +4532,11 @@ packages: '@types/xmlbuilder': 0.0.34 '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.12.0)(typescript@5.1.6) '@typescript-eslint/parser': 5.62.0(eslint@8.12.0)(typescript@5.1.6) - '@typespec/compiler': 0.58.1 - '@typespec/http': 0.58.0(@typespec/compiler@0.58.1) - '@typespec/openapi': 0.58.0(@typespec/compiler@0.58.1)(@typespec/http@0.58.0) - '@typespec/rest': 0.58.0(@typespec/compiler@0.58.1)(@typespec/http@0.58.0) - '@typespec/versioning': 0.58.0(@typespec/compiler@0.58.1) + '@typespec/compiler': 0.61.2 + '@typespec/http': 0.61.0(@typespec/compiler@0.61.2) + '@typespec/openapi': 0.61.0(@typespec/compiler@0.61.2)(@typespec/http@0.61.0) + '@typespec/rest': 0.61.0(@typespec/compiler@0.61.2)(@typespec/http@0.61.0) + '@typespec/versioning': 0.61.0(@typespec/compiler@0.61.2) ejs: 3.1.9 eslint: 8.12.0 js-yaml: 3.13.1 @@ -4530,6 +4548,7 @@ packages: xmlbuilder: 10.1.1 transitivePeerDependencies: - '@edge-runtime/vm' + - '@typespec/streams' - '@vitest/browser' - '@vitest/ui' - happy-dom diff --git a/packages/typespec-powershell/package.json b/packages/typespec-powershell/package.json index e89148b498..9fbd0e51a1 100644 --- a/packages/typespec-powershell/package.json +++ b/packages/typespec-powershell/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@typespec/compiler": ">=0.61.0 <1.0.0", - "@typespec/openapi": ">=0.61.0, <1.0.0", + "@typespec/openapi": ">=0.61.0 <1.0.0", "@testdeck/mocha": "0.3.3", "@types/js-yaml": "3.12.1", "@types/mocha": "5.2.5", diff --git a/packages/typespec-powershell/src/utils/modelUtils.ts b/packages/typespec-powershell/src/utils/modelUtils.ts index da28c3cf27..de7c220bf9 100644 --- a/packages/typespec-powershell/src/utils/modelUtils.ts +++ b/packages/typespec-powershell/src/utils/modelUtils.ts @@ -212,10 +212,10 @@ export function getSchemaForType( if (type.kind === "ModelProperty") { const typeSchema: Schema = getSchemaForType(dpgContext, type.type, options); if (isStringType(program, type.type) || isNumericType(program, type.type)) { - // add in validation elements for string and numeric types - // unlike m4, min/max length and pattern are not part of the schema - const propertySchema = { ...typeSchema }; - addValidation(propertySchema, type); + // applyIntrinsicDecorators for string and numeric types + // unlike m4, min/max length and pattern, secrets, etc. are not part of the schema + let propertySchema = { ...typeSchema }; + propertySchema = applyIntrinsicDecorators(program, type, propertySchema); propertySchema.language.default.name = type.name; propertySchema.language.default.description = getDoc(program, type) || ""; schemaCache.set(type, propertySchema); @@ -928,12 +928,12 @@ function getSchemaForModel( // } // Apply decorators on the property to the type's schema - const newPropSchema = applyIntrinsicDecorators(program, prop, propSchema); - if (newPropSchema === undefined) { - continue; - } + // const newPropSchema = applyIntrinsicDecorators(program, prop, propSchema); + // if (newPropSchema === undefined) { + // continue; + // } // Use the description from ModelProperty not devired from Model Type - newPropSchema.description = propertyDescription; + // newPropSchema.description = propertyDescription; // Should the property be marked as readOnly? // const vis = getVisibility(program, prop); @@ -1048,8 +1048,9 @@ function applyIntrinsicDecorators( } if (isSecret(program, type)) { - newTarget.format = "password"; - newTarget["x-ms-secret"] = true; + newTarget.type = "credential"; + newTarget["extensions"] = newTarget["extensions"] || {}; + newTarget["extensions"]["x-ms-secret"] = true; } return newTarget; @@ -1360,17 +1361,17 @@ function getSchemaForStdScalar( case "float64": return applyIntrinsicDecorators(program, type, { type: "number", - format: "float64" + precision: 64 }); case "float32": return applyIntrinsicDecorators(program, type, { type: "number", - format: "float32" + precision: 32 }); case "float": return applyIntrinsicDecorators(program, type, { type: "number", - format: "float" + precision: 32 }); case "decimal": reportDiagnostic(program, { diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.PowerShell.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.PowerShell.cs index 69e7782b5b..e28af1c1e8 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.PowerShell.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.PowerShell.cs @@ -92,7 +92,7 @@ internal AdditionalUnattendContent(global::System.Collections.IDictionary conten } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IAdditionalUnattendContentInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IAdditionalUnattendContentInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IAdditionalUnattendContentInternal)this).Content = (System.Security.SecureString) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IAdditionalUnattendContentInternal)this).Content, (object ss) => (System.Security.SecureString)ss); } AfterDeserializeDictionary(content); } @@ -125,7 +125,7 @@ internal AdditionalUnattendContent(global::System.Management.Automation.PSObject } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IAdditionalUnattendContentInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IAdditionalUnattendContentInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IAdditionalUnattendContentInternal)this).Content = (System.Security.SecureString) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IAdditionalUnattendContentInternal)this).Content, (object ss) => (System.Security.SecureString)ss); } AfterDeserializePSObject(content); } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.cs index d23b26945e..d8d3d31bf1 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.cs @@ -26,7 +26,7 @@ public partial class AdditionalUnattendContent : public string ComponentName { get => this._componentName; set => this._componentName = value; } /// Backing field for property. - private string _content; + private System.Security.SecureString _content; /// /// Specifies the XML formatted content that is added to the unattend.xml file for @@ -34,7 +34,7 @@ public partial class AdditionalUnattendContent : /// include the root element for the setting or feature that is being inserted. /// [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Owned)] - public string Content { get => this._content; set => this._content = value; } + public System.Security.SecureString Content { get => this._content; set => this._content = value; } /// Backing field for property. private string _passName; @@ -95,8 +95,8 @@ public partial interface IAdditionalUnattendContent : the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.", SerializedName = @"content", - PossibleTypes = new [] { typeof(string) })] - string Content { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString Content { get; set; } /// The pass name. Currently, the only allowable value is OobeSystem. [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Info( Required = false, @@ -142,7 +142,7 @@ internal partial interface IAdditionalUnattendContentInternal /// the specified path and component. The XML must be less than 4KB and must /// include the root element for the setting or feature that is being inserted. /// - string Content { get; set; } + System.Security.SecureString Content { get; set; } /// The pass name. Currently, the only allowable value is OobeSystem. string PassName { get; set; } /// diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.json.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.json.cs index 3d098944f5..85a52560e2 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.json.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/AdditionalUnattendContent.json.cs @@ -70,7 +70,7 @@ internal AdditionalUnattendContent(Microsoft.Azure.PowerShell.Cmdlets.ComputeFle {_passName = If( json?.PropertyT("passName"), out var __jsonPassName) ? (string)__jsonPassName : (string)_passName;} {_componentName = If( json?.PropertyT("componentName"), out var __jsonComponentName) ? (string)__jsonComponentName : (string)_componentName;} {_settingName = If( json?.PropertyT("settingName"), out var __jsonSettingName) ? (string)__jsonSettingName : (string)_settingName;} - {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)_content;} + {_content = If( json?.PropertyT("content"), out var __jsonContent) ? new System.Net.NetworkCredential("",(string)__jsonContent).SecurePassword : _content;} AfterFromJson(json); } @@ -108,7 +108,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode ToJ AddIf( null != (((object)this._passName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonString(this._passName.ToString()) : null, "passName" ,container.Add ); AddIf( null != (((object)this._componentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonString(this._componentName.ToString()) : null, "componentName" ,container.Add ); AddIf( null != (((object)this._settingName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonString(this._settingName.ToString()) : null, "settingName" ,container.Add ); - AddIf( null != (((object)this._content)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonString(this._content.ToString()) : null, "content" ,container.Add ); + AddIf( null != (((object)this._content)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._content))) : null, "content" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.PowerShell.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.PowerShell.cs index 29c822fe73..0c4696f31d 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.PowerShell.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.PowerShell.cs @@ -126,11 +126,11 @@ internal VMAttributeMinMaxDouble(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Min")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Min = (float?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Min, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Min = (double?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Min, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("Max")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Max = (float?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Max, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Max = (double?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Max, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } AfterDeserializeDictionary(content); } @@ -151,11 +151,11 @@ internal VMAttributeMinMaxDouble(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Min")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Min = (float?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Min, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Min = (double?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Min, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("Max")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Max = (float?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Max, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Max = (double?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)this).Max, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } AfterDeserializePSObject(content); } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.cs index ae4a99e103..8a0fe620fd 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.cs @@ -12,18 +12,18 @@ public partial class VMAttributeMinMaxDouble : { /// Backing field for property. - private float? _max; + private double? _max; /// Maximum value. Double.MaxValue(1.7976931348623157E+308) [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Owned)] - public float? Max { get => this._max; set => this._max = value; } + public double? Max { get => this._max; set => this._max = value; } /// Backing field for property. - private float? _min; + private double? _min; /// Minimum value. default 0. Double.MinValue() [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Owned)] - public float? Min { get => this._min; set => this._min = value; } + public double? Min { get => this._min; set => this._min = value; } /// Creates an new instance. public VMAttributeMinMaxDouble() @@ -44,8 +44,8 @@ public partial interface IVMAttributeMinMaxDouble : Update = true, Description = @"Maximum value. Double.MaxValue(1.7976931348623157E+308)", SerializedName = @"max", - PossibleTypes = new [] { typeof(float) })] - float? Max { get; set; } + PossibleTypes = new [] { typeof(double) })] + double? Max { get; set; } /// Minimum value. default 0. Double.MinValue() [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Info( Required = false, @@ -55,8 +55,8 @@ public partial interface IVMAttributeMinMaxDouble : Update = true, Description = @"Minimum value. default 0. Double.MinValue()", SerializedName = @"min", - PossibleTypes = new [] { typeof(float) })] - float? Min { get; set; } + PossibleTypes = new [] { typeof(double) })] + double? Min { get; set; } } /// VMAttributes using double values. @@ -64,9 +64,9 @@ internal partial interface IVMAttributeMinMaxDoubleInternal { /// Maximum value. Double.MaxValue(1.7976931348623157E+308) - float? Max { get; set; } + double? Max { get; set; } /// Minimum value. default 0. Double.MinValue() - float? Min { get; set; } + double? Min { get; set; } } } \ No newline at end of file diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.json.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.json.cs index 80a70ab9bb..370f4f58eb 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.json.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributeMinMaxDouble.json.cs @@ -82,8 +82,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode ToJ { return container; } - AddIf( null != this._min ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNumber((float)this._min) : null, "min" ,container.Add ); - AddIf( null != this._max ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNumber((float)this._max) : null, "max" ,container.Add ); + AddIf( null != this._min ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNumber((double)this._min) : null, "min" ,container.Add ); + AddIf( null != this._max ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNumber((double)this._max) : null, "max" ,container.Add ); AfterToJson(ref container); return container; } @@ -100,8 +100,8 @@ internal VMAttributeMinMaxDouble(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet { return; } - {_min = If( json?.PropertyT("min"), out var __jsonMin) ? (float?)__jsonMin : _min;} - {_max = If( json?.PropertyT("max"), out var __jsonMax) ? (float?)__jsonMax : _max;} + {_min = If( json?.PropertyT("min"), out var __jsonMin) ? (double?)__jsonMin : _min;} + {_max = If( json?.PropertyT("max"), out var __jsonMax) ? (double?)__jsonMax : _max;} AfterFromJson(json); } } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributes.PowerShell.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributes.PowerShell.cs index 385393a96b..23c9a21a7a 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributes.PowerShell.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributes.PowerShell.cs @@ -208,19 +208,19 @@ internal VMAttributes(global::System.Collections.IDictionary content) } if (content.Contains("MemoryInGiBMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMax = (float?) content.GetValueForProperty("MemoryInGiBMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMax, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMax = (double?) content.GetValueForProperty("MemoryInGiBMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMax, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("MemoryInGiBPerVcpuMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMax = (float?) content.GetValueForProperty("MemoryInGiBPerVcpuMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMax, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMax = (double?) content.GetValueForProperty("MemoryInGiBPerVcpuMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMax, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("LocalStorageInGiBMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMax = (float?) content.GetValueForProperty("LocalStorageInGiBMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMax, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMax = (double?) content.GetValueForProperty("LocalStorageInGiBMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMax, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("NetworkBandwidthInMbpsMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMax = (float?) content.GetValueForProperty("NetworkBandwidthInMbpsMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMax, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMax = (double?) content.GetValueForProperty("NetworkBandwidthInMbpsMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMax, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("VCpuCountMin")) { @@ -232,15 +232,15 @@ internal VMAttributes(global::System.Collections.IDictionary content) } if (content.Contains("MemoryInGiBMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMin = (float?) content.GetValueForProperty("MemoryInGiBMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMin, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMin = (double?) content.GetValueForProperty("MemoryInGiBMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMin, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("MemoryInGiBPerVcpuMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMin = (float?) content.GetValueForProperty("MemoryInGiBPerVcpuMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMin, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMin = (double?) content.GetValueForProperty("MemoryInGiBPerVcpuMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMin, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("LocalStorageInGiBMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMin = (float?) content.GetValueForProperty("LocalStorageInGiBMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMin, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMin = (double?) content.GetValueForProperty("LocalStorageInGiBMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMin, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("DataDiskCountMin")) { @@ -260,7 +260,7 @@ internal VMAttributes(global::System.Collections.IDictionary content) } if (content.Contains("NetworkBandwidthInMbpsMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMin = (float?) content.GetValueForProperty("NetworkBandwidthInMbpsMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMin, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMin = (double?) content.GetValueForProperty("NetworkBandwidthInMbpsMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMin, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("RdmaNetworkInterfaceCountMin")) { @@ -377,19 +377,19 @@ internal VMAttributes(global::System.Management.Automation.PSObject content) } if (content.Contains("MemoryInGiBMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMax = (float?) content.GetValueForProperty("MemoryInGiBMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMax, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMax = (double?) content.GetValueForProperty("MemoryInGiBMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMax, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("MemoryInGiBPerVcpuMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMax = (float?) content.GetValueForProperty("MemoryInGiBPerVcpuMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMax, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMax = (double?) content.GetValueForProperty("MemoryInGiBPerVcpuMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMax, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("LocalStorageInGiBMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMax = (float?) content.GetValueForProperty("LocalStorageInGiBMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMax, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMax = (double?) content.GetValueForProperty("LocalStorageInGiBMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMax, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("NetworkBandwidthInMbpsMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMax = (float?) content.GetValueForProperty("NetworkBandwidthInMbpsMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMax, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMax = (double?) content.GetValueForProperty("NetworkBandwidthInMbpsMax",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMax, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("VCpuCountMin")) { @@ -401,15 +401,15 @@ internal VMAttributes(global::System.Management.Automation.PSObject content) } if (content.Contains("MemoryInGiBMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMin = (float?) content.GetValueForProperty("MemoryInGiBMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMin, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMin = (double?) content.GetValueForProperty("MemoryInGiBMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBMin, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("MemoryInGiBPerVcpuMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMin = (float?) content.GetValueForProperty("MemoryInGiBPerVcpuMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMin, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMin = (double?) content.GetValueForProperty("MemoryInGiBPerVcpuMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).MemoryInGiBPerVcpuMin, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("LocalStorageInGiBMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMin = (float?) content.GetValueForProperty("LocalStorageInGiBMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMin, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMin = (double?) content.GetValueForProperty("LocalStorageInGiBMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).LocalStorageInGiBMin, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("DataDiskCountMin")) { @@ -429,7 +429,7 @@ internal VMAttributes(global::System.Management.Automation.PSObject content) } if (content.Contains("NetworkBandwidthInMbpsMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMin = (float?) content.GetValueForProperty("NetworkBandwidthInMbpsMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMin, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMin = (double?) content.GetValueForProperty("NetworkBandwidthInMbpsMin",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal)this).NetworkBandwidthInMbpsMin, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("RdmaNetworkInterfaceCountMin")) { diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributes.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributes.cs index 1595392077..834eed0b50 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributes.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VMAttributes.cs @@ -136,11 +136,11 @@ public partial class VMAttributes : /// Maximum value. Double.MaxValue(1.7976931348623157E+308) [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Inlined)] - public float? LocalStorageInGiBMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)LocalStorageInGiB).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)LocalStorageInGiB).Max = value ?? default(float); } + public double? LocalStorageInGiBMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)LocalStorageInGiB).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)LocalStorageInGiB).Max = value ?? default(double); } /// Minimum value. default 0. Double.MinValue() [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Inlined)] - public float? LocalStorageInGiBMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)LocalStorageInGiB).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)LocalStorageInGiB).Min = value ?? default(float); } + public double? LocalStorageInGiBMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)LocalStorageInGiB).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)LocalStorageInGiB).Min = value ?? default(double); } /// Backing field for property. private string _localStorageSupport; @@ -164,11 +164,11 @@ public partial class VMAttributes : /// Maximum value. Double.MaxValue(1.7976931348623157E+308) [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Inlined)] - public float? MemoryInGiBMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiB).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiB).Max = value ?? default(float); } + public double? MemoryInGiBMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiB).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiB).Max = value ?? default(double); } /// Minimum value. default 0. Double.MinValue() [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Inlined)] - public float? MemoryInGiBMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiB).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiB).Min = value ?? default(float); } + public double? MemoryInGiBMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiB).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiB).Min = value ?? default(double); } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDouble _memoryInGiBPerVcpu; @@ -181,11 +181,11 @@ public partial class VMAttributes : /// Maximum value. Double.MaxValue(1.7976931348623157E+308) [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Inlined)] - public float? MemoryInGiBPerVcpuMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiBPerVcpu).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiBPerVcpu).Max = value ?? default(float); } + public double? MemoryInGiBPerVcpuMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiBPerVcpu).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiBPerVcpu).Max = value ?? default(double); } /// Minimum value. default 0. Double.MinValue() [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Inlined)] - public float? MemoryInGiBPerVcpuMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiBPerVcpu).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiBPerVcpu).Min = value ?? default(float); } + public double? MemoryInGiBPerVcpuMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiBPerVcpu).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)MemoryInGiBPerVcpu).Min = value ?? default(double); } /// Internal Acessors for AcceleratorCount Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxInteger Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributesInternal.AcceleratorCount { get => (this._acceleratorCount = this._acceleratorCount ?? new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.VMAttributeMinMaxInteger()); set { {_acceleratorCount = value;} } } @@ -226,11 +226,11 @@ public partial class VMAttributes : /// Maximum value. Double.MaxValue(1.7976931348623157E+308) [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Inlined)] - public float? NetworkBandwidthInMbpsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)NetworkBandwidthInMbps).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)NetworkBandwidthInMbps).Max = value ?? default(float); } + public double? NetworkBandwidthInMbpsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)NetworkBandwidthInMbps).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)NetworkBandwidthInMbps).Max = value ?? default(double); } /// Minimum value. default 0. Double.MinValue() [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Inlined)] - public float? NetworkBandwidthInMbpsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)NetworkBandwidthInMbps).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)NetworkBandwidthInMbps).Min = value ?? default(float); } + public double? NetworkBandwidthInMbpsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)NetworkBandwidthInMbps).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDoubleInternal)NetworkBandwidthInMbps).Min = value ?? default(double); } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxInteger _networkInterfaceCount; @@ -486,8 +486,8 @@ acceleratorSupport should be set to ""Included"" or ""Required"" to use this VMA Update = true, Description = @"Maximum value. Double.MaxValue(1.7976931348623157E+308)", SerializedName = @"max", - PossibleTypes = new [] { typeof(float) })] - float? LocalStorageInGiBMax { get; set; } + PossibleTypes = new [] { typeof(double) })] + double? LocalStorageInGiBMax { get; set; } /// Minimum value. default 0. Double.MinValue() [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Info( Required = false, @@ -497,8 +497,8 @@ acceleratorSupport should be set to ""Included"" or ""Required"" to use this VMA Update = true, Description = @"Minimum value. default 0. Double.MinValue()", SerializedName = @"min", - PossibleTypes = new [] { typeof(float) })] - float? LocalStorageInGiBMin { get; set; } + PossibleTypes = new [] { typeof(double) })] + double? LocalStorageInGiBMin { get; set; } /// /// Specifies whether the VMSize supporting local storage should be used to build Fleet or not. /// Included - Default if not specified as most Azure VMs support local storage. @@ -524,8 +524,8 @@ acceleratorSupport should be set to ""Included"" or ""Required"" to use this VMA Update = true, Description = @"Maximum value. Double.MaxValue(1.7976931348623157E+308)", SerializedName = @"max", - PossibleTypes = new [] { typeof(float) })] - float? MemoryInGiBMax { get; set; } + PossibleTypes = new [] { typeof(double) })] + double? MemoryInGiBMax { get; set; } /// Minimum value. default 0. Double.MinValue() [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Info( Required = false, @@ -535,8 +535,8 @@ acceleratorSupport should be set to ""Included"" or ""Required"" to use this VMA Update = true, Description = @"Minimum value. default 0. Double.MinValue()", SerializedName = @"min", - PossibleTypes = new [] { typeof(float) })] - float? MemoryInGiBMin { get; set; } + PossibleTypes = new [] { typeof(double) })] + double? MemoryInGiBMin { get; set; } /// Maximum value. Double.MaxValue(1.7976931348623157E+308) [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Info( Required = false, @@ -546,8 +546,8 @@ acceleratorSupport should be set to ""Included"" or ""Required"" to use this VMA Update = true, Description = @"Maximum value. Double.MaxValue(1.7976931348623157E+308)", SerializedName = @"max", - PossibleTypes = new [] { typeof(float) })] - float? MemoryInGiBPerVcpuMax { get; set; } + PossibleTypes = new [] { typeof(double) })] + double? MemoryInGiBPerVcpuMax { get; set; } /// Minimum value. default 0. Double.MinValue() [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Info( Required = false, @@ -557,8 +557,8 @@ acceleratorSupport should be set to ""Included"" or ""Required"" to use this VMA Update = true, Description = @"Minimum value. default 0. Double.MinValue()", SerializedName = @"min", - PossibleTypes = new [] { typeof(float) })] - float? MemoryInGiBPerVcpuMin { get; set; } + PossibleTypes = new [] { typeof(double) })] + double? MemoryInGiBPerVcpuMin { get; set; } /// Maximum value. Double.MaxValue(1.7976931348623157E+308) [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Info( Required = false, @@ -568,8 +568,8 @@ acceleratorSupport should be set to ""Included"" or ""Required"" to use this VMA Update = true, Description = @"Maximum value. Double.MaxValue(1.7976931348623157E+308)", SerializedName = @"max", - PossibleTypes = new [] { typeof(float) })] - float? NetworkBandwidthInMbpsMax { get; set; } + PossibleTypes = new [] { typeof(double) })] + double? NetworkBandwidthInMbpsMax { get; set; } /// Minimum value. default 0. Double.MinValue() [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Info( Required = false, @@ -579,8 +579,8 @@ acceleratorSupport should be set to ""Included"" or ""Required"" to use this VMA Update = true, Description = @"Minimum value. default 0. Double.MinValue()", SerializedName = @"min", - PossibleTypes = new [] { typeof(float) })] - float? NetworkBandwidthInMbpsMin { get; set; } + PossibleTypes = new [] { typeof(double) })] + double? NetworkBandwidthInMbpsMin { get; set; } /// Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified. [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Info( Required = false, @@ -745,9 +745,9 @@ internal partial interface IVMAttributesInternal /// Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDouble LocalStorageInGiB { get; set; } /// Maximum value. Double.MaxValue(1.7976931348623157E+308) - float? LocalStorageInGiBMax { get; set; } + double? LocalStorageInGiBMax { get; set; } /// Minimum value. default 0. Double.MinValue() - float? LocalStorageInGiBMin { get; set; } + double? LocalStorageInGiBMin { get; set; } /// /// Specifies whether the VMSize supporting local storage should be used to build Fleet or not. /// Included - Default if not specified as most Azure VMs support local storage. @@ -760,26 +760,26 @@ internal partial interface IVMAttributesInternal /// Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDouble MemoryInGiB { get; set; } /// Maximum value. Double.MaxValue(1.7976931348623157E+308) - float? MemoryInGiBMax { get; set; } + double? MemoryInGiBMax { get; set; } /// Minimum value. default 0. Double.MinValue() - float? MemoryInGiBMin { get; set; } + double? MemoryInGiBMin { get; set; } /// /// The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified. /// Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDouble MemoryInGiBPerVcpu { get; set; } /// Maximum value. Double.MaxValue(1.7976931348623157E+308) - float? MemoryInGiBPerVcpuMax { get; set; } + double? MemoryInGiBPerVcpuMax { get; set; } /// Minimum value. default 0. Double.MinValue() - float? MemoryInGiBPerVcpuMin { get; set; } + double? MemoryInGiBPerVcpuMin { get; set; } /// /// The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either Min or Max is required if /// specified. /// Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVMAttributeMinMaxDouble NetworkBandwidthInMbps { get; set; } /// Maximum value. Double.MaxValue(1.7976931348623157E+308) - float? NetworkBandwidthInMbpsMax { get; set; } + double? NetworkBandwidthInMbpsMax { get; set; } /// Minimum value. default 0. Double.MinValue() - float? NetworkBandwidthInMbpsMin { get; set; } + double? NetworkBandwidthInMbpsMin { get; set; } /// /// The range of network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified. /// diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.PowerShell.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.PowerShell.cs index 5285b87f34..121e60fd90 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.PowerShell.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.PowerShell.cs @@ -142,11 +142,11 @@ internal VirtualMachineScaleSetOSProfile(global::System.Collections.IDictionary } if (content.Contains("AdminPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).AdminPassword = (string) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).AdminPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("CustomData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).CustomData = (string) content.GetValueForProperty("CustomData",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).CustomData, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).CustomData = (System.Security.SecureString) content.GetValueForProperty("CustomData",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).CustomData, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("Secret")) { @@ -295,11 +295,11 @@ internal VirtualMachineScaleSetOSProfile(global::System.Management.Automation.PS } if (content.Contains("AdminPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).AdminPassword = (string) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).AdminPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("CustomData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).CustomData = (string) content.GetValueForProperty("CustomData",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).CustomData, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).CustomData = (System.Security.SecureString) content.GetValueForProperty("CustomData",((Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVirtualMachineScaleSetOSProfileInternal)this).CustomData, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("Secret")) { diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.cs index 8bb5c5c552..fcd2a8856d 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.cs @@ -12,7 +12,7 @@ public partial class VirtualMachineScaleSetOSProfile : { /// Backing field for property. - private string _adminPassword; + private System.Security.SecureString _adminPassword; /// /// Specifies the password of the administrator account.

**Minimum-length @@ -31,7 +31,7 @@ public partial class VirtualMachineScaleSetOSProfile : /// Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) ///
[Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Owned)] - public string AdminPassword { get => this._adminPassword; set => this._adminPassword = value; } + public System.Security.SecureString AdminPassword { get => this._adminPassword; set => this._adminPassword = value; } /// Backing field for property. private string _adminUsername; @@ -71,7 +71,7 @@ public partial class VirtualMachineScaleSetOSProfile : public string ComputerNamePrefix { get => this._computerNamePrefix; set => this._computerNamePrefix = value; } /// Backing field for property. - private string _customData; + private System.Security.SecureString _customData; /// /// Specifies a base-64 encoded string of custom data. The base-64 encoded string @@ -81,7 +81,7 @@ public partial class VirtualMachineScaleSetOSProfile : /// creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) /// [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Origin(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.PropertyOrigin.Owned)] - public string CustomData { get => this._customData; set => this._customData = value; } + public System.Security.SecureString CustomData { get => this._customData; set => this._customData = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.ILinuxConfiguration _linuxConfiguration; @@ -341,8 +341,8 @@ reset the Remote Desktop service or its login password in a Windows repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)", SerializedName = @"adminPassword", - PossibleTypes = new [] { typeof(string) })] - string AdminPassword { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdminPassword { get; set; } /// /// Specifies the name of the administrator account.

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

**Disallowed values:** @@ -421,8 +421,8 @@ is decoded to a binary array that is saved as a file on the Virtual Machine. your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)", SerializedName = @"customData", - PossibleTypes = new [] { typeof(string) })] - string CustomData { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString CustomData { get; set; } /// Specifies whether password authentication should be disabled. [Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Info( Required = false, @@ -806,7 +806,7 @@ internal partial interface IVirtualMachineScaleSetOSProfileInternal /// repair disks on Azure Linux VMs using the VMAccess /// Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) ///
- string AdminPassword { get; set; } + System.Security.SecureString AdminPassword { get; set; } /// /// Specifies the name of the administrator account.

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

**Disallowed values:** @@ -836,7 +836,7 @@ internal partial interface IVirtualMachineScaleSetOSProfileInternal /// your VM, see [Using cloud-init to customize a Linux VM during /// creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) ///
- string CustomData { get; set; } + System.Security.SecureString CustomData { get; set; } /// /// Specifies the Linux operating system settings on the virtual machine. For a /// list of supported Linux distributions, see [Linux on Azure-Endorsed diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.json.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.json.cs index 2f87afc2d0..4dbc3fc54c 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.json.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/api/Models/VirtualMachineScaleSetOSProfile.json.cs @@ -86,8 +86,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode ToJ AddIf( null != this._linuxConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) this._linuxConfiguration.ToJson(null,serializationMode) : null, "linuxConfiguration" ,container.Add ); AddIf( null != (((object)this._computerNamePrefix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonString(this._computerNamePrefix.ToString()) : null, "computerNamePrefix" ,container.Add ); AddIf( null != (((object)this._adminUsername)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonString(this._adminUsername.ToString()) : null, "adminUsername" ,container.Add ); - AddIf( null != (((object)this._adminPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonString(this._adminPassword.ToString()) : null, "adminPassword" ,container.Add ); - AddIf( null != (((object)this._customData)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonString(this._customData.ToString()) : null, "customData" ,container.Add ); + AddIf( null != (((object)this._adminPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._adminPassword))) : null, "adminPassword" ,container.Add ); + AddIf( null != (((object)this._customData)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._customData))) : null, "customData" ,container.Add ); if (null != this._secret) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.XNodeArray(); @@ -119,8 +119,8 @@ internal VirtualMachineScaleSetOSProfile(Microsoft.Azure.PowerShell.Cmdlets.Comp {_linuxConfiguration = If( json?.PropertyT("linuxConfiguration"), out var __jsonLinuxConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.LinuxConfiguration.FromJson(__jsonLinuxConfiguration) : _linuxConfiguration;} {_computerNamePrefix = If( json?.PropertyT("computerNamePrefix"), out var __jsonComputerNamePrefix) ? (string)__jsonComputerNamePrefix : (string)_computerNamePrefix;} {_adminUsername = If( json?.PropertyT("adminUsername"), out var __jsonAdminUsername) ? (string)__jsonAdminUsername : (string)_adminUsername;} - {_adminPassword = If( json?.PropertyT("adminPassword"), out var __jsonAdminPassword) ? (string)__jsonAdminPassword : (string)_adminPassword;} - {_customData = If( json?.PropertyT("customData"), out var __jsonCustomData) ? (string)__jsonCustomData : (string)_customData;} + {_adminPassword = If( json?.PropertyT("adminPassword"), out var __jsonAdminPassword) ? new System.Net.NetworkCredential("",(string)__jsonAdminPassword).SecurePassword : _adminPassword;} + {_customData = If( json?.PropertyT("customData"), out var __jsonCustomData) ? new System.Net.NetworkCredential("",(string)__jsonCustomData).SecurePassword : _customData;} {_secret = If( json?.PropertyT("secrets"), out var __jsonSecrets) ? If( __jsonSecrets as Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IVaultSecretGroup) (Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.VaultSecretGroup.FromJson(__u) )) ))() : null : _secret;} {_allowExtensionOperation = If( json?.PropertyT("allowExtensionOperations"), out var __jsonAllowExtensionOperations) ? (bool?)__jsonAllowExtensionOperations : _allowExtensionOperation;} {_requireGuestProvisionSignal = If( json?.PropertyT("requireGuestProvisionSignal"), out var __jsonRequireGuestProvisionSignal) ? (bool?)__jsonRequireGuestProvisionSignal : _requireGuestProvisionSignal;} diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.PowerShell.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.PowerShell.cs index c75d027456..72e14d0734 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.PowerShell.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.PowerShell.cs @@ -125,7 +125,7 @@ internal OperationStatusResult(global::System.Collections.IDictionary content) } if (content.Contains("PercentComplete")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IOperationStatusResultInternal)this).PercentComplete = (float?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IOperationStatusResultInternal)this).PercentComplete, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IOperationStatusResultInternal)this).PercentComplete = (double?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IOperationStatusResultInternal)this).PercentComplete, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("StartTime")) { @@ -194,7 +194,7 @@ internal OperationStatusResult(global::System.Management.Automation.PSObject con } if (content.Contains("PercentComplete")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IOperationStatusResultInternal)this).PercentComplete = (float?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IOperationStatusResultInternal)this).PercentComplete, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + ((Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IOperationStatusResultInternal)this).PercentComplete = (double?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IOperationStatusResultInternal)this).PercentComplete, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); } if (content.Contains("StartTime")) { diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.cs index 6032168f38..ec5b1627ef 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.cs @@ -81,11 +81,11 @@ public partial class OperationStatusResult : public System.Collections.Generic.List Operation { get => this._operation; set => this._operation = value; } /// Backing field for property. - private float? _percentComplete; + private double? _percentComplete; /// Percent of the operation that is complete. [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Origin(Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.PropertyOrigin.Owned)] - public float? PercentComplete { get => this._percentComplete; set => this._percentComplete = value; } + public double? PercentComplete { get => this._percentComplete; set => this._percentComplete = value; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Origin(Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.PropertyOrigin.Owned)] @@ -216,8 +216,8 @@ public partial interface IOperationStatusResult : Update = true, Description = @"Percent of the operation that is complete.", SerializedName = @"percentComplete", - PossibleTypes = new [] { typeof(float) })] - float? PercentComplete { get; set; } + PossibleTypes = new [] { typeof(double) })] + double? PercentComplete { get; set; } /// The start time of the operation. [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Info( Required = false, @@ -276,7 +276,7 @@ internal partial interface IOperationStatusResultInternal /// The operations list. System.Collections.Generic.List Operation { get; set; } /// Percent of the operation that is complete. - float? PercentComplete { get; set; } + double? PercentComplete { get; set; } /// The start time of the operation. global::System.DateTime? StartTime { get; set; } /// Operation status. diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.json.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.json.cs index 3970092c9c..d74894d454 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.json.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/api/Models/OperationStatusResult.json.cs @@ -79,7 +79,7 @@ internal OperationStatusResult(Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} - {_percentComplete = If( json?.PropertyT("percentComplete"), out var __jsonPercentComplete) ? (float?)__jsonPercentComplete : _percentComplete;} + {_percentComplete = If( json?.PropertyT("percentComplete"), out var __jsonPercentComplete) ? (double?)__jsonPercentComplete : _percentComplete;} {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : _startTime : _startTime;} {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : _endTime : _endTime;} {_operation = If( json?.PropertyT("operations"), out var __jsonOperations) ? If( __jsonOperations as Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IOperationStatusResult) (Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.OperationStatusResult.FromJson(__u) )) ))() : null : _operation;} @@ -109,7 +109,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonNode T AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); - AddIf( null != this._percentComplete ? (Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonNumber((float)this._percentComplete) : null, "percentComplete" ,container.Add ); + AddIf( null != this._percentComplete ? (Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonNumber((double)this._percentComplete) : null, "percentComplete" ,container.Add ); AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); if (null != this._operation) diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.PowerShell.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.PowerShell.cs index acd44ee62b..0c9449a938 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.PowerShell.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.PowerShell.cs @@ -80,7 +80,7 @@ internal AdministratorProperties(global::System.Collections.IDictionary content) } if (content.Contains("Password")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)this).Password, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)this).Password = (System.Security.SecureString) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)this).Password, (object ss) => (System.Security.SecureString)ss); } AfterDeserializeDictionary(content); } @@ -105,7 +105,7 @@ internal AdministratorProperties(global::System.Management.Automation.PSObject c } if (content.Contains("Password")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)this).Password, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)this).Password = (System.Security.SecureString) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)this).Password, (object ss) => (System.Security.SecureString)ss); } AfterDeserializePSObject(content); } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.cs index 33c327e6f0..0599314a38 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.cs @@ -12,11 +12,11 @@ public partial class AdministratorProperties : { /// Backing field for property. - private string _password; + private System.Security.SecureString _password; /// The administrator password. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Origin(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.PropertyOrigin.Owned)] - public string Password { get => this._password; set => this._password = value; } + public System.Security.SecureString Password { get => this._password; set => this._password = value; } /// Backing field for property. private string _userName; @@ -44,8 +44,8 @@ public partial interface IAdministratorProperties : Update = true, Description = @"The administrator password.", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - string Password { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString Password { get; set; } /// The administrator user name. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Info( Required = false, @@ -64,7 +64,7 @@ internal partial interface IAdministratorPropertiesInternal { /// The administrator password. - string Password { get; set; } + System.Security.SecureString Password { get; set; } /// The administrator user name. string UserName { get; set; } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.json.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.json.cs index e68e0a68be..647523a2a4 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.json.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/AdministratorProperties.json.cs @@ -64,7 +64,7 @@ internal AdministratorProperties(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster return; } {_userName = If( json?.PropertyT("userName"), out var __jsonUserName) ? (string)__jsonUserName : (string)_userName;} - {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? (string)__jsonPassword : (string)_password;} + {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? new System.Net.NetworkCredential("",(string)__jsonPassword).SecurePassword : _password;} AfterFromJson(json); } @@ -100,7 +100,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Json.JsonNode ToJ return container; } AddIf( null != (((object)this._userName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Json.JsonString(this._userName.ToString()) : null, "userName" ,container.Add ); - AddIf( null != (((object)this._password)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Json.JsonString(this._password.ToString()) : null, "password" ,container.Add ); + AddIf( null != (((object)this._password)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._password))) : null, "password" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoCluster.PowerShell.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoCluster.PowerShell.cs index 87dafb6243..6e059f9326 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoCluster.PowerShell.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoCluster.PowerShell.cs @@ -269,7 +269,7 @@ internal MongoCluster(global::System.Collections.IDictionary content) } if (content.Contains("AdministratorPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterInternal)this).AdministratorPassword = (string) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterInternal)this).AdministratorPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterInternal)this).AdministratorPassword = (System.Security.SecureString) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterInternal)this).AdministratorPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("HighAvailabilityTargetMode")) { @@ -470,7 +470,7 @@ internal MongoCluster(global::System.Management.Automation.PSObject content) } if (content.Contains("AdministratorPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterInternal)this).AdministratorPassword = (string) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterInternal)this).AdministratorPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterInternal)this).AdministratorPassword = (System.Security.SecureString) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterInternal)this).AdministratorPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("HighAvailabilityTargetMode")) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoCluster.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoCluster.cs index 31ab6d4b7c..2b695d7400 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoCluster.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoCluster.cs @@ -20,7 +20,7 @@ public partial class MongoCluster : /// The administrator password. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Origin(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.PropertyOrigin.Inlined)] - public string AdministratorPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)Property).AdministratorPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)Property).AdministratorPassword = value ?? null; } + public System.Security.SecureString AdministratorPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)Property).AdministratorPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)Property).AdministratorPassword = value ?? null; } /// The administrator user name. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Origin(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.PropertyOrigin.Inlined)] @@ -296,8 +296,8 @@ public partial interface IMongoCluster : Update = true, Description = @"The administrator password.", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - string AdministratorPassword { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdministratorPassword { get; set; } /// The administrator user name. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Info( Required = false, @@ -573,7 +573,7 @@ internal partial interface IMongoClusterInternal : /// The local administrator properties for the mongo cluster. Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorProperties Administrator { get; set; } /// The administrator password. - string AdministratorPassword { get; set; } + System.Security.SecureString AdministratorPassword { get; set; } /// The administrator user name. string AdministratorUserName { get; set; } /// The backup properties of the mongo cluster. diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterProperties.PowerShell.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterProperties.PowerShell.cs index 32c6df068e..5934a3d270 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterProperties.PowerShell.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterProperties.PowerShell.cs @@ -213,7 +213,7 @@ internal MongoClusterProperties(global::System.Collections.IDictionary content) } if (content.Contains("AdministratorPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)this).AdministratorPassword = (string) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)this).AdministratorPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)this).AdministratorPassword = (System.Security.SecureString) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)this).AdministratorPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("HighAvailabilityTargetMode")) { @@ -358,7 +358,7 @@ internal MongoClusterProperties(global::System.Management.Automation.PSObject co } if (content.Contains("AdministratorPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)this).AdministratorPassword = (string) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)this).AdministratorPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)this).AdministratorPassword = (System.Security.SecureString) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)this).AdministratorPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("HighAvailabilityTargetMode")) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterProperties.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterProperties.cs index 4896d094c5..c9d23c0ecc 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterProperties.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterProperties.cs @@ -20,7 +20,7 @@ public partial class MongoClusterProperties : /// The administrator password. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Origin(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.PropertyOrigin.Inlined)] - public string AdministratorPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)Administrator).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)Administrator).Password = value ?? null; } + public System.Security.SecureString AdministratorPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)Administrator).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)Administrator).Password = value ?? null; } /// The administrator user name. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Origin(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.PropertyOrigin.Inlined)] @@ -271,8 +271,8 @@ public partial interface IMongoClusterProperties : Update = true, Description = @"The administrator password.", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - string AdministratorPassword { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdministratorPassword { get; set; } /// The administrator user name. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Info( Required = false, @@ -537,7 +537,7 @@ internal partial interface IMongoClusterPropertiesInternal /// The local administrator properties for the mongo cluster. Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorProperties Administrator { get; set; } /// The administrator password. - string AdministratorPassword { get; set; } + System.Security.SecureString AdministratorPassword { get; set; } /// The administrator user name. string AdministratorUserName { get; set; } /// The backup properties of the mongo cluster. diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdate.PowerShell.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdate.PowerShell.cs index 8dcf2bd3c4..ab5d8f3f6a 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdate.PowerShell.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdate.PowerShell.cs @@ -165,7 +165,7 @@ internal MongoClusterUpdate(global::System.Collections.IDictionary content) } if (content.Contains("AdministratorPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdateInternal)this).AdministratorPassword = (string) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdateInternal)this).AdministratorPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdateInternal)this).AdministratorPassword = (System.Security.SecureString) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdateInternal)this).AdministratorPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("HighAvailabilityTargetMode")) { @@ -254,7 +254,7 @@ internal MongoClusterUpdate(global::System.Management.Automation.PSObject conten } if (content.Contains("AdministratorPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdateInternal)this).AdministratorPassword = (string) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdateInternal)this).AdministratorPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdateInternal)this).AdministratorPassword = (System.Security.SecureString) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdateInternal)this).AdministratorPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("HighAvailabilityTargetMode")) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdate.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdate.cs index 1cdacdc903..ef4b35a97f 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdate.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdate.cs @@ -13,7 +13,7 @@ public partial class MongoClusterUpdate : /// The administrator password. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Origin(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.PropertyOrigin.Inlined)] - public string AdministratorPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)Property).AdministratorPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)Property).AdministratorPassword = value ?? null; } + public System.Security.SecureString AdministratorPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)Property).AdministratorPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)Property).AdministratorPassword = value ?? null; } /// The administrator user name. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Origin(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.PropertyOrigin.Inlined)] @@ -113,8 +113,8 @@ public partial interface IMongoClusterUpdate : Update = true, Description = @"The administrator password.", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - string AdministratorPassword { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdministratorPassword { get; set; } /// The administrator user name. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Info( Required = false, @@ -242,7 +242,7 @@ internal partial interface IMongoClusterUpdateInternal /// The local administrator properties for the mongo cluster. Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorProperties Administrator { get; set; } /// The administrator password. - string AdministratorPassword { get; set; } + System.Security.SecureString AdministratorPassword { get; set; } /// The administrator user name. string AdministratorUserName { get; set; } /// The backup properties of the mongo cluster. diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdateProperties.PowerShell.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdateProperties.PowerShell.cs index 03fefb9e45..716c80c908 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdateProperties.PowerShell.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdateProperties.PowerShell.cs @@ -157,7 +157,7 @@ internal MongoClusterUpdateProperties(global::System.Collections.IDictionary con } if (content.Contains("AdministratorPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)this).AdministratorPassword = (string) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)this).AdministratorPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)this).AdministratorPassword = (System.Security.SecureString) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)this).AdministratorPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("HighAvailabilityTargetMode")) { @@ -238,7 +238,7 @@ internal MongoClusterUpdateProperties(global::System.Management.Automation.PSObj } if (content.Contains("AdministratorPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)this).AdministratorPassword = (string) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)this).AdministratorPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)this).AdministratorPassword = (System.Security.SecureString) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdatePropertiesInternal)this).AdministratorPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("HighAvailabilityTargetMode")) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdateProperties.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdateProperties.cs index bd4c7d4f31..6791c83afb 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdateProperties.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/MongoClusterUpdateProperties.cs @@ -20,7 +20,7 @@ public partial class MongoClusterUpdateProperties : /// The administrator password. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Origin(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.PropertyOrigin.Inlined)] - public string AdministratorPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)Administrator).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)Administrator).Password = value ?? null; } + public System.Security.SecureString AdministratorPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)Administrator).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorPropertiesInternal)Administrator).Password = value ?? null; } /// The administrator user name. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Origin(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.PropertyOrigin.Inlined)] @@ -147,8 +147,8 @@ public partial interface IMongoClusterUpdateProperties : Update = true, Description = @"The administrator password.", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - string AdministratorPassword { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdministratorPassword { get; set; } /// The administrator user name. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Info( Required = false, @@ -265,7 +265,7 @@ internal partial interface IMongoClusterUpdatePropertiesInternal /// The local administrator properties for the mongo cluster. Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorProperties Administrator { get; set; } /// The administrator password. - string AdministratorPassword { get; set; } + System.Security.SecureString AdministratorPassword { get; set; } /// The administrator user name. string AdministratorUserName { get; set; } /// The backup properties of the mongo cluster. diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/Replica.PowerShell.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/Replica.PowerShell.cs index 2320ab3819..8a69cfa6cb 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/Replica.PowerShell.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/Replica.PowerShell.cs @@ -257,7 +257,7 @@ internal Replica(global::System.Collections.IDictionary content) } if (content.Contains("AdministratorPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IReplicaInternal)this).AdministratorPassword = (string) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IReplicaInternal)this).AdministratorPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IReplicaInternal)this).AdministratorPassword = (System.Security.SecureString) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IReplicaInternal)this).AdministratorPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("HighAvailabilityTargetMode")) { @@ -446,7 +446,7 @@ internal Replica(global::System.Management.Automation.PSObject content) } if (content.Contains("AdministratorPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IReplicaInternal)this).AdministratorPassword = (string) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IReplicaInternal)this).AdministratorPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IReplicaInternal)this).AdministratorPassword = (System.Security.SecureString) content.GetValueForProperty("AdministratorPassword",((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IReplicaInternal)this).AdministratorPassword, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("HighAvailabilityTargetMode")) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/Replica.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/Replica.cs index 7b6ff5510a..a54d320819 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/Replica.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/api/Models/Replica.cs @@ -18,7 +18,7 @@ public partial class Replica : /// The administrator password. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Origin(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.PropertyOrigin.Inlined)] - public string AdministratorPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)Property).AdministratorPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)Property).AdministratorPassword = value ?? null; } + public System.Security.SecureString AdministratorPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)Property).AdministratorPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterPropertiesInternal)Property).AdministratorPassword = value ?? null; } /// The administrator user name. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Origin(Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.PropertyOrigin.Inlined)] @@ -267,8 +267,8 @@ public partial interface IReplica : Update = true, Description = @"The administrator password.", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - string AdministratorPassword { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdministratorPassword { get; set; } /// The administrator user name. [Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Runtime.Info( Required = false, @@ -533,7 +533,7 @@ internal partial interface IReplicaInternal : /// The local administrator properties for the mongo cluster. Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IAdministratorProperties Administrator { get; set; } /// The administrator password. - string AdministratorPassword { get; set; } + System.Security.SecureString AdministratorPassword { get; set; } /// The administrator user name. string AdministratorUserName { get; set; } /// The backup properties of the mongo cluster. diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs index 3070a1c9e7..a4b8cc4166 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs @@ -61,8 +61,8 @@ public partial class NewAzMongoCluster_CreateExpanded : global::System.Managemen ReadOnly = false, Description = @"The administrator password.", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - public string AdministratorPassword { get => _resourceBody.AdministratorPassword ?? null; set => _resourceBody.AdministratorPassword = value; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString AdministratorPassword { get => _resourceBody.AdministratorPassword ?? null; set => _resourceBody.AdministratorPassword = value; } /// The administrator user name. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator user name.")] diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs index 5dc0f47af9..05f934abea 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs @@ -61,8 +61,8 @@ public partial class NewAzMongoCluster_CreateViaIdentityExpanded : global::Syste ReadOnly = false, Description = @"The administrator password.", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - public string AdministratorPassword { get => _resourceBody.AdministratorPassword ?? null; set => _resourceBody.AdministratorPassword = value; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString AdministratorPassword { get => _resourceBody.AdministratorPassword ?? null; set => _resourceBody.AdministratorPassword = value; } /// The administrator user name. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator user name.")] diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs index 47be37af5f..d7bd8794b7 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs @@ -62,8 +62,8 @@ public partial class SetAzMongoCluster_UpdateExpanded : global::System.Managemen ReadOnly = false, Description = @"The administrator password.", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - public string AdministratorPassword { get => _resourceBody.AdministratorPassword ?? null; set => _resourceBody.AdministratorPassword = value; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString AdministratorPassword { get => _resourceBody.AdministratorPassword ?? null; set => _resourceBody.AdministratorPassword = value; } /// The administrator user name. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator user name.")] diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs index 41e7846958..f0fef2b28b 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs @@ -61,8 +61,8 @@ public partial class UpdateAzMongoCluster_UpdateExpanded : global::System.Manage ReadOnly = false, Description = @"The administrator password.", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - public string AdministratorPassword { get => _propertiesBody.AdministratorPassword ?? null; set => _propertiesBody.AdministratorPassword = value; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString AdministratorPassword { get => _propertiesBody.AdministratorPassword ?? null; set => _propertiesBody.AdministratorPassword = value; } /// The administrator user name. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator user name.")] diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs index 5a4edc56ab..727cbddc33 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs @@ -61,8 +61,8 @@ public partial class UpdateAzMongoCluster_UpdateViaIdentityExpanded : global::Sy ReadOnly = false, Description = @"The administrator password.", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - public string AdministratorPassword { get => _propertiesBody.AdministratorPassword ?? null; set => _propertiesBody.AdministratorPassword = value; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString AdministratorPassword { get => _propertiesBody.AdministratorPassword ?? null; set => _propertiesBody.AdministratorPassword = value; } /// The administrator user name. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator user name.")] diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.PowerShell.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.PowerShell.cs index 4d0704d32a..c51dc1ead8 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.PowerShell.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.PowerShell.cs @@ -80,7 +80,7 @@ internal BlobStorageClassTypeProperties(global::System.Collections.IDictionary c } if (content.Contains("AzureStorageAccountKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBlobStorageClassTypePropertiesInternal)this).AzureStorageAccountKey = (string) content.GetValueForProperty("AzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBlobStorageClassTypePropertiesInternal)this).AzureStorageAccountKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBlobStorageClassTypePropertiesInternal)this).AzureStorageAccountKey = (System.Security.SecureString) content.GetValueForProperty("AzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBlobStorageClassTypePropertiesInternal)this).AzureStorageAccountKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("Type")) { @@ -109,7 +109,7 @@ internal BlobStorageClassTypeProperties(global::System.Management.Automation.PSO } if (content.Contains("AzureStorageAccountKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBlobStorageClassTypePropertiesInternal)this).AzureStorageAccountKey = (string) content.GetValueForProperty("AzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBlobStorageClassTypePropertiesInternal)this).AzureStorageAccountKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBlobStorageClassTypePropertiesInternal)this).AzureStorageAccountKey = (System.Security.SecureString) content.GetValueForProperty("AzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBlobStorageClassTypePropertiesInternal)this).AzureStorageAccountKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("Type")) { diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.cs index 5f45424d86..b22ae59e93 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.cs @@ -18,11 +18,11 @@ public partial class BlobStorageClassTypeProperties : private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypeProperties __storageClassTypeProperties = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties(); /// Backing field for property. - private string _azureStorageAccountKey; + private System.Security.SecureString _azureStorageAccountKey; /// Azure Storage Account Key [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Owned)] - public string AzureStorageAccountKey { get => this._azureStorageAccountKey; set => this._azureStorageAccountKey = value; } + public System.Security.SecureString AzureStorageAccountKey { get => this._azureStorageAccountKey; set => this._azureStorageAccountKey = value; } /// Backing field for property. private string _azureStorageAccountName; @@ -68,8 +68,8 @@ public partial interface IBlobStorageClassTypeProperties : Update = true, Description = @"Azure Storage Account Key", SerializedName = @"azureStorageAccountKey", - PossibleTypes = new [] { typeof(string) })] - string AzureStorageAccountKey { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AzureStorageAccountKey { get; set; } /// Azure Storage Account Name [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Info( Required = true, @@ -88,7 +88,7 @@ internal partial interface IBlobStorageClassTypePropertiesInternal : Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesInternal { /// Azure Storage Account Key - string AzureStorageAccountKey { get; set; } + System.Security.SecureString AzureStorageAccountKey { get; set; } /// Azure Storage Account Name string AzureStorageAccountName { get; set; } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.json.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.json.cs index d35766af68..ac24c71f85 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.json.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/BlobStorageClassTypeProperties.json.cs @@ -65,7 +65,7 @@ internal BlobStorageClassTypeProperties(Microsoft.Azure.PowerShell.Cmdlets.Conta } __storageClassTypeProperties = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassTypeProperties(json); {_azureStorageAccountName = If( json?.PropertyT("azureStorageAccountName"), out var __jsonAzureStorageAccountName) ? (string)__jsonAzureStorageAccountName : (string)_azureStorageAccountName;} - {_azureStorageAccountKey = If( json?.PropertyT("azureStorageAccountKey"), out var __jsonAzureStorageAccountKey) ? (string)__jsonAzureStorageAccountKey : (string)_azureStorageAccountKey;} + {_azureStorageAccountKey = If( json?.PropertyT("azureStorageAccountKey"), out var __jsonAzureStorageAccountKey) ? new System.Net.NetworkCredential("",(string)__jsonAzureStorageAccountKey).SecurePassword : _azureStorageAccountKey;} AfterFromJson(json); } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.J } __storageClassTypeProperties?.ToJson(container, serializationMode); AddIf( null != (((object)this._azureStorageAccountName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._azureStorageAccountName.ToString()) : null, "azureStorageAccountName" ,container.Add ); - AddIf( null != (((object)this._azureStorageAccountKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._azureStorageAccountKey.ToString()) : null, "azureStorageAccountKey" ,container.Add ); + AddIf( null != (((object)this._azureStorageAccountKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._azureStorageAccountKey))) : null, "azureStorageAccountKey" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.PowerShell.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.PowerShell.cs index 80f9c894f6..7c1e5db836 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.PowerShell.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.PowerShell.cs @@ -123,7 +123,7 @@ internal SmbStorageClassTypeProperties(global::System.Collections.IDictionary co } if (content.Contains("Password")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ISmbStorageClassTypePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ISmbStorageClassTypePropertiesInternal)this).Password, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ISmbStorageClassTypePropertiesInternal)this).Password = (System.Security.SecureString) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ISmbStorageClassTypePropertiesInternal)this).Password, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("Domain")) { @@ -164,7 +164,7 @@ internal SmbStorageClassTypeProperties(global::System.Management.Automation.PSOb } if (content.Contains("Password")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ISmbStorageClassTypePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ISmbStorageClassTypePropertiesInternal)this).Password, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ISmbStorageClassTypePropertiesInternal)this).Password = (System.Security.SecureString) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ISmbStorageClassTypePropertiesInternal)this).Password, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("Domain")) { diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.cs index 99e74b3e28..d29a42c68b 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.cs @@ -25,11 +25,11 @@ public partial class SmbStorageClassTypeProperties : public string Domain { get => this._domain; set => this._domain = value; } /// Backing field for property. - private string _password; + private System.Security.SecureString _password; /// Server password [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Owned)] - public string Password { get => this._password; set => this._password = value; } + public System.Security.SecureString Password { get => this._password; set => this._password = value; } /// Backing field for property. private string _source; @@ -102,8 +102,8 @@ public partial interface ISmbStorageClassTypeProperties : Update = true, Description = @"Server password", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - string Password { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString Password { get; set; } /// SMB Source [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Info( Required = true, @@ -148,7 +148,7 @@ internal partial interface ISmbStorageClassTypePropertiesInternal : /// Server domain string Domain { get; set; } /// Server password - string Password { get; set; } + System.Security.SecureString Password { get; set; } /// SMB Source string Source { get; set; } /// diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.json.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.json.cs index fd50ab183f..82779094a8 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.json.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/SmbStorageClassTypeProperties.json.cs @@ -79,7 +79,7 @@ internal SmbStorageClassTypeProperties(Microsoft.Azure.PowerShell.Cmdlets.Contai {_source = If( json?.PropertyT("source"), out var __jsonSource) ? (string)__jsonSource : (string)_source;} {_subDir = If( json?.PropertyT("subDir"), out var __jsonSubDir) ? (string)__jsonSubDir : (string)_subDir;} {_username = If( json?.PropertyT("username"), out var __jsonUsername) ? (string)__jsonUsername : (string)_username;} - {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? (string)__jsonPassword : (string)_password;} + {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? new System.Net.NetworkCredential("",(string)__jsonPassword).SecurePassword : _password;} {_domain = If( json?.PropertyT("domain"), out var __jsonDomain) ? (string)__jsonDomain : (string)_domain;} AfterFromJson(json); } @@ -107,7 +107,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.J AddIf( null != (((object)this._source)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._source.ToString()) : null, "source" ,container.Add ); AddIf( null != (((object)this._subDir)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._subDir.ToString()) : null, "subDir" ,container.Add ); AddIf( null != (((object)this._username)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._username.ToString()) : null, "username" ,container.Add ); - AddIf( null != (((object)this._password)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._password.ToString()) : null, "password" ,container.Add ); + AddIf( null != (((object)this._password)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._password))) : null, "password" ,container.Add ); AddIf( null != (((object)this._domain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._domain.ToString()) : null, "domain" ,container.Add ); AfterToJson(ref container); return container; diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassPropertiesUpdate.PowerShell.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassPropertiesUpdate.PowerShell.cs index a72c889ac3..86305fae32 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassPropertiesUpdate.PowerShell.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassPropertiesUpdate.PowerShell.cs @@ -159,7 +159,7 @@ internal StorageClassPropertiesUpdate(global::System.Collections.IDictionary con } if (content.Contains("TypePropertyAzureStorageAccountKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyAzureStorageAccountKey = (string) content.GetValueForProperty("TypePropertyAzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyAzureStorageAccountKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyAzureStorageAccountKey = (System.Security.SecureString) content.GetValueForProperty("TypePropertyAzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyAzureStorageAccountKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("TypePropertyServer")) { @@ -191,7 +191,7 @@ internal StorageClassPropertiesUpdate(global::System.Collections.IDictionary con } if (content.Contains("TypePropertyPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyPassword = (string) content.GetValueForProperty("TypePropertyPassword",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyPassword = (System.Security.SecureString) content.GetValueForProperty("TypePropertyPassword",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyPassword, (object ss) => (System.Security.SecureString)ss); } AfterDeserializeDictionary(content); } @@ -260,7 +260,7 @@ internal StorageClassPropertiesUpdate(global::System.Management.Automation.PSObj } if (content.Contains("TypePropertyAzureStorageAccountKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyAzureStorageAccountKey = (string) content.GetValueForProperty("TypePropertyAzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyAzureStorageAccountKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyAzureStorageAccountKey = (System.Security.SecureString) content.GetValueForProperty("TypePropertyAzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyAzureStorageAccountKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("TypePropertyServer")) { @@ -292,7 +292,7 @@ internal StorageClassPropertiesUpdate(global::System.Management.Automation.PSObj } if (content.Contains("TypePropertyPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyPassword = (string) content.GetValueForProperty("TypePropertyPassword",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyPassword = (System.Security.SecureString) content.GetValueForProperty("TypePropertyPassword",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)this).TypePropertyPassword, (object ss) => (System.Security.SecureString)ss); } AfterDeserializePSObject(content); } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassPropertiesUpdate.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassPropertiesUpdate.cs index a0e214c833..38d39aaa35 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassPropertiesUpdate.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassPropertiesUpdate.cs @@ -81,7 +81,7 @@ public partial class StorageClassPropertiesUpdate : /// Azure Storage Account Key [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Inlined)] - public string TypePropertyAzureStorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)TypeProperty).AzureStorageAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)TypeProperty).AzureStorageAccountKey = value ?? null; } + public System.Security.SecureString TypePropertyAzureStorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)TypeProperty).AzureStorageAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)TypeProperty).AzureStorageAccountKey = value ?? null; } /// Azure Storage Account Name [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Inlined)] @@ -107,7 +107,7 @@ public partial class StorageClassPropertiesUpdate : /// Server password [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Inlined)] - public string TypePropertyPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)TypeProperty).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)TypeProperty).Password = value ?? null; } + public System.Security.SecureString TypePropertyPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)TypeProperty).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)TypeProperty).Password = value ?? null; } /// NFS Server [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Inlined)] @@ -245,8 +245,8 @@ public partial interface IStorageClassPropertiesUpdate : Update = true, Description = @"Azure Storage Account Key", SerializedName = @"azureStorageAccountKey", - PossibleTypes = new [] { typeof(string) })] - string TypePropertyAzureStorageAccountKey { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString TypePropertyAzureStorageAccountKey { get; set; } /// Azure Storage Account Name [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Info( Required = false, @@ -314,8 +314,8 @@ public partial interface IStorageClassPropertiesUpdate : Update = true, Description = @"Server password", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - string TypePropertyPassword { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString TypePropertyPassword { get; set; } /// NFS Server [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Info( Required = false, @@ -405,7 +405,7 @@ internal partial interface IStorageClassPropertiesUpdateInternal /// New storage class type of storageClass Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdate TypeProperty { get; set; } /// Azure Storage Account Key - string TypePropertyAzureStorageAccountKey { get; set; } + System.Security.SecureString TypePropertyAzureStorageAccountKey { get; set; } /// Azure Storage Account Name string TypePropertyAzureStorageAccountName { get; set; } /// The backing storageclass used to create new storageclass @@ -420,7 +420,7 @@ internal partial interface IStorageClassPropertiesUpdateInternal [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PSArgumentCompleterAttribute("Delete", "Retain")] string TypePropertyOnDelete { get; set; } /// Server password - string TypePropertyPassword { get; set; } + System.Security.SecureString TypePropertyPassword { get; set; } /// NFS Server string TypePropertyServer { get; set; } /// NFS share diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassResourceUpdate.PowerShell.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassResourceUpdate.PowerShell.cs index 00c78f2b79..abf5296602 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassResourceUpdate.PowerShell.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassResourceUpdate.PowerShell.cs @@ -163,7 +163,7 @@ internal StorageClassResourceUpdate(global::System.Collections.IDictionary conte } if (content.Contains("TypePropertyAzureStorageAccountKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyAzureStorageAccountKey = (string) content.GetValueForProperty("TypePropertyAzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyAzureStorageAccountKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyAzureStorageAccountKey = (System.Security.SecureString) content.GetValueForProperty("TypePropertyAzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyAzureStorageAccountKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("TypePropertyServer")) { @@ -195,7 +195,7 @@ internal StorageClassResourceUpdate(global::System.Collections.IDictionary conte } if (content.Contains("TypePropertyPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyPassword = (string) content.GetValueForProperty("TypePropertyPassword",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyPassword = (System.Security.SecureString) content.GetValueForProperty("TypePropertyPassword",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyPassword, (object ss) => (System.Security.SecureString)ss); } AfterDeserializeDictionary(content); } @@ -268,7 +268,7 @@ internal StorageClassResourceUpdate(global::System.Management.Automation.PSObjec } if (content.Contains("TypePropertyAzureStorageAccountKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyAzureStorageAccountKey = (string) content.GetValueForProperty("TypePropertyAzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyAzureStorageAccountKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyAzureStorageAccountKey = (System.Security.SecureString) content.GetValueForProperty("TypePropertyAzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyAzureStorageAccountKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("TypePropertyServer")) { @@ -300,7 +300,7 @@ internal StorageClassResourceUpdate(global::System.Management.Automation.PSObjec } if (content.Contains("TypePropertyPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyPassword = (string) content.GetValueForProperty("TypePropertyPassword",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyPassword = (System.Security.SecureString) content.GetValueForProperty("TypePropertyPassword",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdateInternal)this).TypePropertyPassword, (object ss) => (System.Security.SecureString)ss); } AfterDeserializePSObject(content); } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassResourceUpdate.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassResourceUpdate.cs index 2dcf8c06f1..a1d6151f1e 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassResourceUpdate.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassResourceUpdate.cs @@ -60,7 +60,7 @@ public partial class StorageClassResourceUpdate : /// Azure Storage Account Key [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Inlined)] - public string TypePropertyAzureStorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)Property).TypePropertyAzureStorageAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)Property).TypePropertyAzureStorageAccountKey = value ?? null; } + public System.Security.SecureString TypePropertyAzureStorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)Property).TypePropertyAzureStorageAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)Property).TypePropertyAzureStorageAccountKey = value ?? null; } /// Azure Storage Account Name [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Inlined)] @@ -86,7 +86,7 @@ public partial class StorageClassResourceUpdate : /// Server password [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Inlined)] - public string TypePropertyPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)Property).TypePropertyPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)Property).TypePropertyPassword = value ?? null; } + public System.Security.SecureString TypePropertyPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)Property).TypePropertyPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassPropertiesUpdateInternal)Property).TypePropertyPassword = value ?? null; } /// NFS Server [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Inlined)] @@ -224,8 +224,8 @@ public partial interface IStorageClassResourceUpdate : Update = true, Description = @"Azure Storage Account Key", SerializedName = @"azureStorageAccountKey", - PossibleTypes = new [] { typeof(string) })] - string TypePropertyAzureStorageAccountKey { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString TypePropertyAzureStorageAccountKey { get; set; } /// Azure Storage Account Name [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Info( Required = false, @@ -293,8 +293,8 @@ public partial interface IStorageClassResourceUpdate : Update = true, Description = @"Server password", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - string TypePropertyPassword { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString TypePropertyPassword { get; set; } /// NFS Server [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Info( Required = false, @@ -386,7 +386,7 @@ internal partial interface IStorageClassResourceUpdateInternal /// New storage class type of storageClass Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdate TypeProperty { get; set; } /// Azure Storage Account Key - string TypePropertyAzureStorageAccountKey { get; set; } + System.Security.SecureString TypePropertyAzureStorageAccountKey { get; set; } /// Azure Storage Account Name string TypePropertyAzureStorageAccountName { get; set; } /// The backing storageclass used to create new storageclass @@ -401,7 +401,7 @@ internal partial interface IStorageClassResourceUpdateInternal [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PSArgumentCompleterAttribute("Delete", "Retain")] string TypePropertyOnDelete { get; set; } /// Server password - string TypePropertyPassword { get; set; } + System.Security.SecureString TypePropertyPassword { get; set; } /// NFS Server string TypePropertyServer { get; set; } /// NFS share diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.PowerShell.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.PowerShell.cs index 8cde5d81d4..ae047acd1e 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.PowerShell.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.PowerShell.cs @@ -119,7 +119,7 @@ internal StorageClassTypePropertiesUpdate(global::System.Collections.IDictionary } if (content.Contains("AzureStorageAccountKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).AzureStorageAccountKey = (string) content.GetValueForProperty("AzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).AzureStorageAccountKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).AzureStorageAccountKey = (System.Security.SecureString) content.GetValueForProperty("AzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).AzureStorageAccountKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("Server")) { @@ -151,7 +151,7 @@ internal StorageClassTypePropertiesUpdate(global::System.Collections.IDictionary } if (content.Contains("Password")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).Password, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).Password = (System.Security.SecureString) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).Password, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("Domain")) { @@ -184,7 +184,7 @@ internal StorageClassTypePropertiesUpdate(global::System.Management.Automation.P } if (content.Contains("AzureStorageAccountKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).AzureStorageAccountKey = (string) content.GetValueForProperty("AzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).AzureStorageAccountKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).AzureStorageAccountKey = (System.Security.SecureString) content.GetValueForProperty("AzureStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).AzureStorageAccountKey, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("Server")) { @@ -216,7 +216,7 @@ internal StorageClassTypePropertiesUpdate(global::System.Management.Automation.P } if (content.Contains("Password")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).Password, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).Password = (System.Security.SecureString) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassTypePropertiesUpdateInternal)this).Password, (object ss) => (System.Security.SecureString)ss); } if (content.Contains("Domain")) { diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.cs index 4a996b6cdd..30a63921ab 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.cs @@ -12,11 +12,11 @@ public partial class StorageClassTypePropertiesUpdate : { /// Backing field for property. - private string _azureStorageAccountKey; + private System.Security.SecureString _azureStorageAccountKey; /// Azure Storage Account Key [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Owned)] - public string AzureStorageAccountKey { get => this._azureStorageAccountKey; set => this._azureStorageAccountKey = value; } + public System.Security.SecureString AzureStorageAccountKey { get => this._azureStorageAccountKey; set => this._azureStorageAccountKey = value; } /// Backing field for property. private string _azureStorageAccountName; @@ -56,11 +56,11 @@ public partial class StorageClassTypePropertiesUpdate : public string OnDelete { get => this._onDelete; set => this._onDelete = value; } /// Backing field for property. - private string _password; + private System.Security.SecureString _password; /// Server password [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Origin(Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PropertyOrigin.Owned)] - public string Password { get => this._password; set => this._password = value; } + public System.Security.SecureString Password { get => this._password; set => this._password = value; } /// Backing field for property. private string _server; @@ -118,8 +118,8 @@ public partial interface IStorageClassTypePropertiesUpdate : Update = true, Description = @"Azure Storage Account Key", SerializedName = @"azureStorageAccountKey", - PossibleTypes = new [] { typeof(string) })] - string AzureStorageAccountKey { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AzureStorageAccountKey { get; set; } /// Azure Storage Account Name [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Info( Required = false, @@ -187,8 +187,8 @@ public partial interface IStorageClassTypePropertiesUpdate : Update = true, Description = @"Server password", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - string Password { get; set; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString Password { get; set; } /// NFS Server [Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Info( Required = false, @@ -253,7 +253,7 @@ internal partial interface IStorageClassTypePropertiesUpdateInternal { /// Azure Storage Account Key - string AzureStorageAccountKey { get; set; } + System.Security.SecureString AzureStorageAccountKey { get; set; } /// Azure Storage Account Name string AzureStorageAccountName { get; set; } /// The backing storageclass used to create new storageclass @@ -268,7 +268,7 @@ internal partial interface IStorageClassTypePropertiesUpdateInternal [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.PSArgumentCompleterAttribute("Delete", "Retain")] string OnDelete { get; set; } /// Server password - string Password { get; set; } + System.Security.SecureString Password { get; set; } /// NFS Server string Server { get; set; } /// NFS share diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.json.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.json.cs index cbc35ed503..2fd99bd397 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.json.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/api/Models/StorageClassTypePropertiesUpdate.json.cs @@ -77,7 +77,7 @@ internal StorageClassTypePropertiesUpdate(Microsoft.Azure.PowerShell.Cmdlets.Con } {_backingStorageClassName = If( json?.PropertyT("backingStorageClassName"), out var __jsonBackingStorageClassName) ? (string)__jsonBackingStorageClassName : (string)_backingStorageClassName;} {_azureStorageAccountName = If( json?.PropertyT("azureStorageAccountName"), out var __jsonAzureStorageAccountName) ? (string)__jsonAzureStorageAccountName : (string)_azureStorageAccountName;} - {_azureStorageAccountKey = If( json?.PropertyT("azureStorageAccountKey"), out var __jsonAzureStorageAccountKey) ? (string)__jsonAzureStorageAccountKey : (string)_azureStorageAccountKey;} + {_azureStorageAccountKey = If( json?.PropertyT("azureStorageAccountKey"), out var __jsonAzureStorageAccountKey) ? new System.Net.NetworkCredential("",(string)__jsonAzureStorageAccountKey).SecurePassword : _azureStorageAccountKey;} {_server = If( json?.PropertyT("server"), out var __jsonServer) ? (string)__jsonServer : (string)_server;} {_share = If( json?.PropertyT("share"), out var __jsonShare) ? (string)__jsonShare : (string)_share;} {_subDir = If( json?.PropertyT("subDir"), out var __jsonSubDir) ? (string)__jsonSubDir : (string)_subDir;} @@ -85,7 +85,7 @@ internal StorageClassTypePropertiesUpdate(Microsoft.Azure.PowerShell.Cmdlets.Con {_onDelete = If( json?.PropertyT("onDelete"), out var __jsonOnDelete) ? (string)__jsonOnDelete : (string)_onDelete;} {_source = If( json?.PropertyT("source"), out var __jsonSource) ? (string)__jsonSource : (string)_source;} {_username = If( json?.PropertyT("username"), out var __jsonUsername) ? (string)__jsonUsername : (string)_username;} - {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? (string)__jsonPassword : (string)_password;} + {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? new System.Net.NetworkCredential("",(string)__jsonPassword).SecurePassword : _password;} {_domain = If( json?.PropertyT("domain"), out var __jsonDomain) ? (string)__jsonDomain : (string)_domain;} AfterFromJson(json); } @@ -111,7 +111,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.J } AddIf( null != (((object)this._backingStorageClassName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._backingStorageClassName.ToString()) : null, "backingStorageClassName" ,container.Add ); AddIf( null != (((object)this._azureStorageAccountName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._azureStorageAccountName.ToString()) : null, "azureStorageAccountName" ,container.Add ); - AddIf( null != (((object)this._azureStorageAccountKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._azureStorageAccountKey.ToString()) : null, "azureStorageAccountKey" ,container.Add ); + AddIf( null != (((object)this._azureStorageAccountKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._azureStorageAccountKey))) : null, "azureStorageAccountKey" ,container.Add ); AddIf( null != (((object)this._server)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._server.ToString()) : null, "server" ,container.Add ); AddIf( null != (((object)this._share)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._share.ToString()) : null, "share" ,container.Add ); AddIf( null != (((object)this._subDir)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._subDir.ToString()) : null, "subDir" ,container.Add ); @@ -119,7 +119,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.J AddIf( null != (((object)this._onDelete)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._onDelete.ToString()) : null, "onDelete" ,container.Add ); AddIf( null != (((object)this._source)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._source.ToString()) : null, "source" ,container.Add ); AddIf( null != (((object)this._username)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._username.ToString()) : null, "username" ,container.Add ); - AddIf( null != (((object)this._password)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._password.ToString()) : null, "password" ,container.Add ); + AddIf( null != (((object)this._password)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._password))) : null, "password" ,container.Add ); AddIf( null != (((object)this._domain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Runtime.Json.JsonString(this._domain.ToString()) : null, "domain" ,container.Add ); AfterToJson(ref container); return container; diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs index 369feecba3..04f86231b5 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs @@ -266,8 +266,8 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpa ReadOnly = false, Description = @"Azure Storage Account Key", SerializedName = @"azureStorageAccountKey", - PossibleTypes = new [] { typeof(string) })] - public string TypePropertyAzureStorageAccountKey { get => _propertiesBody.TypePropertyAzureStorageAccountKey ?? null; set => _propertiesBody.TypePropertyAzureStorageAccountKey = value; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString TypePropertyAzureStorageAccountKey { get => _propertiesBody.TypePropertyAzureStorageAccountKey ?? null; set => _propertiesBody.TypePropertyAzureStorageAccountKey = value; } /// Azure Storage Account Name [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Azure Storage Account Name")] @@ -335,8 +335,8 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpa ReadOnly = false, Description = @"Server password", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - public string TypePropertyPassword { get => _propertiesBody.TypePropertyPassword ?? null; set => _propertiesBody.TypePropertyPassword = value; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString TypePropertyPassword { get => _propertiesBody.TypePropertyPassword ?? null; set => _propertiesBody.TypePropertyPassword = value; } /// NFS Server [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "NFS Server")] diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs index cb39786a85..ad5c20a3f4 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs @@ -245,8 +245,8 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaI ReadOnly = false, Description = @"Azure Storage Account Key", SerializedName = @"azureStorageAccountKey", - PossibleTypes = new [] { typeof(string) })] - public string TypePropertyAzureStorageAccountKey { get => _propertiesBody.TypePropertyAzureStorageAccountKey ?? null; set => _propertiesBody.TypePropertyAzureStorageAccountKey = value; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString TypePropertyAzureStorageAccountKey { get => _propertiesBody.TypePropertyAzureStorageAccountKey ?? null; set => _propertiesBody.TypePropertyAzureStorageAccountKey = value; } /// Azure Storage Account Name [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Azure Storage Account Name")] @@ -314,8 +314,8 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaI ReadOnly = false, Description = @"Server password", SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - public string TypePropertyPassword { get => _propertiesBody.TypePropertyPassword ?? null; set => _propertiesBody.TypePropertyPassword = value; } + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString TypePropertyPassword { get => _propertiesBody.TypePropertyPassword ?? null; set => _propertiesBody.TypePropertyPassword = value; } /// NFS Server [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "NFS Server")]