@autorest/powershell 2.1.400 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rush/temp/package-deps_build.json +350 -0
- package/.rush/temp/shrinkwrap-deps.json +433 -0
- package/autorest-configuration.md +60 -47
- package/dist/cmdlets/class.d.ts +21 -8
- package/dist/cmdlets/class.d.ts.map +1 -1
- package/dist/cmdlets/class.js +475 -151
- package/dist/cmdlets/class.js.map +1 -1
- package/dist/cmdlets/namespace.d.ts.map +1 -1
- package/dist/cmdlets/namespace.js +1 -0
- package/dist/cmdlets/namespace.js.map +1 -1
- package/dist/enums/namespace.d.ts.map +1 -1
- package/dist/enums/namespace.js +17 -10
- package/dist/enums/namespace.js.map +1 -1
- package/dist/generators/csproj.d.ts.map +1 -1
- package/dist/generators/csproj.js +2 -1
- package/dist/generators/csproj.js.map +1 -1
- package/dist/generators/gitignore.d.ts.map +1 -1
- package/dist/generators/gitignore.js +1 -0
- package/dist/generators/gitignore.js.map +1 -1
- package/dist/generators/nuspec.d.ts.map +1 -1
- package/dist/generators/nuspec.js +4 -3
- package/dist/generators/nuspec.js.map +1 -1
- package/dist/generators/psm1.d.ts.map +1 -1
- package/dist/generators/psm1.js +24 -15
- package/dist/generators/psm1.js.map +1 -1
- package/dist/generators/script-cmdlet.d.ts.map +1 -1
- package/dist/generators/script-cmdlet.js +1 -1
- package/dist/generators/script-cmdlet.js.map +1 -1
- package/dist/internal/name-inferrer.d.ts.map +1 -1
- package/dist/internal/name-inferrer.js +2 -0
- package/dist/internal/name-inferrer.js.map +1 -1
- package/dist/internal/project.d.ts +46 -5
- package/dist/internal/project.d.ts.map +1 -1
- package/dist/internal/project.js +72 -13
- package/dist/internal/project.js.map +1 -1
- package/dist/internal/state.d.ts +3 -2
- package/dist/internal/state.d.ts.map +1 -1
- package/dist/internal/state.js +3 -3
- package/dist/internal/state.js.map +1 -1
- package/dist/llcsharp/clientruntime.d.ts +5 -0
- package/dist/llcsharp/clientruntime.d.ts.map +1 -1
- package/dist/llcsharp/clientruntime.js +5 -0
- package/dist/llcsharp/clientruntime.js.map +1 -1
- package/dist/llcsharp/enums/enum.d.ts +2 -2
- package/dist/llcsharp/enums/enum.d.ts.map +1 -1
- package/dist/llcsharp/enums/enum.js +11 -10
- package/dist/llcsharp/enums/enum.js.map +1 -1
- package/dist/llcsharp/generator.d.ts +3 -3
- package/dist/llcsharp/generator.d.ts.map +1 -1
- package/dist/llcsharp/generator.js +4 -2
- package/dist/llcsharp/generator.js.map +1 -1
- package/dist/llcsharp/model/interface.d.ts +3 -2
- package/dist/llcsharp/model/interface.d.ts.map +1 -1
- package/dist/llcsharp/model/interface.js +68 -17
- package/dist/llcsharp/model/interface.js.map +1 -1
- package/dist/llcsharp/model/model-class-dictionary.d.ts.map +1 -1
- package/dist/llcsharp/model/model-class-dictionary.js +12 -6
- package/dist/llcsharp/model/model-class-dictionary.js.map +1 -1
- package/dist/llcsharp/model/model-class-json.d.ts.map +1 -1
- package/dist/llcsharp/model/model-class-json.js +20 -12
- package/dist/llcsharp/model/model-class-json.js.map +1 -1
- package/dist/llcsharp/model/model-class-serializer.d.ts +9 -21
- package/dist/llcsharp/model/model-class-serializer.d.ts.map +1 -1
- package/dist/llcsharp/model/model-class-serializer.js +21 -50
- package/dist/llcsharp/model/model-class-serializer.js.map +1 -1
- package/dist/llcsharp/model/model-class.d.ts +7 -4
- package/dist/llcsharp/model/model-class.d.ts.map +1 -1
- package/dist/llcsharp/model/model-class.js +147 -82
- package/dist/llcsharp/model/model-class.js.map +1 -1
- package/dist/llcsharp/model/namespace.d.ts +4 -4
- package/dist/llcsharp/model/namespace.d.ts.map +1 -1
- package/dist/llcsharp/model/namespace.js +40 -18
- package/dist/llcsharp/model/namespace.js.map +1 -1
- package/dist/llcsharp/model/property.d.ts +4 -4
- package/dist/llcsharp/model/property.d.ts.map +1 -1
- package/dist/llcsharp/model/property.js +9 -7
- package/dist/llcsharp/model/property.js.map +1 -1
- package/dist/llcsharp/operation/api-class.d.ts.map +1 -1
- package/dist/llcsharp/operation/api-class.js +24 -23
- package/dist/llcsharp/operation/api-class.js.map +1 -1
- package/dist/llcsharp/operation/method.d.ts +7 -5
- package/dist/llcsharp/operation/method.d.ts.map +1 -1
- package/dist/llcsharp/operation/method.js +157 -93
- package/dist/llcsharp/operation/method.js.map +1 -1
- package/dist/llcsharp/operation/namespace.js +2 -1
- package/dist/llcsharp/operation/namespace.js.map +1 -1
- package/dist/llcsharp/operation/parameter.d.ts +4 -4
- package/dist/llcsharp/operation/parameter.d.ts.map +1 -1
- package/dist/llcsharp/operation/parameter.js +7 -5
- package/dist/llcsharp/operation/parameter.js.map +1 -1
- package/dist/llcsharp/project.d.ts +4 -0
- package/dist/llcsharp/project.d.ts.map +1 -1
- package/dist/llcsharp/project.js +7 -2
- package/dist/llcsharp/project.js.map +1 -1
- package/dist/llcsharp/schema/Uuid.d.ts +2 -2
- package/dist/llcsharp/schema/Uuid.d.ts.map +1 -1
- package/dist/llcsharp/schema/Uuid.js.map +1 -1
- package/dist/llcsharp/schema/array.d.ts +3 -3
- package/dist/llcsharp/schema/array.d.ts.map +1 -1
- package/dist/llcsharp/schema/array.js +15 -8
- package/dist/llcsharp/schema/array.js.map +1 -1
- package/dist/llcsharp/schema/binary.d.ts +3 -3
- package/dist/llcsharp/schema/binary.d.ts.map +1 -1
- package/dist/llcsharp/schema/binary.js.map +1 -1
- package/dist/llcsharp/schema/boolean.d.ts +4 -4
- package/dist/llcsharp/schema/boolean.d.ts.map +1 -1
- package/dist/llcsharp/schema/boolean.js +1 -1
- package/dist/llcsharp/schema/boolean.js.map +1 -1
- package/dist/llcsharp/schema/byte-array.d.ts +3 -3
- package/dist/llcsharp/schema/byte-array.d.ts.map +1 -1
- package/dist/llcsharp/schema/byte-array.js +12 -2
- package/dist/llcsharp/schema/byte-array.js.map +1 -1
- package/dist/llcsharp/schema/char.d.ts +4 -4
- package/dist/llcsharp/schema/char.d.ts.map +1 -1
- package/dist/llcsharp/schema/char.js +3 -3
- package/dist/llcsharp/schema/char.js.map +1 -1
- package/dist/llcsharp/schema/date-time.d.ts +7 -7
- package/dist/llcsharp/schema/date-time.d.ts.map +1 -1
- package/dist/llcsharp/schema/date-time.js +4 -4
- package/dist/llcsharp/schema/date-time.js.map +1 -1
- package/dist/llcsharp/schema/date.d.ts +2 -2
- package/dist/llcsharp/schema/date.d.ts.map +1 -1
- package/dist/llcsharp/schema/date.js.map +1 -1
- package/dist/llcsharp/schema/duration.d.ts +5 -5
- package/dist/llcsharp/schema/duration.d.ts.map +1 -1
- package/dist/llcsharp/schema/duration.js +2 -2
- package/dist/llcsharp/schema/duration.js.map +1 -1
- package/dist/llcsharp/schema/enum.d.ts +2 -2
- package/dist/llcsharp/schema/enum.d.ts.map +1 -1
- package/dist/llcsharp/schema/enum.js +5 -3
- package/dist/llcsharp/schema/enum.js.map +1 -1
- package/dist/llcsharp/schema/extended-type-declaration.d.ts +2 -2
- package/dist/llcsharp/schema/extended-type-declaration.d.ts.map +1 -1
- package/dist/llcsharp/schema/integer.d.ts +4 -4
- package/dist/llcsharp/schema/integer.d.ts.map +1 -1
- package/dist/llcsharp/schema/integer.js +1 -1
- package/dist/llcsharp/schema/integer.js.map +1 -1
- package/dist/llcsharp/schema/object.d.ts +3 -3
- package/dist/llcsharp/schema/object.d.ts.map +1 -1
- package/dist/llcsharp/schema/object.js +25 -21
- package/dist/llcsharp/schema/object.js.map +1 -1
- package/dist/llcsharp/schema/password.d.ts +23 -0
- package/dist/llcsharp/schema/password.d.ts.map +1 -0
- package/dist/llcsharp/schema/password.js +89 -0
- package/dist/llcsharp/schema/password.js.map +1 -0
- package/dist/llcsharp/schema/primitive.d.ts +4 -4
- package/dist/llcsharp/schema/primitive.d.ts.map +1 -1
- package/dist/llcsharp/schema/primitive.js +7 -3
- package/dist/llcsharp/schema/primitive.js.map +1 -1
- package/dist/llcsharp/schema/schema-resolver.d.ts +4 -3
- package/dist/llcsharp/schema/schema-resolver.d.ts.map +1 -1
- package/dist/llcsharp/schema/schema-resolver.js +61 -64
- package/dist/llcsharp/schema/schema-resolver.js.map +1 -1
- package/dist/llcsharp/schema/string.d.ts +3 -3
- package/dist/llcsharp/schema/string.d.ts.map +1 -1
- package/dist/llcsharp/schema/string.js +14 -10
- package/dist/llcsharp/schema/string.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +23 -14
- package/dist/main.js.map +1 -1
- package/dist/models/model-extensions.d.ts +3 -2
- package/dist/models/model-extensions.d.ts.map +1 -1
- package/dist/models/model-extensions.js +195 -168
- package/dist/models/model-extensions.js.map +1 -1
- package/dist/module/module-class.d.ts +4 -2
- package/dist/module/module-class.d.ts.map +1 -1
- package/dist/module/module-class.js +67 -13
- package/dist/module/module-class.js.map +1 -1
- package/dist/module/module-namespace.d.ts +2 -2
- package/dist/module/module-namespace.d.ts.map +1 -1
- package/dist/module/module-namespace.js +3 -2
- package/dist/module/module-namespace.js.map +1 -1
- package/dist/plugins/add-azure-completers-v2.d.ts +3 -0
- package/dist/plugins/add-azure-completers-v2.d.ts.map +1 -0
- package/dist/plugins/{add-azure-completers.js → add-azure-completers-v2.js} +7 -5
- package/dist/plugins/add-azure-completers-v2.js.map +1 -0
- package/dist/plugins/create-commands-v2.d.ts +40 -0
- package/dist/plugins/create-commands-v2.d.ts.map +1 -0
- package/dist/plugins/{create-commands.js → create-commands-v2.js} +128 -78
- package/dist/plugins/create-commands-v2.js.map +1 -0
- package/dist/plugins/cs-namer-v2.d.ts +3 -0
- package/dist/plugins/cs-namer-v2.d.ts.map +1 -0
- package/dist/plugins/cs-namer-v2.js +230 -0
- package/dist/plugins/cs-namer-v2.js.map +1 -0
- package/dist/plugins/llcsharp-v2.d.ts +3 -0
- package/dist/plugins/llcsharp-v2.d.ts.map +1 -0
- package/dist/plugins/{llcsharp.js → llcsharp-v2.js} +3 -3
- package/dist/plugins/llcsharp-v2.js.map +1 -0
- package/dist/plugins/modifiers-v2.d.ts +3 -0
- package/dist/plugins/modifiers-v2.d.ts.map +1 -0
- package/dist/plugins/{modifiers.js → modifiers-v2.js} +151 -32
- package/dist/plugins/modifiers-v2.js.map +1 -0
- package/dist/plugins/plugin-create-inline-properties.d.ts +4 -0
- package/dist/plugins/plugin-create-inline-properties.d.ts.map +1 -0
- package/dist/plugins/plugin-create-inline-properties.js +356 -0
- package/dist/plugins/plugin-create-inline-properties.js.map +1 -0
- package/dist/plugins/plugin-tweak-m4-model.d.ts +3 -0
- package/dist/plugins/plugin-tweak-m4-model.d.ts.map +1 -0
- package/dist/plugins/plugin-tweak-m4-model.js +166 -0
- package/dist/plugins/plugin-tweak-m4-model.js.map +1 -0
- package/dist/plugins/plugin-tweak-model-azure-v2.d.ts +3 -0
- package/dist/plugins/plugin-tweak-model-azure-v2.d.ts.map +1 -0
- package/dist/plugins/plugin-tweak-model-azure-v2.js +169 -0
- package/dist/plugins/plugin-tweak-model-azure-v2.js.map +1 -0
- package/dist/plugins/plugin-tweak-model.d.ts +9 -0
- package/dist/plugins/plugin-tweak-model.d.ts.map +1 -0
- package/dist/plugins/plugin-tweak-model.js +572 -0
- package/dist/plugins/plugin-tweak-model.js.map +1 -0
- package/dist/plugins/powershell-v2.d.ts +3 -0
- package/dist/plugins/powershell-v2.d.ts.map +1 -0
- package/dist/plugins/{powershell.js → powershell-v2.js} +9 -4
- package/dist/plugins/powershell-v2.js.map +1 -0
- package/dist/plugins/{ps-namer.d.ts → ps-namer-v2.d.ts} +2 -2
- package/dist/plugins/ps-namer-v2.d.ts.map +1 -0
- package/dist/plugins/{ps-namer.js → ps-namer-v2.js} +64 -49
- package/dist/plugins/ps-namer-v2.js.map +1 -0
- package/dist/utils/PwshModel.d.ts +8 -0
- package/dist/utils/PwshModel.d.ts.map +1 -0
- package/dist/utils/PwshModel.js +17 -0
- package/dist/utils/PwshModel.js.map +1 -0
- package/dist/utils/command-operation.d.ts +51 -0
- package/dist/utils/command-operation.d.ts.map +1 -0
- package/dist/utils/command-operation.js +33 -0
- package/dist/utils/command-operation.js.map +1 -0
- package/dist/utils/components.d.ts +133 -0
- package/dist/utils/components.d.ts.map +1 -0
- package/dist/utils/components.js +100 -0
- package/dist/utils/components.js.map +1 -0
- package/dist/utils/extensions.d.ts +11 -0
- package/dist/utils/extensions.d.ts.map +1 -0
- package/dist/utils/extensions.js +16 -0
- package/dist/utils/extensions.js.map +1 -0
- package/dist/utils/http-definitions.d.ts +45 -0
- package/dist/utils/http-definitions.d.ts.map +1 -0
- package/dist/utils/http-definitions.js +47 -0
- package/dist/utils/http-definitions.js.map +1 -0
- package/dist/utils/http-operation.d.ts +8 -0
- package/dist/utils/http-operation.d.ts.map +1 -0
- package/dist/utils/http-operation.js +254 -0
- package/dist/utils/http-operation.js.map +1 -0
- package/dist/utils/info.d.ts +36 -0
- package/dist/utils/info.d.ts.map +1 -0
- package/dist/utils/info.js +36 -0
- package/dist/utils/info.js.map +1 -0
- package/dist/utils/model-state.d.ts +44 -0
- package/dist/utils/model-state.d.ts.map +1 -0
- package/dist/utils/model-state.js +206 -0
- package/dist/utils/model-state.js.map +1 -0
- package/dist/utils/powershell-comment.d.ts +2 -0
- package/dist/utils/powershell-comment.d.ts.map +1 -0
- package/dist/utils/powershell-comment.js +25 -0
- package/dist/utils/powershell-comment.js.map +1 -0
- package/dist/utils/programatic-operation.d.ts +20 -0
- package/dist/utils/programatic-operation.d.ts.map +1 -0
- package/dist/utils/programatic-operation.js +29 -0
- package/dist/utils/programatic-operation.js.map +1 -0
- package/dist/utils/resolve-conflicts.d.ts +7 -0
- package/dist/utils/resolve-conflicts.d.ts.map +1 -0
- package/dist/utils/resolve-conflicts.js +57 -0
- package/dist/utils/resolve-conflicts.js.map +1 -0
- package/dist/utils/schema.d.ts +116 -0
- package/dist/utils/schema.d.ts.map +1 -0
- package/dist/utils/schema.js +186 -0
- package/dist/utils/schema.js.map +1 -0
- package/dist/utils/security-scheme.d.ts +123 -0
- package/dist/utils/security-scheme.d.ts.map +1 -0
- package/dist/utils/security-scheme.js +119 -0
- package/dist/utils/security-scheme.js.map +1 -0
- package/dist/utils/uid.d.ts +2 -0
- package/dist/utils/uid.d.ts.map +1 -0
- package/dist/utils/uid.js +8 -0
- package/dist/utils/uid.js.map +1 -0
- package/package.json +22 -21
- package/resources/assets/build-module.ps1 +12 -15
- package/resources/assets/check-dependencies.ps1 +4 -14
- package/resources/assets/create-model-cmdlets.ps1 +157 -0
- package/resources/assets/custom/{readme.md → README.md} +7 -7
- package/resources/assets/docs/README.md +11 -0
- package/resources/assets/examples/{readme.md → README.md} +0 -0
- package/resources/assets/export-surface.ps1 +1 -11
- package/resources/assets/exports/{readme.md → README.md} +2 -2
- package/resources/assets/generate-help.ps1 +2 -12
- package/resources/assets/how-to.md +5 -5
- package/resources/assets/internal/{readme.md → README.md} +3 -3
- package/resources/assets/pack-module.ps1 +1 -11
- package/resources/assets/resources/{readme.md → README.md} +0 -0
- package/resources/assets/run-module.ps1 +3 -11
- package/resources/assets/test/{readme.md → README.md} +0 -0
- package/resources/assets/test/loadEnv.ps1 +1 -11
- package/resources/assets/test-module.ps1 +39 -24
- package/resources/assets/tools/Resources/{readme.md → README.md} +3 -2
- package/resources/assets/tools/Resources/docs/{readme.md → README.md} +1 -1
- package/resources/assets/tools/Resources/examples/{readme.md → README.md} +0 -0
- package/resources/assets/tools/Resources/how-to.md +5 -5
- package/resources/assets/tools/Resources/resources/{readme.md → README.md} +0 -0
- package/resources/assets/tools/Resources/test/{readme.md → README.md} +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Accounts.format.ps1xml +496 -0
- package/resources/modules/Az.Accounts/2.7.5/Accounts.generated.format.ps1xml +468 -0
- package/resources/modules/Az.Accounts/2.7.5/Accounts.types.ps1xml +303 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Az.Accounts.nuspec +5 -3
- package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.psd1 +387 -0
- package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.psm1 +375 -0
- package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Azure.Core.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Azure.Identity.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies → 2.7.5/AzSharedAlcAssemblies}/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Microsoft.Identity.Client.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/System.Memory.Data.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/System.Text.Json.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Hyak.Common.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.ApplicationInsights.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.Common.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Authentication.ResourceManager.deps.json +945 -404
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.deps.json → 2.7.5/Microsoft.Azure.PowerShell.Authentication.deps.json} +906 -488
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1/Microsoft.Azure.PowerShell.Authentication.deps.json → 2.7.5/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.deps.json} +301 -719
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Aks.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Authorization.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Compute.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.KeyVault.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Monitor.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Network.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Websites.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Cmdlets.Accounts.deps.json +2413 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml +3567 -1995
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Common.Share.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Common.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Storage.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Strategies.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Rest.ClientRuntime.Azure.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Rest.ClientRuntime.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.WindowsAzure.Storage.DataMovement.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.WindowsAzure.Storage.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PostImportScripts/LoadAuthenticators.ps1 +219 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Azure.Core.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Azure.Identity.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Identity.Client.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Newtonsoft.Json.12.0.3.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies/Newtonsoft.Json.10.dll → 2.7.5/PreloadAssemblies/Newtonsoft.Json.dll} +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Buffers.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies/System.Diagnostics.DiagnosticSource.4.0.4.0.dll → 2.7.5/PreloadAssemblies/System.Diagnostics.DiagnosticSource.dll} +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Memory.Data.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Memory.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Net.Http.WinHttpHandler.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Numerics.Vectors.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Private.ServiceModel.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Reflection.DispatchProxy.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.4.0.5.0.dll → 2.7.5/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.dll} +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Security.AccessControl.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Security.Cryptography.Cng.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Security.Permissions.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Security.Principal.Windows.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.ServiceModel.Primitives.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Text.Encodings.Web.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Text.Json.dll +0 -0
- package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies/System.Threading.Tasks.Extensions.4.2.0.0.dll → 2.7.5/PreloadAssemblies/System.Threading.Tasks.Extensions.dll} +0 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Xml.ReaderWriter.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/StartupScripts/AzError.ps1 +278 -0
- package/resources/modules/Az.Accounts/2.7.5/StartupScripts/InitializeAssemblyResolver.ps1 +234 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/[Content_Types].xml +1 -0
- package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/_rels/.rels +2 -2
- package/resources/modules/Az.Accounts/2.7.5/en-US/about_az.help.txt +50 -0
- package/resources/modules/Az.Accounts/{1.8.1/package/services/metadata/core-properties/b4e383786e734eb49545960a9feff173.psmdcp → 2.7.5/package/services/metadata/core-properties/1aa0749a068a4238881858013f1a5b7f.psmdcp} +2 -2
- package/resources/psruntime/AsyncCommandRuntime.cs +4 -0
- package/resources/psruntime/AsyncOperationResponse.cs +10 -11
- package/resources/psruntime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +3 -1
- package/resources/psruntime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +94 -87
- package/resources/psruntime/BuildTime/Cmdlets/ExportPsd1.cs +168 -102
- package/resources/psruntime/BuildTime/Cmdlets/ExportTestStub.cs +22 -11
- package/resources/psruntime/BuildTime/Cmdlets/GetScriptCmdlet.cs +2 -1
- package/resources/psruntime/BuildTime/MarkdownRenderer.cs +1 -8
- package/resources/psruntime/BuildTime/Models/PsHelpMarkdownOutputs.cs +33 -11
- package/resources/psruntime/BuildTime/Models/PsHelpTypes.cs +3 -0
- package/resources/psruntime/BuildTime/Models/PsMarkdownTypes.cs +17 -14
- package/resources/psruntime/BuildTime/Models/PsProxyOutputs.cs +111 -13
- package/resources/psruntime/BuildTime/Models/PsProxyTypes.cs +18 -3
- package/resources/psruntime/BuildTime/PsAttributes.cs +1 -1
- package/resources/psruntime/BuildTime/PsExtensions.cs +9 -0
- package/resources/psruntime/BuildTime/PsHelpers.cs +2 -1
- package/resources/psruntime/DictionaryExtensions.cs +8 -11
- package/resources/psruntime/EventDataExtensions.cs +1 -1
- package/resources/psruntime/MessageAttribute.cs +360 -0
- package/resources/psruntime/MessageAttributeHelper.cs +161 -0
- package/resources/psruntime/Properties/Resources.Designer.cs +5633 -0
- package/resources/psruntime/Properties/Resources.resx +1741 -0
- package/resources/psruntime/TypeConverterExtensions.cs +31 -10
- package/resources/runtime/csharp/client/Extensions.cs +7 -1
- package/resources/runtime/csharp/client/IAssociativeArray.cs +4 -1
- package/resources/runtime/csharp/client/UndeclaredResponseException.cs +10 -2
- package/resources/runtime/csharp/json/Customizations/IJsonSerializable.cs +21 -7
- package/resources/runtime/csharp/json/Nodes/JsonNumber.cs +5 -5
- package/resources/runtime/csharp/pipeline/ISendAsync.cs +7 -3
- package/resources/runtime/csharp/pipeline/PipelineMocking.cs +17 -9
- package/resources/utils/Unprotect-SecureString.ps1 +16 -0
- package/changelog.md +0 -4
- package/dist/llcsharp/enums/json-serializer.d.ts +0 -9
- package/dist/llcsharp/enums/json-serializer.d.ts.map +0 -1
- package/dist/llcsharp/enums/json-serializer.js +0 -41
- package/dist/llcsharp/enums/json-serializer.js.map +0 -1
- package/dist/llcsharp/model/model-class-xml.d.ts +0 -15
- package/dist/llcsharp/model/model-class-xml.d.ts.map +0 -1
- package/dist/llcsharp/model/model-class-xml.js +0 -145
- package/dist/llcsharp/model/model-class-xml.js.map +0 -1
- package/dist/plugins/add-azure-completers.d.ts +0 -3
- package/dist/plugins/add-azure-completers.d.ts.map +0 -1
- package/dist/plugins/add-azure-completers.js.map +0 -1
- package/dist/plugins/create-commands.d.ts +0 -38
- package/dist/plugins/create-commands.d.ts.map +0 -1
- package/dist/plugins/create-commands.js.map +0 -1
- package/dist/plugins/cs-namer.d.ts +0 -3
- package/dist/plugins/cs-namer.d.ts.map +0 -1
- package/dist/plugins/cs-namer.js +0 -203
- package/dist/plugins/cs-namer.js.map +0 -1
- package/dist/plugins/llcsharp.d.ts +0 -3
- package/dist/plugins/llcsharp.d.ts.map +0 -1
- package/dist/plugins/llcsharp.js.map +0 -1
- package/dist/plugins/modifiers.d.ts +0 -3
- package/dist/plugins/modifiers.d.ts.map +0 -1
- package/dist/plugins/modifiers.js.map +0 -1
- package/dist/plugins/powershell.d.ts +0 -3
- package/dist/plugins/powershell.d.ts.map +0 -1
- package/dist/plugins/powershell.js.map +0 -1
- package/dist/plugins/ps-namer.d.ts.map +0 -1
- package/dist/plugins/ps-namer.js.map +0 -1
- package/resources/assets/docs/readme.md +0 -11
- package/resources/modules/Az.Accounts/1.8.1/Accounts.format.ps1xml +0 -368
- package/resources/modules/Az.Accounts/1.8.1/Accounts.generated.format.ps1xml +0 -422
- package/resources/modules/Az.Accounts/1.8.1/Accounts.types.ps1xml +0 -281
- package/resources/modules/Az.Accounts/1.8.1/Az.Accounts.psd1 +0 -360
- package/resources/modules/Az.Accounts/1.8.1/Az.Accounts.psm1 +0 -339
- package/resources/modules/Az.Accounts/1.8.1/Microsoft.ApplicationInsights.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Authentication.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Common.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/Microsoft.Rest.ClientRuntime.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Azure.Core.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Numerics.Vectors.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Runtime.CompilerServices.Unsafe.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Text.Encodings.Web.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Text.Json.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Threading.Tasks.Extensions.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PostImportScripts/LoadAuthenticators.ps1 +0 -197
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Azure.Core.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Buffers.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Diagnostics.DiagnosticSource.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Numerics.Vectors.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Private.ServiceModel.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.4.0.4.0.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.4.0.4.1.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.ServiceModel.Primitives.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Text.Encodings.Web.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Text.Json.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Threading.Tasks.Extensions.4.3.1.0.dll +0 -0
- package/resources/modules/Az.Accounts/1.8.1/StartupScripts/AzError.ps1 +0 -256
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
5
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
6
6
|
*--------------------------------------------------------------------------------------------*/
|
|
7
|
+
const codemodel_1 = require("@azure-tools/codemodel");
|
|
7
8
|
const codemodel_v3_1 = require("@azure-tools/codemodel-v3");
|
|
9
|
+
const codemodel_2 = require("@azure-tools/codemodel");
|
|
8
10
|
const codegen_1 = require("@azure-tools/codegen");
|
|
9
11
|
const linq_1 = require("@azure-tools/linq");
|
|
10
12
|
const codegen_csharp_1 = require("@azure-tools/codegen-csharp");
|
|
@@ -23,9 +25,10 @@ const codegen_csharp_13 = require("@azure-tools/codegen-csharp");
|
|
|
23
25
|
const clientruntime_1 = require("../clientruntime");
|
|
24
26
|
const codegen_csharp_14 = require("@azure-tools/codegen-csharp");
|
|
25
27
|
const primitive_1 = require("../schema/primitive");
|
|
26
|
-
const
|
|
28
|
+
const interface_1 = require("./interface");
|
|
27
29
|
class JsonSerializableClass extends codegen_csharp_2.Class {
|
|
28
30
|
constructor(modelClass, objectInitializer) {
|
|
31
|
+
var _a;
|
|
29
32
|
super(modelClass.namespace, modelClass.name);
|
|
30
33
|
this.modelClass = modelClass;
|
|
31
34
|
this.apply(objectInitializer);
|
|
@@ -54,7 +57,7 @@ class JsonSerializableClass extends codegen_csharp_2.Class {
|
|
|
54
57
|
// we have to ensure that all the known wire-names are excluded on deserialization.
|
|
55
58
|
const exclusions = new codegen_csharp_6.Parameter('exclusions', codegen_csharp_1.System.Collections.Generic.HashSet(codegen_csharp_14.dotnet.String), { defaultInitializer: codegen_csharp_14.dotnet.Null });
|
|
56
59
|
deserializerConstructor.parameters.push(exclusions);
|
|
57
|
-
this.excludes = [...linq_1.values(
|
|
60
|
+
this.excludes = [...linq_1.values(codemodel_2.getAllProperties(this.modelClass.schema)).select(each => each.serializedName).select(each => new codegen_csharp_1.StringExpression(each))].join();
|
|
58
61
|
this.excludes = this.excludes ? `,${codegen_csharp_1.System.Collections.Generic.HashSet(codegen_csharp_14.dotnet.String).new()}{ ${this.excludes} }` : '';
|
|
59
62
|
const ap = `((${clientruntime_1.ClientRuntime}.IAssociativeArray<${vType.declaration}>)this).AdditionalProperties`;
|
|
60
63
|
if (this.modelClass.dictionaryImpl.ownsDictionary) {
|
|
@@ -64,8 +67,9 @@ class JsonSerializableClass extends codegen_csharp_2.Class {
|
|
|
64
67
|
// wildcard style
|
|
65
68
|
deserializeStatements.push(new codegen_csharp_11.Statements(`${clientruntime_1.ClientRuntime.JsonSerializable}.FromJson( json, ${ap}, ${clientruntime_1.ClientRuntime.JsonSerializable}.DeserializeDictionary(()=>${codegen_csharp_1.System.Collections.Generic.Dictionary(codegen_csharp_1.System.String, codegen_csharp_1.System.Object).new()}),${exclusions.value} );`));
|
|
66
69
|
}
|
|
67
|
-
else if (vType instanceof
|
|
68
|
-
|
|
70
|
+
else if (vType instanceof interface_1.ModelInterface) {
|
|
71
|
+
// use the class of the dictionary value to deserialize values
|
|
72
|
+
deserializeStatements.push(new codegen_csharp_11.Statements(`${clientruntime_1.ClientRuntime.JsonSerializable}.FromJson( json, ${ap}, (j) => ${vType.classImplementation.fullName}.FromJson(j) ,${exclusions.value} );`));
|
|
69
73
|
}
|
|
70
74
|
else {
|
|
71
75
|
deserializeStatements.push(new codegen_csharp_11.Statements(`${clientruntime_1.ClientRuntime.JsonSerializable}.FromJson( json, ${ap}, null ,${exclusions.value} );`));
|
|
@@ -74,7 +78,11 @@ class JsonSerializableClass extends codegen_csharp_2.Class {
|
|
|
74
78
|
}
|
|
75
79
|
for (const each of linq_1.values(modelClass.backingFields)) {
|
|
76
80
|
serializeStatements.add(`${each.field.value}?.ToJson(${container}, ${mode.use});`);
|
|
77
|
-
|
|
81
|
+
const sch = each.typeDeclaration.schema;
|
|
82
|
+
const dictSchema = sch.type === codemodel_1.SchemaType.Dictionary ? sch :
|
|
83
|
+
sch.type === codemodel_1.SchemaType.Object ? (_a = sch.parents) === null || _a === void 0 ? void 0 : _a.immediate.find((s) => s.type === codemodel_1.SchemaType.Dictionary) :
|
|
84
|
+
undefined;
|
|
85
|
+
if (dictSchema) {
|
|
78
86
|
deserializeStatements.add(`${each.field.value} = new ${each.className}(json${this.excludes});`);
|
|
79
87
|
}
|
|
80
88
|
else {
|
|
@@ -83,11 +91,11 @@ class JsonSerializableClass extends codegen_csharp_2.Class {
|
|
|
83
91
|
}
|
|
84
92
|
primitive_1.pushTempVar();
|
|
85
93
|
for (const prop of linq_1.values(modelClass.ownedProperties)) {
|
|
86
|
-
if (prop.
|
|
94
|
+
if (prop.language.csharp.HeaderProperty === 'Header') {
|
|
87
95
|
continue;
|
|
88
96
|
}
|
|
89
97
|
const serializeStatement = prop.type.serializeToContainerMember(codemodel_v3_1.KnownMediaType.Json, prop.valuePrivate, container, prop.serializedName, mode);
|
|
90
|
-
if (prop.
|
|
98
|
+
if (prop.language.csharp.readOnly) {
|
|
91
99
|
serializeStatements.add(codegen_csharp_9.If(`${mode.use}.HasFlag(${clientruntime_1.ClientRuntime.SerializationMode.IncludeReadOnly})`, serializeStatement));
|
|
92
100
|
}
|
|
93
101
|
else {
|
|
@@ -141,7 +149,7 @@ class JsonSerializableClass extends codegen_csharp_2.Class {
|
|
|
141
149
|
yield '// Polymorphic type -- select the appropriate constructor using the discriminator';
|
|
142
150
|
/** go thru the list of polymorphic values for the discriminator, and call the target class's constructor for that */
|
|
143
151
|
if ($this.schema.discriminator) {
|
|
144
|
-
yield codegen_csharp_12.Switch(codegen_csharp_4.toExpression(`json.StringProperty("${$this.schema.discriminator.
|
|
152
|
+
yield codegen_csharp_12.Switch(codegen_csharp_4.toExpression(`json.StringProperty("${$this.schema.discriminator.property.serializedName}")`), function* () {
|
|
145
153
|
for (const { key, value } of linq_1.items(d)) {
|
|
146
154
|
yield codegen_csharp_8.TerminalCase(`"${key}"`, function* () {
|
|
147
155
|
yield codegen_csharp_10.Return(value.new(json));
|
|
@@ -153,7 +161,7 @@ class JsonSerializableClass extends codegen_csharp_2.Class {
|
|
|
153
161
|
}
|
|
154
162
|
else {
|
|
155
163
|
// just tell it to create the instance (providing that it's a JSonObject)
|
|
156
|
-
yield codegen_csharp_10.Return(codegen_csharp_13.Ternery(json.check, $this.new(json), codegen_csharp_14.dotnet.Null));
|
|
164
|
+
yield codegen_csharp_10.Return(codegen_csharp_13.Ternery(json.check, $this.new(json, codegen_csharp_4.toExpression($excludes.substring(1))), codegen_csharp_14.dotnet.Null));
|
|
157
165
|
}
|
|
158
166
|
});
|
|
159
167
|
return super.definition;
|
|
@@ -170,7 +178,7 @@ class JsonSerializableClass extends codegen_csharp_2.Class {
|
|
|
170
178
|
new codegen_csharp_6.Parameter('returnNow', codegen_csharp_14.dotnet.Bool, { modifier: codegen_csharp_7.ParameterModifier.Ref, description: 'Determines if the rest of the serialization should be processed, or if the method should return instantly.' }),
|
|
171
179
|
],
|
|
172
180
|
description: `<c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the object before it is serialized.
|
|
173
|
-
If you wish to disable the default serialization entirely, return <c>true</c> in the <
|
|
181
|
+
If you wish to disable the default serialization entirely, return <c>true</c> in the <paramref name="returnNow" /> output parameter.
|
|
174
182
|
Implement this method in a partial class to enable this behavior.`
|
|
175
183
|
}));
|
|
176
184
|
this.atj = this.addMethod(new codegen_csharp_5.PartialMethod('AfterToJson', codegen_csharp_14.dotnet.Void, {
|
|
@@ -178,7 +186,7 @@ class JsonSerializableClass extends codegen_csharp_2.Class {
|
|
|
178
186
|
parameters: [
|
|
179
187
|
new codegen_csharp_6.Parameter('container', clientruntime_1.ClientRuntime.JsonObject, { modifier: codegen_csharp_7.ParameterModifier.Ref, description: 'The JSON container that the serialization result will be placed in.' }),
|
|
180
188
|
],
|
|
181
|
-
description: `<c>AfterToJson</c> will be called after the json
|
|
189
|
+
description: `<c>AfterToJson</c> will be called after the json serialization has finished, allowing customization of the <see cref="${clientruntime_1.ClientRuntime.JsonObject}" /> before it is returned. Implement this method in a partial class to enable this behavior `
|
|
182
190
|
}));
|
|
183
191
|
this.bfj = this.addMethod(new codegen_csharp_5.PartialMethod('BeforeFromJson', codegen_csharp_14.dotnet.Void, {
|
|
184
192
|
access: codegen_csharp_1.Access.Default,
|
|
@@ -187,7 +195,7 @@ class JsonSerializableClass extends codegen_csharp_2.Class {
|
|
|
187
195
|
new codegen_csharp_6.Parameter('returnNow', codegen_csharp_14.dotnet.Bool, { modifier: codegen_csharp_7.ParameterModifier.Ref, description: 'Determines if the rest of the deserialization should be processed, or if the method should return instantly.' }),
|
|
188
196
|
],
|
|
189
197
|
description: `<c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of the object before it is deserialized.
|
|
190
|
-
If you wish to disable the default deserialization entirely, return <c>true</c> in the <
|
|
198
|
+
If you wish to disable the default deserialization entirely, return <c>true</c> in the <paramref name= "returnNow" /> output parameter.
|
|
191
199
|
Implement this method in a partial class to enable this behavior.`
|
|
192
200
|
}));
|
|
193
201
|
this.afj = this.addMethod(new codegen_csharp_5.PartialMethod('AfterFromJson', codegen_csharp_14.dotnet.Void, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-class-json.js","sourceRoot":"","sources":["../../../llcsharp/model/model-class-json.ts"],"names":[],"mappings":";;AAAA;;;gGAGgG;AAChG,4DAAiH;AACjH,kDAAyD;AACzD,4CAA4E;AAC5E,gEAAqG;AACrG,gEAAoD;AACpD,gEAA0D;AAC1D,gEAA0E;AAC1E,gEAAoE;AAEpE,gEAAwD;AACxD,gEAAgE;AAChE,gEAA2D;AAC3D,gEAAsD;AACtD,iEAAqD;AACrD,iEAAyD;AACzD,iEAAqD;AACrD,iEAAsD;AACtD,oDAAiD;AAEjD,iEAAqD;AAGrD,mDAA8D;AAG9D,
|
|
1
|
+
{"version":3,"file":"model-class-json.js","sourceRoot":"","sources":["../../../llcsharp/model/model-class-json.ts"],"names":[],"mappings":";;AAAA;;;gGAGgG;AAChG,sDAAuF;AACvF,4DAAiH;AACjH,sDAAiF;AACjF,kDAAyD;AACzD,4CAA4E;AAC5E,gEAAqG;AACrG,gEAAoD;AACpD,gEAA0D;AAC1D,gEAA0E;AAC1E,gEAAoE;AAEpE,gEAAwD;AACxD,gEAAgE;AAChE,gEAA2D;AAC3D,gEAAsD;AACtD,iEAAqD;AACrD,iEAAyD;AACzD,iEAAqD;AACrD,iEAAsD;AACtD,oDAAiD;AAEjD,iEAAqD;AAGrD,mDAA8D;AAG9D,2CAA6C;AAG7C,MAAa,qBAAsB,SAAQ,sBAAK;IAO9C,YAAsB,UAAsB,EAAE,iBAAsD;;QAClG,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;QADzB,eAAU,GAAV,UAAU,CAAY;QAE1C,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,iB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AC;aAC/H;YACD,WAAW,EAAE,gNAAgN;SAC9N,CAAC,CAAC,CAAC;IACN,CAAC;CACF;AArND,sDAqNC"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { VirtualProperty } from '@azure-tools/codemodel-v3';
|
|
2
1
|
import { Initializer, DeepPartial } from '@azure-tools/codegen';
|
|
3
2
|
import { TypeDeclaration } from '@azure-tools/codegen-csharp';
|
|
4
3
|
import { Class } from '@azure-tools/codegen-csharp';
|
|
5
4
|
import { Parameter } from '@azure-tools/codegen-csharp';
|
|
6
5
|
import { EnhancedTypeDeclaration } from '../schema/extended-type-declaration';
|
|
7
|
-
import { Schema } from '
|
|
6
|
+
import { Schema as NewSchema } from '@azure-tools/codemodel';
|
|
8
7
|
export declare class SerializationPartialClass extends Initializer {
|
|
9
8
|
protected targetClass: Class;
|
|
10
9
|
protected targetInterface: TypeDeclaration;
|
|
11
10
|
protected serializationType: TypeDeclaration;
|
|
12
11
|
protected serializationFormat: string;
|
|
13
|
-
protected schema:
|
|
14
|
-
protected resolver: (s:
|
|
15
|
-
constructor(targetClass: Class, targetInterface: TypeDeclaration, serializationType: TypeDeclaration, serializationFormat: string, schema:
|
|
16
|
-
protected get virtualProperties():
|
|
17
|
-
protected get allVirtualProperties():
|
|
12
|
+
protected schema: NewSchema;
|
|
13
|
+
protected resolver: (s: NewSchema, req: boolean) => EnhancedTypeDeclaration;
|
|
14
|
+
constructor(targetClass: Class, targetInterface: TypeDeclaration, serializationType: TypeDeclaration, serializationFormat: string, schema: NewSchema, resolver: (s: NewSchema, req: boolean) => EnhancedTypeDeclaration, objectInitializer?: DeepPartial<SerializationPartialClass>);
|
|
15
|
+
protected get virtualProperties(): any;
|
|
16
|
+
protected get allVirtualProperties(): unknown[];
|
|
18
17
|
protected contentParameter: Parameter;
|
|
19
18
|
protected refContainerParameter: Parameter;
|
|
20
19
|
protected returnNowParameter: Parameter;
|
|
@@ -25,26 +24,15 @@ export declare class SerializationPartialClass extends Initializer {
|
|
|
25
24
|
export declare class DeserializerPartialClass extends SerializationPartialClass {
|
|
26
25
|
protected serializationType: TypeDeclaration;
|
|
27
26
|
protected serializationFormat: string;
|
|
28
|
-
protected schema:
|
|
27
|
+
protected schema: NewSchema;
|
|
29
28
|
private beforeDeserialize;
|
|
30
29
|
private afterDeserialize;
|
|
31
|
-
constructor(targetClass: Class, targetInterface: TypeDeclaration, serializationType: TypeDeclaration, serializationFormat: string, schema:
|
|
30
|
+
constructor(targetClass: Class, targetInterface: TypeDeclaration, serializationType: TypeDeclaration, serializationFormat: string, schema: NewSchema, resolver: (s: NewSchema, req: boolean) => EnhancedTypeDeclaration, objectInitializer?: DeepPartial<DeserializerPartialClass>);
|
|
32
31
|
init(): Promise<void>;
|
|
33
32
|
protected addDeserializerConstructor(): void;
|
|
34
33
|
private hasAadditionalProperties;
|
|
35
|
-
get deserializeStatements(): () => Generator<
|
|
34
|
+
get deserializeStatements(): () => Generator<import("@azure-tools/codegen-csharp").IfStatement | "// actually deserialize ", void, unknown>;
|
|
36
35
|
protected addDeserializerMethod(): void;
|
|
37
36
|
protected addPartialMethods(): void;
|
|
38
37
|
}
|
|
39
|
-
export declare class SerializerPartialClass extends SerializationPartialClass {
|
|
40
|
-
protected serializationType: TypeDeclaration;
|
|
41
|
-
protected serializationFormat: string;
|
|
42
|
-
protected schema: Schema;
|
|
43
|
-
private beforeSerialize;
|
|
44
|
-
private afterSerialize;
|
|
45
|
-
constructor(targetClass: Class, targetInterface: TypeDeclaration, serializationType: TypeDeclaration, serializationFormat: string, schema: Schema, resolver: (s: Schema, req: boolean) => EnhancedTypeDeclaration, objectInitializer?: DeepPartial<SerializerPartialClass>);
|
|
46
|
-
init(): Promise<void>;
|
|
47
|
-
protected addSerializer(): void;
|
|
48
|
-
protected addPartialMethods(): void;
|
|
49
|
-
}
|
|
50
38
|
//# sourceMappingURL=model-class-serializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-class-serializer.d.ts","sourceRoot":"","sources":["../../../llcsharp/model/model-class-serializer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-class-serializer.d.ts","sourceRoot":"","sources":["../../../llcsharp/model/model-class-serializer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAO,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGrE,OAAO,EAAyE,eAAe,EAAsB,MAAM,6BAA6B,CAAC;AACzJ,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAKpD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAWxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAK9E,OAAO,EAAkC,MAAM,IAAI,SAAS,EAAc,MAAM,wBAAwB,CAAC;AAMzG,qBAAa,yBAA0B,SAAQ,WAAW;IAC5C,SAAS,CAAC,WAAW,EAAE,KAAK;IAAE,SAAS,CAAC,eAAe,EAAE,eAAe;IAAE,SAAS,CAAC,iBAAiB,EAAE,eAAe;IAAE,SAAS,CAAC,mBAAmB,EAAE,MAAM;IAAE,SAAS,CAAC,MAAM,EAAE,SAAS;IAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,KAAK,uBAAuB;gBAA7P,WAAW,EAAE,KAAK,EAAY,eAAe,EAAE,eAAe,EAAY,iBAAiB,EAAE,eAAe,EAAY,mBAAmB,EAAE,MAAM,EAAY,MAAM,EAAE,SAAS,EAAY,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,KAAK,uBAAuB,EAAE,iBAAiB,CAAC,EAAE,WAAW,CAAC,yBAAyB,CAAC;IAK/U,SAAS,KAAK,iBAAiB,QAM9B;IACD,SAAS,KAAK,oBAAoB,cAIjC;IAED,SAAS,CAAC,gBAAgB,YAA+I;IACzK,SAAS,CAAC,qBAAqB,YAAgN;IAC/O,SAAS,CAAC,kBAAkB,YAA2M;IAEvO,SAAS,KAAK,QAAQ,WAErB;IAED,SAAS,KAAK,QAAQ,WAErB;IAED,SAAS,KAAK,aAAa,WAE1B;CAEF;AAED,qBAAa,wBAAyB,SAAQ,yBAAyB;IAGH,SAAS,CAAC,iBAAiB,EAAE,eAAe;IAAE,SAAS,CAAC,mBAAmB,EAAE,MAAM;IAAE,SAAS,CAAC,MAAM,EAAE,SAAS;IAFlL,OAAO,CAAC,iBAAiB,CAAU;IACnC,OAAO,CAAC,gBAAgB,CAAU;gBACtB,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,EAAY,iBAAiB,EAAE,eAAe,EAAY,mBAAmB,EAAE,MAAM,EAAY,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,KAAK,uBAAuB,EAAE,iBAAiB,CAAC,EAAE,WAAW,CAAC,wBAAwB,CAAC;IAK1S,IAAI;IAOV,SAAS,CAAC,0BAA0B;IA0BpC,OAAO,CAAC,wBAAwB;IAmBhC,IAAI,qBAAqB,mHAexB;IAED,SAAS,CAAC,qBAAqB;IAe/B,SAAS,CAAC,iBAAiB;CAiB5B"}
|
|
@@ -10,6 +10,7 @@ const codegen_csharp_5 = require("@azure-tools/codegen-csharp");
|
|
|
10
10
|
const codegen_csharp_6 = require("@azure-tools/codegen-csharp");
|
|
11
11
|
const codegen_csharp_7 = require("@azure-tools/codegen-csharp");
|
|
12
12
|
const codegen_csharp_8 = require("@azure-tools/codegen-csharp");
|
|
13
|
+
const codemodel_1 = require("@azure-tools/codemodel");
|
|
13
14
|
const model_class_1 = require("./model-class");
|
|
14
15
|
class SerializationPartialClass extends codegen_1.Initializer {
|
|
15
16
|
constructor(targetClass, targetInterface, serializationType, serializationFormat, schema, resolver, objectInitializer) {
|
|
@@ -26,7 +27,8 @@ class SerializationPartialClass extends codegen_1.Initializer {
|
|
|
26
27
|
this.apply(objectInitializer);
|
|
27
28
|
}
|
|
28
29
|
get virtualProperties() {
|
|
29
|
-
|
|
30
|
+
var _a;
|
|
31
|
+
return ((_a = this.schema.language.csharp) === null || _a === void 0 ? void 0 : _a.virtualProperties) || {
|
|
30
32
|
owned: [],
|
|
31
33
|
inherited: [],
|
|
32
34
|
inlined: []
|
|
@@ -83,29 +85,36 @@ class DeserializerPartialClass extends SerializationPartialClass {
|
|
|
83
85
|
});
|
|
84
86
|
}
|
|
85
87
|
hasAadditionalProperties(aSchema) {
|
|
86
|
-
|
|
88
|
+
var _a;
|
|
89
|
+
if (aSchema.type === codemodel_1.SchemaType.Dictionary) {
|
|
87
90
|
return true;
|
|
88
91
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
if (aSchema.type !== codemodel_1.SchemaType.Object) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
const objSchema = (_a = aSchema.parents) === null || _a === void 0 ? void 0 : _a.immediate;
|
|
96
|
+
if (!objSchema || objSchema.length === 0) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
for (const parent of objSchema) {
|
|
100
|
+
if (this.hasAadditionalProperties(parent)) {
|
|
101
|
+
return true;
|
|
95
102
|
}
|
|
103
|
+
}
|
|
96
104
|
return false;
|
|
97
105
|
}
|
|
98
106
|
get deserializeStatements() {
|
|
99
107
|
const $this = this;
|
|
100
108
|
return function* () {
|
|
109
|
+
var _a;
|
|
101
110
|
yield '// actually deserialize ';
|
|
102
111
|
for (const virtualProperty of linq_1.values($this.allVirtualProperties)) {
|
|
103
112
|
// yield `// deserialize ${virtualProperty.name} from ${$this.serializationFormat}`;
|
|
104
|
-
const type = $this.resolver(virtualProperty.property.schema, virtualProperty.property.
|
|
113
|
+
const type = $this.resolver(virtualProperty.property.schema, virtualProperty.property.language.default.required);
|
|
105
114
|
const cvt = type.convertObjectMethod;
|
|
106
|
-
const t = `((${virtualProperty.originalContainingSchema.
|
|
115
|
+
const t = `((${(_a = virtualProperty.originalContainingSchema.language.csharp) === null || _a === void 0 ? void 0 : _a.fullInternalInterfaceName})this)`;
|
|
107
116
|
const tt = type ? `(${type.declaration})` : '';
|
|
108
|
-
yield `${t}.${model_class_1.getVirtualPropertyName(virtualProperty)} = ${tt} ${$this.contentParameter}.GetValueForProperty("${model_class_1.getVirtualPropertyName(virtualProperty)}",${t}.${model_class_1.getVirtualPropertyName(virtualProperty)}, ${cvt})
|
|
117
|
+
yield codegen_csharp_6.If(`content.Contains("${model_class_1.getVirtualPropertyName(virtualProperty)}")`, `${t}.${model_class_1.getVirtualPropertyName(virtualProperty)} = ${tt} ${$this.contentParameter}.GetValueForProperty("${model_class_1.getVirtualPropertyName(virtualProperty)}",${t}.${model_class_1.getVirtualPropertyName(virtualProperty)}, ${cvt});`);
|
|
109
118
|
}
|
|
110
119
|
};
|
|
111
120
|
}
|
|
@@ -127,7 +136,7 @@ class DeserializerPartialClass extends SerializationPartialClass {
|
|
|
127
136
|
access: codegen_csharp_1.Access.Default,
|
|
128
137
|
parameters: [this.contentParameter, this.returnNowParameter],
|
|
129
138
|
description: `<c>${before}</c> will be called before the deserialization has commenced, allowing complete customization of the object before it is deserialized.
|
|
130
|
-
If you wish to disable the default deserialization entirely, return <c>true</c> in the <
|
|
139
|
+
If you wish to disable the default deserialization entirely, return <c>true</c> in the <paramref name="returnNow" /> output parameter.
|
|
131
140
|
Implement this method in a partial class to enable this behavior.`
|
|
132
141
|
}));
|
|
133
142
|
this.afterDeserialize = this.targetClass.addMethod(new codegen_csharp_3.PartialMethod(after, codegen_csharp_8.dotnet.Void, {
|
|
@@ -138,42 +147,4 @@ class DeserializerPartialClass extends SerializationPartialClass {
|
|
|
138
147
|
}
|
|
139
148
|
}
|
|
140
149
|
exports.DeserializerPartialClass = DeserializerPartialClass;
|
|
141
|
-
class SerializerPartialClass extends SerializationPartialClass {
|
|
142
|
-
constructor(targetClass, targetInterface, serializationType, serializationFormat, schema, resolver, objectInitializer) {
|
|
143
|
-
super(targetClass, targetInterface, serializationType, serializationFormat, schema, resolver);
|
|
144
|
-
this.serializationType = serializationType;
|
|
145
|
-
this.serializationFormat = serializationFormat;
|
|
146
|
-
this.schema = schema;
|
|
147
|
-
this.apply(objectInitializer);
|
|
148
|
-
}
|
|
149
|
-
async init() {
|
|
150
|
-
this.addPartialMethods();
|
|
151
|
-
this.addSerializer();
|
|
152
|
-
}
|
|
153
|
-
addSerializer() {
|
|
154
|
-
const serializeMethod = this.targetClass.addMethod(new codegen_csharp_3.Method(`SerializeTo${this.serializationFormat}`, this.serializationType, {
|
|
155
|
-
parameters: [this.refContainerParameter],
|
|
156
|
-
description: `Serializes this instance of ${this.thisCref} into a ${this.typeCref}.`,
|
|
157
|
-
returnsDescription: `a serialized instance of ${this.thisCref} /> as a ${this.typeCref}.`
|
|
158
|
-
}));
|
|
159
|
-
}
|
|
160
|
-
addPartialMethods() {
|
|
161
|
-
const before = `BeforeSerialize${this.serializationFormat}`;
|
|
162
|
-
const after = `AfterSerialize${this.serializationFormat}`;
|
|
163
|
-
// add partial methods for future customization
|
|
164
|
-
this.beforeSerialize = this.targetClass.addMethod(new codegen_csharp_3.PartialMethod(before, codegen_csharp_8.dotnet.Void, {
|
|
165
|
-
access: codegen_csharp_1.Access.Default,
|
|
166
|
-
parameters: [this.refContainerParameter, this.returnNowParameter],
|
|
167
|
-
description: `<c>${before}</c> will be called before the serialization has commenced, allowing complete customization of the object before it is serialized.
|
|
168
|
-
If you wish to disable the default serialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
|
|
169
|
-
Implement this method in a partial class to enable this behavior.`
|
|
170
|
-
}));
|
|
171
|
-
this.afterSerialize = this.targetClass.addMethod(new codegen_csharp_3.PartialMethod(after, codegen_csharp_8.dotnet.Void, {
|
|
172
|
-
access: codegen_csharp_1.Access.Default,
|
|
173
|
-
parameters: [this.refContainerParameter],
|
|
174
|
-
description: `<c>${after}</c> will be called after the serialization has finished, allowing customization of the ${this.typeCref} before it is returned. Implement this method in a partial class to enable this behavior `
|
|
175
|
-
}));
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
exports.SerializerPartialClass = SerializerPartialClass;
|
|
179
150
|
//# sourceMappingURL=model-class-serializer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-class-serializer.js","sourceRoot":"","sources":["../../../llcsharp/model/model-class-serializer.ts"],"names":[],"mappings":";;AAKA,kDAAqE;AACrE,4CAAmD;AAEnD,gEAAyJ;AAEzJ,gEAA0D;AAE1D,gEAAoE;AAEpE,gEAAwD;AACxD,gEAAgE;AAEhE,gEAA+D;AAC/D,gEAAqD;AAMrD,gEAAqD;
|
|
1
|
+
{"version":3,"file":"model-class-serializer.js","sourceRoot":"","sources":["../../../llcsharp/model/model-class-serializer.ts"],"names":[],"mappings":";;AAKA,kDAAqE;AACrE,4CAAmD;AAEnD,gEAAyJ;AAEzJ,gEAA0D;AAE1D,gEAAoE;AAEpE,gEAAwD;AACxD,gEAAgE;AAEhE,gEAA+D;AAC/D,gEAAqD;AAMrD,gEAAqD;AAMrD,sDAAyG;AAEzG,+CAAuD;AAIvD,MAAa,yBAA0B,SAAQ,qBAAW;IACxD,YAAsB,WAAkB,EAAY,eAAgC,EAAY,iBAAkC,EAAY,mBAA2B,EAAY,MAAiB,EAAY,QAAiE,EAAE,iBAA0D;QAC7U,KAAK,EAAE,CAAC;QADY,gBAAW,GAAX,WAAW,CAAO;QAAY,oBAAe,GAAf,eAAe,CAAiB;QAAY,sBAAiB,GAAjB,iBAAiB,CAAiB;QAAY,wBAAmB,GAAnB,mBAAmB,CAAQ;QAAY,WAAM,GAAN,MAAM,CAAW;QAAY,aAAQ,GAAR,QAAQ,CAAyD;QAkBzQ,qBAAgB,GAAG,IAAI,0BAAS,CAAC,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,EAAE,WAAW,EAAE,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,+BAA+B,EAAE,CAAC,CAAC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,MAAM,MAAM,GAAG,oBAAoB,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC9D,MAAM,KAAK,GAAG,mBAAmB,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC5D,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,8BAAa,CAAC,MAAM,EAAE,uBAAM,CAAC,IAAI,EAAE;YACzF,MAAM,EAAE,uBAAM,CAAC,OAAO;YACtB,UAAU,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,kBAAkB,CAAC;YAC5D,WAAW,EAAE,MAAM,MAAM;;wEAEyC;SACnE,CAAC,CAAC,CAAC;QAEJ,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,8BAAa,CAAC,KAAK,EAAE,uBAAM,CAAC,IAAI,EAAE;YACvF,MAAM,EAAE,uBAAM,CAAC,OAAO;YACtB,UAAU,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC;YACnC,WAAW,EAAE,MAAM,KAAK,2LAA2L;SACpN,CAAC,CAAC,CAAC;IACN,CAAC;CACF;AA7GD,4DA6GC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { KnownMediaType
|
|
1
|
+
import { KnownMediaType } from '@azure-tools/codemodel-v3';
|
|
2
2
|
import { DeepPartial } from '@azure-tools/codegen';
|
|
3
3
|
import { Class, Expression, ExpressionOrLiteral, Field, Namespace, OneOrMoreStatements, TypeDeclaration, Variable } from '@azure-tools/codegen-csharp';
|
|
4
4
|
import { State } from '../generator';
|
|
5
5
|
import { EnhancedTypeDeclaration } from '../schema/extended-type-declaration';
|
|
6
6
|
import { ObjectImplementation } from '../schema/object';
|
|
7
7
|
import { ModelProperty } from './property';
|
|
8
|
-
import {
|
|
9
|
-
|
|
8
|
+
import { ObjectSchema } from '@azure-tools/codemodel';
|
|
9
|
+
import { VirtualProperty as NewVirtualProperty } from '../../utils/schema';
|
|
10
|
+
export declare function getVirtualPropertyName(vp?: NewVirtualProperty): string;
|
|
10
11
|
export interface BackingField {
|
|
11
12
|
field: Field;
|
|
12
13
|
typeDeclaration: TypeDeclaration;
|
|
@@ -29,7 +30,7 @@ export declare class ModelClass extends Class implements EnhancedTypeDeclaration
|
|
|
29
30
|
isNullable: boolean;
|
|
30
31
|
get isRequired(): boolean;
|
|
31
32
|
isPolymorphic: boolean;
|
|
32
|
-
get schema():
|
|
33
|
+
get schema(): ObjectSchema;
|
|
33
34
|
private readonly validationStatements;
|
|
34
35
|
ownedProperties: ModelProperty[];
|
|
35
36
|
private pMap;
|
|
@@ -37,11 +38,13 @@ export declare class ModelClass extends Class implements EnhancedTypeDeclaration
|
|
|
37
38
|
private nested;
|
|
38
39
|
private accessor;
|
|
39
40
|
private createProperties;
|
|
41
|
+
private addFormatAttributesToProperty;
|
|
40
42
|
private addValidation;
|
|
41
43
|
private additionalPropertiesType;
|
|
42
44
|
private handleAllOf;
|
|
43
45
|
private handleDiscriminator;
|
|
44
46
|
private addHeaderDeserializer;
|
|
47
|
+
private appendResourceGroupName;
|
|
45
48
|
validateValue(eventListener: Variable, property: Variable): OneOrMoreStatements;
|
|
46
49
|
validatePresence(eventListener: Variable, property: Variable): OneOrMoreStatements;
|
|
47
50
|
addDiscriminator(discriminatorValue: string, modelClass: ModelClass): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-class.d.ts","sourceRoot":"","sources":["../../../llcsharp/model/model-class.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsC,cAAc,
|
|
1
|
+
{"version":3,"file":"model-class.d.ts","sourceRoot":"","sources":["../../../llcsharp/model/model-class.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsC,cAAc,EAA4C,MAAM,2BAA2B,CAAC;AACzI,OAAO,EAA+C,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEhG,OAAO,EAAU,KAAK,EAAe,UAAU,EAAE,mBAAmB,EAAE,KAAK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