@autorest/powershell 4.0.0-dev.8 → 4.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 +214 -206
- package/.rush/temp/shrinkwrap-deps.json +253 -280
- package/autorest-configuration-for-sdk.md +9 -3
- package/autorest-configuration.md +1 -1
- package/dist/cmdlets/class.d.ts +27 -2
- package/dist/cmdlets/class.d.ts.map +1 -1
- package/dist/cmdlets/class.js +913 -549
- package/dist/cmdlets/class.js.map +1 -1
- package/dist/cmdlets/namespace.d.ts.map +1 -1
- package/dist/cmdlets/namespace.js +39 -5
- package/dist/cmdlets/namespace.js.map +1 -1
- package/dist/enums/namespace.js +5 -5
- package/dist/enums/namespace.js.map +1 -1
- package/dist/exports.d.ts +3 -0
- package/dist/exports.d.ts.map +1 -0
- package/dist/exports.js +19 -0
- package/dist/exports.js.map +1 -0
- package/dist/generators/gitignore.d.ts.map +1 -1
- package/dist/generators/gitignore.js +2 -0
- package/dist/generators/gitignore.js.map +1 -1
- package/dist/generators/psm1.custom.js +2 -2
- package/dist/generators/psm1.custom.js.map +1 -1
- package/dist/generators/psm1.d.ts.map +1 -1
- package/dist/generators/psm1.internal.js +2 -2
- package/dist/generators/psm1.internal.js.map +1 -1
- package/dist/generators/psm1.js +17 -11
- package/dist/generators/psm1.js.map +1 -1
- package/dist/generators/readme.d.ts.map +1 -1
- package/dist/generators/readme.js +0 -3
- package/dist/generators/readme.js.map +1 -1
- package/dist/generators/script-cmdlet.js +18 -18
- package/dist/generators/script-cmdlet.js.map +1 -1
- package/dist/internal/name-inferrer.d.ts +1 -1
- package/dist/internal/name-inferrer.d.ts.map +1 -1
- package/dist/internal/name-inferrer.js +12 -12
- package/dist/internal/name-inferrer.js.map +1 -1
- package/dist/internal/powershell-declarations.d.ts +3 -0
- package/dist/internal/powershell-declarations.d.ts.map +1 -1
- package/dist/internal/powershell-declarations.js +5 -2
- package/dist/internal/powershell-declarations.js.map +1 -1
- package/dist/internal/project.d.ts +14 -8
- package/dist/internal/project.d.ts.map +1 -1
- package/dist/internal/project.js +27 -20
- 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.map +1 -1
- package/dist/llcsharp/clientruntime.d.ts +1 -0
- package/dist/llcsharp/clientruntime.d.ts.map +1 -1
- package/dist/llcsharp/clientruntime.js +12 -11
- package/dist/llcsharp/clientruntime.js.map +1 -1
- package/dist/llcsharp/code-model.d.ts +7 -7
- package/dist/llcsharp/code-model.d.ts.map +1 -1
- package/dist/llcsharp/enums/enum.d.ts +1 -1
- package/dist/llcsharp/enums/enum.d.ts.map +1 -1
- package/dist/llcsharp/enums/enum.js +42 -42
- package/dist/llcsharp/enums/enum.js.map +1 -1
- package/dist/llcsharp/exports.js +5 -1
- package/dist/llcsharp/exports.js.map +1 -1
- package/dist/llcsharp/generator.d.ts +3 -2
- package/dist/llcsharp/generator.d.ts.map +1 -1
- package/dist/llcsharp/generator.js.map +1 -1
- package/dist/llcsharp/model/idictionary.js +16 -16
- package/dist/llcsharp/model/idictionary.js.map +1 -1
- package/dist/llcsharp/model/interface.d.ts +1 -1
- package/dist/llcsharp/model/interface.d.ts.map +1 -1
- package/dist/llcsharp/model/interface.js +25 -11
- package/dist/llcsharp/model/interface.js.map +1 -1
- package/dist/llcsharp/model/model-class-dictionary.js +18 -18
- package/dist/llcsharp/model/model-class-dictionary.js.map +1 -1
- package/dist/llcsharp/model/model-class-json.js +20 -20
- package/dist/llcsharp/model/model-class-json.js.map +1 -1
- package/dist/llcsharp/model/model-class-serializer.d.ts +1 -1
- package/dist/llcsharp/model/model-class-serializer.d.ts.map +1 -1
- package/dist/llcsharp/model/model-class-serializer.js +6 -6
- package/dist/llcsharp/model/model-class-serializer.js.map +1 -1
- package/dist/llcsharp/model/model-class.d.ts +1 -1
- package/dist/llcsharp/model/model-class.d.ts.map +1 -1
- package/dist/llcsharp/model/model-class.js +108 -97
- package/dist/llcsharp/model/model-class.js.map +1 -1
- package/dist/llcsharp/model/namespace.d.ts +1 -1
- package/dist/llcsharp/model/namespace.d.ts.map +1 -1
- package/dist/llcsharp/model/namespace.js +4 -12
- package/dist/llcsharp/model/namespace.js.map +1 -1
- package/dist/llcsharp/model/property.d.ts +1 -1
- package/dist/llcsharp/model/property.d.ts.map +1 -1
- package/dist/llcsharp/model/property.js +20 -20
- 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 +26 -1
- package/dist/llcsharp/operation/api-class.js.map +1 -1
- package/dist/llcsharp/operation/method.d.ts +10 -5
- package/dist/llcsharp/operation/method.d.ts.map +1 -1
- package/dist/llcsharp/operation/method.js +287 -134
- package/dist/llcsharp/operation/method.js.map +1 -1
- package/dist/llcsharp/operation/parameter.d.ts +1 -1
- package/dist/llcsharp/operation/parameter.d.ts.map +1 -1
- package/dist/llcsharp/operation/parameter.js +10 -10
- package/dist/llcsharp/operation/parameter.js.map +1 -1
- package/dist/llcsharp/project.d.ts +10 -5
- package/dist/llcsharp/project.d.ts.map +1 -1
- package/dist/llcsharp/project.js +15 -4
- package/dist/llcsharp/project.js.map +1 -1
- package/dist/llcsharp/schema/Uuid.d.ts +1 -1
- package/dist/llcsharp/schema/Uuid.d.ts.map +1 -1
- package/dist/llcsharp/schema/Uuid.js +2 -2
- package/dist/llcsharp/schema/Uuid.js.map +1 -1
- package/dist/llcsharp/schema/array.d.ts +1 -1
- package/dist/llcsharp/schema/array.d.ts.map +1 -1
- package/dist/llcsharp/schema/array.js +45 -43
- package/dist/llcsharp/schema/array.js.map +1 -1
- package/dist/llcsharp/schema/binary.d.ts +1 -1
- package/dist/llcsharp/schema/binary.d.ts.map +1 -1
- package/dist/llcsharp/schema/binary.js +9 -9
- package/dist/llcsharp/schema/binary.js.map +1 -1
- package/dist/llcsharp/schema/boolean.d.ts +1 -1
- package/dist/llcsharp/schema/boolean.d.ts.map +1 -1
- package/dist/llcsharp/schema/byte-array.d.ts +1 -1
- package/dist/llcsharp/schema/byte-array.d.ts.map +1 -1
- package/dist/llcsharp/schema/byte-array.js +24 -24
- package/dist/llcsharp/schema/byte-array.js.map +1 -1
- package/dist/llcsharp/schema/char.d.ts +1 -1
- package/dist/llcsharp/schema/char.d.ts.map +1 -1
- package/dist/llcsharp/schema/char.js +1 -1
- package/dist/llcsharp/schema/char.js.map +1 -1
- package/dist/llcsharp/schema/date-time.d.ts +1 -1
- package/dist/llcsharp/schema/date-time.d.ts.map +1 -1
- package/dist/llcsharp/schema/date-time.js +45 -41
- package/dist/llcsharp/schema/date-time.js.map +1 -1
- package/dist/llcsharp/schema/date.d.ts +1 -1
- package/dist/llcsharp/schema/date.d.ts.map +1 -1
- package/dist/llcsharp/schema/duration.d.ts +1 -1
- package/dist/llcsharp/schema/duration.d.ts.map +1 -1
- package/dist/llcsharp/schema/duration.js +9 -7
- package/dist/llcsharp/schema/duration.js.map +1 -1
- package/dist/llcsharp/schema/enum.d.ts +6 -2
- package/dist/llcsharp/schema/enum.d.ts.map +1 -1
- package/dist/llcsharp/schema/enum.js +13 -4
- package/dist/llcsharp/schema/enum.js.map +1 -1
- package/dist/llcsharp/schema/extended-type-declaration.d.ts +1 -1
- package/dist/llcsharp/schema/extended-type-declaration.d.ts.map +1 -1
- package/dist/llcsharp/schema/fixed-array.d.ts +1 -1
- package/dist/llcsharp/schema/fixed-array.d.ts.map +1 -1
- package/dist/llcsharp/schema/fixed-array.js +44 -42
- package/dist/llcsharp/schema/fixed-array.js.map +1 -1
- package/dist/llcsharp/schema/integer.d.ts +1 -1
- package/dist/llcsharp/schema/integer.d.ts.map +1 -1
- package/dist/llcsharp/schema/integer.js +5 -5
- package/dist/llcsharp/schema/integer.js.map +1 -1
- package/dist/llcsharp/schema/object.d.ts +1 -1
- package/dist/llcsharp/schema/object.d.ts.map +1 -1
- package/dist/llcsharp/schema/object.js +28 -28
- package/dist/llcsharp/schema/object.js.map +1 -1
- package/dist/llcsharp/schema/password.d.ts +1 -1
- package/dist/llcsharp/schema/password.d.ts.map +1 -1
- package/dist/llcsharp/schema/password.js +13 -13
- package/dist/llcsharp/schema/password.js.map +1 -1
- package/dist/llcsharp/schema/primitive.d.ts +1 -1
- package/dist/llcsharp/schema/primitive.d.ts.map +1 -1
- package/dist/llcsharp/schema/primitive.js +40 -37
- package/dist/llcsharp/schema/primitive.js.map +1 -1
- package/dist/llcsharp/schema/schema-resolver.d.ts +1 -1
- package/dist/llcsharp/schema/schema-resolver.d.ts.map +1 -1
- package/dist/llcsharp/schema/schema-resolver.js +5 -9
- package/dist/llcsharp/schema/schema-resolver.js.map +1 -1
- package/dist/llcsharp/schema/string.d.ts +1 -1
- package/dist/llcsharp/schema/string.d.ts.map +1 -1
- package/dist/llcsharp/schema/string.js +48 -44
- package/dist/llcsharp/schema/string.js.map +1 -1
- package/dist/llcsharp/schema/uri.d.ts +1 -1
- package/dist/llcsharp/schema/uri.d.ts.map +1 -1
- package/dist/llcsharp/schema/uri.js +2 -2
- package/dist/llcsharp/schema/uri.js.map +1 -1
- package/dist/llcsharp/validations.js +2 -2
- package/dist/llcsharp/validations.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +5 -2
- package/dist/main.js.map +1 -1
- package/dist/models/model-extensions.d.ts +1 -1
- package/dist/models/model-extensions.d.ts.map +1 -1
- package/dist/models/model-extensions.js +39 -39
- package/dist/models/model-extensions.js.map +1 -1
- package/dist/module/module-class.d.ts.map +1 -1
- package/dist/module/module-class.js +45 -15
- package/dist/module/module-class.js.map +1 -1
- package/dist/module/module-namespace.js +3 -3
- package/dist/module/module-namespace.js.map +1 -1
- package/dist/plugins/add-azure-completers-v2.d.ts +6 -1
- package/dist/plugins/add-azure-completers-v2.d.ts.map +1 -1
- package/dist/plugins/add-azure-completers-v2.js +5 -4
- package/dist/plugins/add-azure-completers-v2.js.map +1 -1
- package/dist/plugins/create-commands-v2.d.ts +17 -7
- package/dist/plugins/create-commands-v2.d.ts.map +1 -1
- package/dist/plugins/create-commands-v2.js +302 -66
- package/dist/plugins/create-commands-v2.js.map +1 -1
- package/dist/plugins/cs-namer-v2.d.ts +6 -1
- package/dist/plugins/cs-namer-v2.d.ts.map +1 -1
- package/dist/plugins/cs-namer-v2.js +42 -41
- package/dist/plugins/cs-namer-v2.js.map +1 -1
- package/dist/plugins/llcsharp-v2.d.ts +5 -2
- package/dist/plugins/llcsharp-v2.d.ts.map +1 -1
- package/dist/plugins/llcsharp-v2.js +14 -9
- package/dist/plugins/llcsharp-v2.js.map +1 -1
- package/dist/plugins/modifiers-v2.d.ts +6 -1
- package/dist/plugins/modifiers-v2.d.ts.map +1 -1
- package/dist/plugins/modifiers-v2.js +135 -88
- package/dist/plugins/modifiers-v2.js.map +1 -1
- package/dist/plugins/plugin-create-inline-properties.d.ts +6 -1
- package/dist/plugins/plugin-create-inline-properties.d.ts.map +1 -1
- package/dist/plugins/plugin-create-inline-properties.js +44 -32
- package/dist/plugins/plugin-create-inline-properties.js.map +1 -1
- package/dist/plugins/plugin-tweak-m4-model.d.ts +7 -1
- package/dist/plugins/plugin-tweak-m4-model.d.ts.map +1 -1
- package/dist/plugins/plugin-tweak-m4-model.js +39 -10
- package/dist/plugins/plugin-tweak-m4-model.js.map +1 -1
- package/dist/plugins/plugin-tweak-model-azure-v2.d.ts +6 -1
- package/dist/plugins/plugin-tweak-model-azure-v2.d.ts.map +1 -1
- package/dist/plugins/plugin-tweak-model-azure-v2.js +32 -22
- package/dist/plugins/plugin-tweak-model-azure-v2.js.map +1 -1
- package/dist/plugins/plugin-tweak-model.d.ts +6 -1
- package/dist/plugins/plugin-tweak-model.d.ts.map +1 -1
- package/dist/plugins/plugin-tweak-model.js +33 -32
- package/dist/plugins/plugin-tweak-model.js.map +1 -1
- package/dist/plugins/powershell-v2.d.ts +5 -2
- package/dist/plugins/powershell-v2.d.ts.map +1 -1
- package/dist/plugins/powershell-v2.js +32 -28
- package/dist/plugins/powershell-v2.js.map +1 -1
- package/dist/plugins/ps-namer-v2.d.ts +6 -1
- package/dist/plugins/ps-namer-v2.d.ts.map +1 -1
- package/dist/plugins/ps-namer-v2.js +33 -32
- package/dist/plugins/ps-namer-v2.js.map +1 -1
- package/dist/plugins/sdk-create-inline-properties.d.ts +1 -1
- package/dist/plugins/sdk-create-inline-properties.d.ts.map +1 -1
- package/dist/plugins/sdk-create-inline-properties.js +129 -39
- package/dist/plugins/sdk-create-inline-properties.js.map +1 -1
- package/dist/plugins/sdk-cs-namer.d.ts +1 -1
- package/dist/plugins/sdk-cs-namer.d.ts.map +1 -1
- package/dist/plugins/sdk-cs-namer.js +59 -34
- package/dist/plugins/sdk-cs-namer.js.map +1 -1
- package/dist/plugins/sdk-cs-simplifier.d.ts +1 -1
- package/dist/plugins/sdk-cs-simplifier.d.ts.map +1 -1
- package/dist/plugins/sdk-cs-simplifier.js +3 -3
- package/dist/plugins/sdk-cs-simplifier.js.map +1 -1
- package/dist/plugins/sdk-generate.d.ts +1 -1
- package/dist/plugins/sdk-generate.d.ts.map +1 -1
- package/dist/plugins/sdk-generate.js +23 -18
- package/dist/plugins/sdk-generate.js.map +1 -1
- package/dist/plugins/sdk-modifiers.d.ts +4 -0
- package/dist/plugins/sdk-modifiers.d.ts.map +1 -0
- package/dist/plugins/sdk-modifiers.js +175 -0
- package/dist/plugins/sdk-modifiers.js.map +1 -0
- package/dist/plugins/sdk-tweak-model.d.ts +1 -1
- package/dist/plugins/sdk-tweak-model.d.ts.map +1 -1
- package/dist/plugins/sdk-tweak-model.js +140 -44
- package/dist/plugins/sdk-tweak-model.js.map +1 -1
- package/dist/sdk/project.d.ts +2 -2
- package/dist/sdk/project.d.ts.map +1 -1
- package/dist/sdk/project.js +10 -9
- package/dist/sdk/project.js.map +1 -1
- package/dist/sdk/state.d.ts +2 -2
- package/dist/sdk/state.d.ts.map +1 -1
- package/dist/sdk/utility.d.ts +12 -3
- package/dist/sdk/utility.d.ts.map +1 -1
- package/dist/sdk/utility.js +122 -30
- package/dist/sdk/utility.js.map +1 -1
- package/dist/utils/PwshModel.d.ts +1 -1
- package/dist/utils/PwshModel.d.ts.map +1 -1
- package/dist/utils/PwshModel.js +1 -1
- package/dist/utils/PwshModel.js.map +1 -1
- package/dist/utils/SdkModel.d.ts +1 -1
- package/dist/utils/SdkModel.d.ts.map +1 -1
- package/dist/utils/SdkModel.js +1 -1
- package/dist/utils/SdkModel.js.map +1 -1
- package/dist/utils/command-operation.d.ts +11 -3
- package/dist/utils/command-operation.d.ts.map +1 -1
- package/dist/utils/command-operation.js +26 -4
- package/dist/utils/command-operation.js.map +1 -1
- package/dist/utils/components.d.ts +1 -1
- package/dist/utils/components.d.ts.map +1 -1
- package/dist/utils/components.js +2 -2
- package/dist/utils/components.js.map +1 -1
- package/dist/utils/http-operation.d.ts +2 -0
- package/dist/utils/http-operation.d.ts.map +1 -1
- package/dist/utils/http-operation.js +16 -12
- package/dist/utils/http-operation.js.map +1 -1
- package/dist/utils/model-state.d.ts +7 -5
- package/dist/utils/model-state.d.ts.map +1 -1
- package/dist/utils/model-state.js +28 -20
- package/dist/utils/model-state.js.map +1 -1
- package/dist/utils/programatic-operation.d.ts +1 -1
- package/dist/utils/programatic-operation.d.ts.map +1 -1
- package/dist/utils/programatic-operation.js +1 -1
- package/dist/utils/programatic-operation.js.map +1 -1
- package/dist/utils/resolve-conflicts.js +8 -8
- package/dist/utils/resolve-conflicts.js.map +1 -1
- package/dist/utils/resourceName.d.ts +3 -0
- package/dist/utils/resourceName.d.ts.map +1 -0
- package/dist/utils/resourceName.js +29 -0
- package/dist/utils/resourceName.js.map +1 -0
- package/dist/utils/schema.d.ts +1 -1
- package/dist/utils/schema.d.ts.map +1 -1
- package/dist/utils/schema.js +11 -11
- package/dist/utils/schema.js.map +1 -1
- package/dist/utils/security-scheme.d.ts +2 -2
- package/dist/utils/security-scheme.d.ts.map +1 -1
- package/dist/utils/security-scheme.js +2 -2
- package/dist/utils/security-scheme.js.map +1 -1
- package/dist/utils/sort-parameters.d.ts +3 -0
- package/dist/utils/sort-parameters.d.ts.map +1 -0
- package/dist/utils/sort-parameters.js +33 -0
- package/dist/utils/sort-parameters.js.map +1 -0
- package/dist/utils/tsp-generator.d.ts +3 -0
- package/dist/utils/tsp-generator.d.ts.map +1 -0
- package/dist/utils/tsp-generator.js +65 -0
- package/dist/utils/tsp-generator.js.map +1 -0
- package/dist/utils/tsp-host.d.ts +42 -0
- package/dist/utils/tsp-host.d.ts.map +1 -0
- package/dist/utils/tsp-host.js +56 -0
- package/dist/utils/tsp-host.js.map +1 -0
- package/generators/readme.ts +0 -3
- package/package.json +11 -10
- package/resources/assets/build-module.ps1 +31 -4
- package/resources/assets/check-dependencies.ps1 +3 -3
- package/resources/assets/create-model-cmdlets.ps1 +34 -5
- package/resources/assets/export-surface.ps1 +3 -3
- package/resources/assets/generate-help.ps1 +5 -5
- package/resources/assets/generate-portal-ux.ps1 +9 -25
- package/resources/assets/run-module.ps1 +4 -4
- package/resources/assets/test/loadEnv.ps1 +1 -1
- package/resources/assets/test-module.ps1 +11 -7
- package/resources/assets/tools/Resources/README.md +0 -3
- package/resources/assets/tools/Resources/custom/New-AzDeployment.ps1 +2 -2
- package/resources/assets/tools/Resources/how-to.md +2 -0
- package/resources/built-time-cmdlets.csproj +1 -0
- package/resources/modules/Az.Accounts/2.13.1/Accounts.format.ps1xml +554 -0
- package/resources/modules/Az.Accounts/2.13.1/Accounts.generated.format.ps1xml +471 -0
- package/resources/modules/Az.Accounts/2.13.1/Accounts.types.ps1xml +306 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Az.Accounts.nuspec +4 -5
- package/resources/modules/Az.Accounts/2.13.1/Az.Accounts.psd1 +389 -0
- package/resources/modules/Az.Accounts/2.13.1/Az.Accounts.psm1 +365 -0
- package/resources/modules/Az.Accounts/2.13.1/FuzzySharp.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.ApplicationInsights.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.AssemblyLoading.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Aks.dll +0 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Authorization.dll +0 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Compute.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll +0 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.KeyVault.dll +0 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Monitor.dll +0 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Network.dll +0 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll +0 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll +0 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Websites.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll +0 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml +2510 -779
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Common.Share.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Common.dll +0 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Storage.dll +0 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Strategies.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/Microsoft.Rest.ClientRuntime.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/PostImportScripts/LoadAuthenticators.ps1 +222 -0
- package/resources/modules/Az.Accounts/2.13.1/StartupScripts/AzError.ps1 +281 -0
- package/resources/modules/Az.Accounts/2.13.1/StartupScripts/InitializeAssemblyResolver.ps1 +242 -0
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/[Content_Types].xml +2 -3
- package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/_rels/.rels +2 -2
- package/resources/modules/Az.Accounts/2.13.1/lib/netcoreapp2.1/Azure.Core.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netcoreapp2.1/Microsoft.Identity.Client.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netcoreapp3.1/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netfx/Azure.Core.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netfx/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netfx/Microsoft.Identity.Client.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netfx/Newtonsoft.Json.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netfx/System.Diagnostics.DiagnosticSource.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netfx/System.Reflection.DispatchProxy.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netfx/System.Runtime.CompilerServices.Unsafe.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Azure.Identity.BrokeredAuthentication.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Azure.Identity.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Identity.Client.Broker.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Identity.Client.NativeInterop.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.IdentityModel.Abstractions.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.AccessControl.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.Permissions.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.Principal.Windows.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime_arm64.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime_x86.dll +0 -0
- package/resources/modules/Az.Accounts/2.13.1/package/services/metadata/core-properties/f9ac9c2e40914e78a646a7b0b997403b.psmdcp +11 -0
- package/resources/psruntime/Attributes/PSArgumentCompleterAttribute.cs +52 -0
- package/resources/psruntime/BuildTime/Cmdlets/ExportHelpMarkdown.cs +4 -1
- package/resources/psruntime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +6 -3
- package/resources/psruntime/BuildTime/Cmdlets/ExportPsd1.cs +7 -4
- package/resources/psruntime/BuildTime/Cmdlets/ExportTestStub.cs +130 -81
- package/resources/psruntime/BuildTime/Cmdlets/NewAssemblyInfo.cs +64 -0
- package/resources/psruntime/BuildTime/MarkdownRenderer.cs +17 -9
- package/resources/psruntime/BuildTime/Models/PsProxyOutputs.cs +53 -8
- package/resources/psruntime/BuildTime/Models/PsProxyTypes.cs +35 -11
- package/resources/psruntime/BuildTime/PsAttributes.cs +5 -0
- package/resources/psruntime/BuildTime/PsHelpers.cs +4 -3
- package/resources/psruntime/MessageAttribute.cs +45 -55
- package/resources/psruntime/MessageAttributeHelper.cs +30 -7
- package/resources/psruntime/Properties/Resources.Designer.cs +25 -3
- package/resources/psruntime/Properties/Resources.resx +8 -2
- package/resources/runtime/csharp/pipeline/ISendAsync.cs +113 -0
- package/resources/runtime/csharp/pipeline/PipelineMocking.cs +1 -1
- package/resources/templates/azureMethod.ejs +2 -2
- package/resources/templates/azureMethodGroup.ejs +2 -2
- package/resources/templates/azureServiceClient.ejs +11 -4
- package/resources/templates/enum.ejs +3 -3
- package/resources/templates/extensionMethod.ejs +18 -12
- package/resources/templates/extensions.ejs +9 -2
- package/resources/templates/longRunningOperationMethod.ejs +10 -8
- package/resources/templates/method.ejs +10 -8
- package/resources/templates/methodBodyRestCall.ejs +77 -32
- package/resources/templates/methodGroupInterface.ejs +2 -61
- package/resources/templates/methodGroupInterfaceBody.ejs +60 -0
- package/resources/templates/model.ejs +15 -15
- package/resources/templates/serviceClientBody.ejs +8 -8
- package/resources/templates/serviceClientInterface.ejs +10 -4
- package/resources/utils/Get-SubscriptionIdTestSafe.ps1 +7 -0
- package/dist/utils/WrapComments.d.ts +0 -2
- package/dist/utils/WrapComments.d.ts.map +0 -1
- package/dist/utils/WrapComments.js +0 -46
- package/dist/utils/WrapComments.js.map +0 -1
- package/resources/modules/Az.Accounts/2.7.5/Accounts.format.ps1xml +0 -496
- package/resources/modules/Az.Accounts/2.7.5/Accounts.generated.format.ps1xml +0 -468
- package/resources/modules/Az.Accounts/2.7.5/Accounts.types.ps1xml +0 -303
- package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.psd1 +0 -387
- package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.psm1 +0 -375
- 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/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/Microsoft.ApplicationInsights.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.ResourceManager.deps.json +0 -2309
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.deps.json +0 -2273
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.deps.json +0 -1316
- 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/2.7.5/Microsoft.Azure.PowerShell.Clients.Aks.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/2.7.5/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Cmdlets.Accounts.deps.json +0 -2413
- package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll +0 -0
- 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/2.7.5/Microsoft.Rest.ClientRuntime.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PostImportScripts/LoadAuthenticators.ps1 +0 -219
- 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/2.7.5/PreloadAssemblies/Newtonsoft.Json.dll +0 -0
- package/resources/modules/Az.Accounts/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/2.7.5/PreloadAssemblies/System.Reflection.DispatchProxy.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Security.AccessControl.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Security.Permissions.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Security.Principal.Windows.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Text.Json.dll +0 -0
- package/resources/modules/Az.Accounts/2.7.5/StartupScripts/AzError.ps1 +0 -278
- package/resources/modules/Az.Accounts/2.7.5/StartupScripts/InitializeAssemblyResolver.ps1 +0 -234
- package/resources/modules/Az.Accounts/2.7.5/package/services/metadata/core-properties/1aa0749a068a4238881858013f1a5b7f.psmdcp +0 -11
- /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Hyak.Common.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.Common.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Rest.ClientRuntime.Azure.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.WindowsAzure.Storage.DataMovement.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.WindowsAzure.Storage.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/en-US/about_az.help.txt +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netfx}/System.Numerics.Vectors.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netfx}/System.Security.Cryptography.Cng.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netfx}/System.Text.Encodings.Web.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netfx}/System.Xml.ReaderWriter.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/AzSharedAlcAssemblies → 2.13.1/lib/netstandard2.0}/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.Buffers.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/AzSharedAlcAssemblies → 2.13.1/lib/netstandard2.0}/System.Memory.Data.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.Memory.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.Net.Http.WinHttpHandler.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.Private.ServiceModel.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.ServiceModel.Primitives.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/AzSharedAlcAssemblies → 2.13.1/lib/netstandard2.0}/System.Text.Json.dll +0 -0
- /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.Threading.Tasks.Extensions.dll +0 -0
|
@@ -11,7 +11,7 @@ const codegen_csharp_5 = require("@azure-tools/codegen-csharp");
|
|
|
11
11
|
const codegen_csharp_6 = require("@azure-tools/codegen-csharp");
|
|
12
12
|
const codegen_csharp_7 = require("@azure-tools/codegen-csharp");
|
|
13
13
|
const codegen_csharp_8 = require("@azure-tools/codegen-csharp");
|
|
14
|
-
const codemodel_1 = require("@
|
|
14
|
+
const codemodel_1 = require("@autorest/codemodel");
|
|
15
15
|
const model_class_1 = require("./model-class");
|
|
16
16
|
class SerializationPartialClass extends codegen_1.Initializer {
|
|
17
17
|
constructor(targetClass, targetInterface, serializationType, serializationFormat, schema, resolver, objectInitializer) {
|
|
@@ -38,7 +38,7 @@ class SerializationPartialClass extends codegen_1.Initializer {
|
|
|
38
38
|
get allVirtualProperties() {
|
|
39
39
|
const vp = this.virtualProperties;
|
|
40
40
|
// return [...vp.owned, ...vp.inherited, ...vp.inlined];
|
|
41
|
-
return linq_1.values(vp.owned, vp.inherited, vp.inlined).toArray();
|
|
41
|
+
return (0, linq_1.values)(vp.owned, vp.inherited, vp.inlined).toArray();
|
|
42
42
|
}
|
|
43
43
|
get typeCref() {
|
|
44
44
|
return `<see cref="${this.serializationType.declaration}" />`;
|
|
@@ -75,7 +75,7 @@ class DeserializerPartialClass extends SerializationPartialClass {
|
|
|
75
75
|
const returnNow = new codegen_csharp_1.LocalVariable('returnNow', codegen_csharp_8.dotnet.Bool, { initializer: codegen_csharp_8.dotnet.False });
|
|
76
76
|
yield returnNow.declarationStatement;
|
|
77
77
|
yield `${$this.beforeDeserialize.name}(${$this.contentParameter}, ref ${returnNow.value});`;
|
|
78
|
-
yield codegen_csharp_6.If(returnNow, 'return;');
|
|
78
|
+
yield (0, codegen_csharp_6.If)(returnNow, 'return;');
|
|
79
79
|
yield $this.deserializeStatements;
|
|
80
80
|
if ($this.hasAadditionalProperties($this.schema)) {
|
|
81
81
|
// this type has an additional properties dictionary
|
|
@@ -109,13 +109,13 @@ class DeserializerPartialClass extends SerializationPartialClass {
|
|
|
109
109
|
return function* () {
|
|
110
110
|
var _a;
|
|
111
111
|
yield '// actually deserialize ';
|
|
112
|
-
for (const virtualProperty of linq_1.values($this.allVirtualProperties)) {
|
|
112
|
+
for (const virtualProperty of (0, linq_1.values)($this.allVirtualProperties)) {
|
|
113
113
|
// yield `// deserialize ${virtualProperty.name} from ${$this.serializationFormat}`;
|
|
114
114
|
const type = $this.resolver(virtualProperty.property.schema, virtualProperty.property.language.default.required);
|
|
115
115
|
const cvt = type.convertObjectMethod;
|
|
116
116
|
const t = `((${(_a = virtualProperty.originalContainingSchema.language.csharp) === null || _a === void 0 ? void 0 : _a.fullInternalInterfaceName})this)`;
|
|
117
117
|
const tt = type ? `(${type.declaration})` : '';
|
|
118
|
-
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});`);
|
|
118
|
+
yield (0, codegen_csharp_6.If)(`content.Contains("${(0, model_class_1.getVirtualPropertyName)(virtualProperty)}")`, `${t}.${(0, model_class_1.getVirtualPropertyName)(virtualProperty)} = ${tt} ${$this.contentParameter}.GetValueForProperty("${(0, model_class_1.getVirtualPropertyName)(virtualProperty)}",${t}.${(0, model_class_1.getVirtualPropertyName)(virtualProperty)}, ${cvt});`);
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
}
|
|
@@ -127,7 +127,7 @@ class DeserializerPartialClass extends SerializationPartialClass {
|
|
|
127
127
|
returnsDescription: `an instance of ${this.interfaceCref}.`
|
|
128
128
|
}));
|
|
129
129
|
deserialzeMethod.add(function* () {
|
|
130
|
-
yield codegen_csharp_7.Return($this.targetClass.new($this.contentParameter));
|
|
130
|
+
yield (0, codegen_csharp_7.Return)($this.targetClass.new($this.contentParameter));
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
addPartialMethods() {
|
|
@@ -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;AAMrD,
|
|
1
|
+
{"version":3,"file":"model-class-serializer.js","sourceRoot":"","sources":["../../../llcsharp/model/model-class-serializer.ts"],"names":[],"mappings":";;;AAKA,kDAAqE;AACrE,4CAA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,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"}
|
|
@@ -5,7 +5,7 @@ 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 { ObjectSchema } from '@
|
|
8
|
+
import { ObjectSchema } from '@autorest/codemodel';
|
|
9
9
|
import { VirtualProperty as NewVirtualProperty } from '../../utils/schema';
|
|
10
10
|
export declare function getVirtualPropertyName(vp?: NewVirtualProperty): string;
|
|
11
11
|
export interface BackingField {
|
|
@@ -1 +1 @@
|
|
|
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,EAAwB,SAAS,EAAE,mBAAmB,EAAiC,eAAe,EAAW,QAAQ,EAAmG,MAAM,6BAA6B,CAAC;AAE3U,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,EAAwD,YAAY,EAAoB,MAAM,
|
|
1
|
+
{"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AAuB;IA0CxB,aAAa,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,GAAG,mBAAmB;IAG/E,gBAAgB,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,GAAG,mBAAmB;IAIlF,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;CAQ3E"}
|
|
@@ -15,7 +15,7 @@ const model_class_json_1 = require("./model-class-json");
|
|
|
15
15
|
const property_1 = require("./property");
|
|
16
16
|
const csharp_declarations_1 = require("../csharp-declarations");
|
|
17
17
|
const model_class_dictionary_1 = require("./model-class-dictionary");
|
|
18
|
-
const codemodel_1 = require("@
|
|
18
|
+
const codemodel_1 = require("@autorest/codemodel");
|
|
19
19
|
const schema_1 = require("../../utils/schema");
|
|
20
20
|
function getVirtualPropertyName(vp) {
|
|
21
21
|
var _a;
|
|
@@ -26,6 +26,45 @@ function getVirtualPropertyName(vp) {
|
|
|
26
26
|
}
|
|
27
27
|
exports.getVirtualPropertyName = getVirtualPropertyName;
|
|
28
28
|
class ModelClass extends codegen_csharp_1.Class {
|
|
29
|
+
deserializeFromContainerMember(mediaType, container, serializedName, defaultValue) {
|
|
30
|
+
return this.featureImplementation.deserializeFromContainerMember(mediaType, container, serializedName, defaultValue);
|
|
31
|
+
}
|
|
32
|
+
deserializeFromNode(mediaType, node, defaultValue) {
|
|
33
|
+
return this.featureImplementation.deserializeFromNode(mediaType, node, defaultValue);
|
|
34
|
+
}
|
|
35
|
+
serializeToNode(mediaType, value, serializedName, mode) {
|
|
36
|
+
return this.featureImplementation.serializeToNode(mediaType, value, serializedName, mode);
|
|
37
|
+
}
|
|
38
|
+
get defaultOfType() {
|
|
39
|
+
return (0, codegen_csharp_1.toExpression)('null /* model class */');
|
|
40
|
+
}
|
|
41
|
+
get convertObjectMethod() {
|
|
42
|
+
return this.featureImplementation.convertObjectMethod;
|
|
43
|
+
}
|
|
44
|
+
/** emits an expression serialize this to a HttpContent */
|
|
45
|
+
serializeToContent(mediaType, value, mode) {
|
|
46
|
+
return this.featureImplementation.serializeToContent(mediaType, value, mode);
|
|
47
|
+
}
|
|
48
|
+
/** emits an expression to deserialize content from a string */
|
|
49
|
+
deserializeFromString(mediaType, content, defaultValue) {
|
|
50
|
+
return this.featureImplementation.deserializeFromString(mediaType, content, defaultValue);
|
|
51
|
+
}
|
|
52
|
+
/** emits an expression to deserialize content from a content/response */
|
|
53
|
+
deserializeFromResponse(mediaType, content, defaultValue) {
|
|
54
|
+
return this.featureImplementation.deserializeFromResponse(mediaType, content, defaultValue);
|
|
55
|
+
}
|
|
56
|
+
serializeToContainerMember(mediaType, value, container, serializedName, mode) {
|
|
57
|
+
return this.featureImplementation.serializeToContainerMember(mediaType, value, container, serializedName, mode);
|
|
58
|
+
}
|
|
59
|
+
get isXmlAttribute() {
|
|
60
|
+
return this.featureImplementation.isXmlAttribute;
|
|
61
|
+
}
|
|
62
|
+
get isRequired() {
|
|
63
|
+
return this.featureImplementation.isRequired;
|
|
64
|
+
}
|
|
65
|
+
get schema() { return this.featureImplementation.schema; }
|
|
66
|
+
/* @internal */ get modelInterface() { var _a; return (_a = this.schema.language.csharp) === null || _a === void 0 ? void 0 : _a.interfaceImplementation; }
|
|
67
|
+
/* @internal */ get internalModelInterface() { var _a; return (_a = this.schema.language.csharp) === null || _a === void 0 ? void 0 : _a.internalInterfaceImplementation; }
|
|
29
68
|
// public hasHeaderProperties: boolean;
|
|
30
69
|
constructor(namespace, schemaWithFeatures, state, objectInitializer) {
|
|
31
70
|
var _a, _b, _c;
|
|
@@ -44,7 +83,7 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
44
83
|
this.schema.language.csharp.classImplementation = this; // mark the code-model with the class we're creating.
|
|
45
84
|
this.state = state;
|
|
46
85
|
this.apply(objectInitializer);
|
|
47
|
-
if (this.
|
|
86
|
+
if (this.schema.language.csharp.suppressFormat) {
|
|
48
87
|
this.add(new codegen_csharp_1.Attribute(csharp_declarations_1.DoNotFormatAttribute));
|
|
49
88
|
}
|
|
50
89
|
// must be a partial class
|
|
@@ -62,7 +101,7 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
62
101
|
this.schema.language.csharp.internalInterfaceImplementation.init();
|
|
63
102
|
this.schema.language.csharp.interfaceImplementation.init();
|
|
64
103
|
// add default constructor
|
|
65
|
-
this.addMethod(new codegen_csharp_1.Constructor(this, { description: `Creates an new <see cref="${this.name}" /> instance.` })); // default constructor for fits and giggles.
|
|
104
|
+
this.constructorMethod = this.addMethod(new codegen_csharp_1.Constructor(this, { description: `Creates an new <see cref="${this.name}" /> instance.` })); // default constructor for fits and giggles.
|
|
66
105
|
// handle parent interface implementation
|
|
67
106
|
if (!this.handleAllOf()) {
|
|
68
107
|
// handle the AdditionalProperties if used
|
|
@@ -83,45 +122,6 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
83
122
|
this.jsonSerializer = new model_class_json_1.JsonSerializableClass(this);
|
|
84
123
|
}
|
|
85
124
|
}
|
|
86
|
-
deserializeFromContainerMember(mediaType, container, serializedName, defaultValue) {
|
|
87
|
-
return this.featureImplementation.deserializeFromContainerMember(mediaType, container, serializedName, defaultValue);
|
|
88
|
-
}
|
|
89
|
-
deserializeFromNode(mediaType, node, defaultValue) {
|
|
90
|
-
return this.featureImplementation.deserializeFromNode(mediaType, node, defaultValue);
|
|
91
|
-
}
|
|
92
|
-
serializeToNode(mediaType, value, serializedName, mode) {
|
|
93
|
-
return this.featureImplementation.serializeToNode(mediaType, value, serializedName, mode);
|
|
94
|
-
}
|
|
95
|
-
get defaultOfType() {
|
|
96
|
-
return codegen_csharp_1.toExpression('null /* model class */');
|
|
97
|
-
}
|
|
98
|
-
get convertObjectMethod() {
|
|
99
|
-
return this.featureImplementation.convertObjectMethod;
|
|
100
|
-
}
|
|
101
|
-
/** emits an expression serialize this to a HttpContent */
|
|
102
|
-
serializeToContent(mediaType, value, mode) {
|
|
103
|
-
return this.featureImplementation.serializeToContent(mediaType, value, mode);
|
|
104
|
-
}
|
|
105
|
-
/** emits an expression to deserialize content from a string */
|
|
106
|
-
deserializeFromString(mediaType, content, defaultValue) {
|
|
107
|
-
return this.featureImplementation.deserializeFromString(mediaType, content, defaultValue);
|
|
108
|
-
}
|
|
109
|
-
/** emits an expression to deserialize content from a content/response */
|
|
110
|
-
deserializeFromResponse(mediaType, content, defaultValue) {
|
|
111
|
-
return this.featureImplementation.deserializeFromResponse(mediaType, content, defaultValue);
|
|
112
|
-
}
|
|
113
|
-
serializeToContainerMember(mediaType, value, container, serializedName, mode) {
|
|
114
|
-
return this.featureImplementation.serializeToContainerMember(mediaType, value, container, serializedName, mode);
|
|
115
|
-
}
|
|
116
|
-
get isXmlAttribute() {
|
|
117
|
-
return this.featureImplementation.isXmlAttribute;
|
|
118
|
-
}
|
|
119
|
-
get isRequired() {
|
|
120
|
-
return this.featureImplementation.isRequired;
|
|
121
|
-
}
|
|
122
|
-
get schema() { return this.featureImplementation.schema; }
|
|
123
|
-
/* @internal */ get modelInterface() { var _a; return (_a = this.schema.language.csharp) === null || _a === void 0 ? void 0 : _a.interfaceImplementation; }
|
|
124
|
-
/* @internal */ get internalModelInterface() { var _a; return (_a = this.schema.language.csharp) === null || _a === void 0 ? void 0 : _a.internalInterfaceImplementation; }
|
|
125
125
|
nested(virtualProperty, internal) {
|
|
126
126
|
if (virtualProperty.accessViaProperty) {
|
|
127
127
|
if (virtualProperty.accessViaProperty.accessViaProperty) {
|
|
@@ -148,11 +148,15 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
148
148
|
createProperties() {
|
|
149
149
|
// generate a protected backing field for each
|
|
150
150
|
// and then expand the nested properties into this class forwarding to the member.
|
|
151
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
151
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
152
152
|
// add properties
|
|
153
153
|
if ((_a = this.schema.language.csharp) === null || _a === void 0 ? void 0 : _a.virtualProperties) {
|
|
154
154
|
/* Owned Properties */
|
|
155
|
-
for (const virtualProperty of linq_1.values((this.schema.language.csharp.virtualProperties.owned))) {
|
|
155
|
+
for (const virtualProperty of (0, linq_1.values)((this.schema.language.csharp.virtualProperties.owned))) {
|
|
156
|
+
let isPolymorphic = false;
|
|
157
|
+
if (virtualProperty.private && virtualProperty.property.schema.type === codemodel_1.SchemaType.Object && virtualProperty.property.schema.discriminator) {
|
|
158
|
+
isPolymorphic = true;
|
|
159
|
+
}
|
|
156
160
|
const actualProperty = virtualProperty.property;
|
|
157
161
|
let n = 0;
|
|
158
162
|
const decl = this.state.project.modelsNamespace.NewResolveTypeDeclaration(actualProperty.schema, (_b = actualProperty.language.csharp) === null || _b === void 0 ? void 0 : _b.required, this.state.path('schema'));
|
|
@@ -168,14 +172,16 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
168
172
|
myProperty.setAccess = codegen_csharp_1.Access.Internal;
|
|
169
173
|
myProperty.set = undefined;
|
|
170
174
|
}
|
|
171
|
-
if (virtualProperty.private) {
|
|
175
|
+
if (virtualProperty.private && !isPolymorphic) {
|
|
172
176
|
// when properties are inlined, the container accessor can be internalized. I think.
|
|
173
177
|
myProperty.setAccess = codegen_csharp_1.Access.Internal;
|
|
174
178
|
myProperty.getAccess = codegen_csharp_1.Access.Internal;
|
|
179
|
+
}
|
|
180
|
+
if (virtualProperty.private) {
|
|
175
181
|
this.pMap.set(virtualProperty, myProperty);
|
|
176
182
|
}
|
|
177
183
|
this.ownedProperties.push(this.add(myProperty));
|
|
178
|
-
if (myProperty.getAccess !== codegen_csharp_1.Access.Public || myProperty.setAccess !== codegen_csharp_1.Access.Public || myProperty.set === undefined) {
|
|
184
|
+
if (myProperty.getAccess !== codegen_csharp_1.Access.Public || myProperty.setAccess !== codegen_csharp_1.Access.Public || myProperty.set === undefined || isPolymorphic) {
|
|
179
185
|
/* internal interface property */
|
|
180
186
|
this.add(new codegen_csharp_1.Property(`${(_h = virtualProperty.originalContainingSchema.language.csharp) === null || _h === void 0 ? void 0 : _h.internalInterfaceImplementation.fullName}.${virtualProperty.name}`, decl, {
|
|
181
187
|
description: `Internal Acessors for ${virtualProperty.name}`,
|
|
@@ -185,13 +191,15 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
185
191
|
set: myProperty.assignPrivate('value')
|
|
186
192
|
}));
|
|
187
193
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
this.addFormatAttributesToProperty(myProperty, virtualProperty);
|
|
191
|
-
}
|
|
194
|
+
myProperty.add(new codegen_csharp_1.Attribute(csharp_declarations_1.PropertyOriginAttribute, { parameters: [`${this.state.project.serviceNamespace}.PropertyOrigin.Owned`] }));
|
|
195
|
+
this.addFormatAttributesToProperty(myProperty, virtualProperty);
|
|
192
196
|
}
|
|
193
197
|
/* Inherited properties. */
|
|
194
|
-
for (const virtualProperty of linq_1.values((this.schema.language.csharp.virtualProperties.inherited))) {
|
|
198
|
+
for (const virtualProperty of (0, linq_1.values)((this.schema.language.csharp.virtualProperties.inherited))) {
|
|
199
|
+
let isPolymorphic = false;
|
|
200
|
+
if (virtualProperty.private && virtualProperty.property.schema.type === codemodel_1.SchemaType.Object && virtualProperty.property.schema.discriminator) {
|
|
201
|
+
isPolymorphic = true;
|
|
202
|
+
}
|
|
195
203
|
// so each parent property that is getting exposed
|
|
196
204
|
// has to be accessed via the field in this.backingFields
|
|
197
205
|
const parentField = this.backingFields.find(each => { var _a; return virtualProperty.accessViaSchema ? ((_a = virtualProperty.accessViaSchema.language.csharp) === null || _a === void 0 ? void 0 : _a.interfaceImplementation.fullName) === each.typeDeclaration.declaration : false; });
|
|
@@ -200,50 +208,57 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
200
208
|
const opsType = this.state.project.modelsNamespace.NewResolveTypeDeclaration(virtualProperty.originalContainingSchema, false, this.state);
|
|
201
209
|
const via = virtualProperty.accessViaProperty;
|
|
202
210
|
const parentCast = `(${(_j = virtualProperty.originalContainingSchema.language.csharp) === null || _j === void 0 ? void 0 : _j.internalInterfaceImplementation.fullName})`;
|
|
203
|
-
let getFunc = codegen_csharp_1.toExpression(`(${parentCast}${parentField.field.name}).${this.accessor(virtualProperty)}`);
|
|
204
|
-
let setFunc = (((_k = virtualProperty.property.language.csharp) === null || _k === void 0 ? void 0 : _k.readOnly) || ((_l = virtualProperty.property.language.csharp) === null || _l === void 0 ? void 0 : _l.constantValue)) ? undefined : codegen_csharp_1.toExpression(`(${parentCast}${parentField.field.name}).${this.accessor(virtualProperty)} = value ${virtualProperty.required ? '' : ` ?? ${requiredPropertyType.defaultOfType}`}`);
|
|
211
|
+
let getFunc = (0, codegen_csharp_1.toExpression)(`(${parentCast}${parentField.field.name}).${this.accessor(virtualProperty)}`);
|
|
212
|
+
let setFunc = (((_k = virtualProperty.property.language.csharp) === null || _k === void 0 ? void 0 : _k.readOnly) || ((_l = virtualProperty.property.language.csharp) === null || _l === void 0 ? void 0 : _l.constantValue)) ? undefined : (0, codegen_csharp_1.toExpression)(`(${parentCast}${parentField.field.name}).${this.accessor(virtualProperty)} = value ${virtualProperty.required ? '' : ` ?? ${requiredPropertyType.defaultOfType}`}`);
|
|
205
213
|
let isConstant = false;
|
|
206
214
|
if (virtualProperty.property.isDiscriminator && this.schema.discriminatorValue) {
|
|
207
|
-
for (const parent of linq_1.values((_m = this.schema.parents) === null || _m === void 0 ? void 0 : _m.all)) {
|
|
215
|
+
for (const parent of (0, linq_1.values)((_m = this.schema.parents) === null || _m === void 0 ? void 0 : _m.all)) {
|
|
208
216
|
if (((_o = parent.discriminator) === null || _o === void 0 ? void 0 : _o.property) === virtualProperty.property) {
|
|
209
|
-
getFunc = codegen_csharp_1.toExpression(`"${this.schema.discriminatorValue}"`);
|
|
210
|
-
setFunc = codegen_csharp_1.toExpression(`(${parentCast}${parentField.field.name}).${this.accessor(virtualProperty)} = "${this.schema.discriminatorValue}"`);
|
|
217
|
+
getFunc = (0, codegen_csharp_1.toExpression)(`"${this.schema.discriminatorValue}"`);
|
|
218
|
+
setFunc = (0, codegen_csharp_1.toExpression)(`(${parentCast}${parentField.field.name}).${this.accessor(virtualProperty)} = "${this.schema.discriminatorValue}"`);
|
|
211
219
|
isConstant = true;
|
|
220
|
+
if (((_p = virtualProperty.property.language.csharp) === null || _p === void 0 ? void 0 : _p.constantValue) === undefined && !virtualProperty.property.readOnly) {
|
|
221
|
+
(_q = this.constructorMethod) === null || _q === void 0 ? void 0 : _q.add(`this.${parentField.field.name}.${this.accessor(virtualProperty)} = "${this.schema.discriminatorValue}";`);
|
|
222
|
+
}
|
|
212
223
|
break;
|
|
213
224
|
}
|
|
214
225
|
}
|
|
215
226
|
}
|
|
216
227
|
const vp = this.add(new codegen_csharp_1.Property(virtualProperty.name, propertyType, {
|
|
217
|
-
description: (
|
|
228
|
+
description: (_r = virtualProperty.property.language.csharp) === null || _r === void 0 ? void 0 : _r.description,
|
|
218
229
|
get: getFunc,
|
|
219
230
|
set: setFunc
|
|
220
231
|
}));
|
|
221
|
-
if (((
|
|
232
|
+
if (((_s = virtualProperty.property.language.csharp) === null || _s === void 0 ? void 0 : _s.constantValue) !== undefined) {
|
|
222
233
|
vp.setAccess = codegen_csharp_1.Access.Internal;
|
|
223
234
|
vp.set = undefined;
|
|
224
235
|
}
|
|
225
|
-
if (
|
|
226
|
-
|
|
236
|
+
if (virtualProperty.private && !isPolymorphic) {
|
|
237
|
+
vp.setAccess = codegen_csharp_1.Access.Internal;
|
|
238
|
+
vp.getAccess = codegen_csharp_1.Access.Internal;
|
|
239
|
+
}
|
|
240
|
+
if (vp.getAccess !== codegen_csharp_1.Access.Public || vp.setAccess !== codegen_csharp_1.Access.Public || vp.set === undefined || isPolymorphic) {
|
|
241
|
+
this.add(new codegen_csharp_1.Property(`${(_t = virtualProperty.originalContainingSchema.language.csharp) === null || _t === void 0 ? void 0 : _t.internalInterfaceImplementation.fullName}.${virtualProperty.name}`, propertyType, {
|
|
227
242
|
description: `Internal Acessors for ${virtualProperty.name}`,
|
|
228
243
|
getAccess: codegen_csharp_1.Access.Explicit,
|
|
229
244
|
setAccess: codegen_csharp_1.Access.Explicit,
|
|
230
|
-
get: codegen_csharp_1.toExpression(`(${parentCast}${parentField.field.name}).${via.name}`),
|
|
231
|
-
set: codegen_csharp_1.toExpression(`(${parentCast}${parentField.field.name}).${via.name} = value`)
|
|
245
|
+
get: (0, codegen_csharp_1.toExpression)(`(${parentCast}${parentField.field.name}).${via.name}`),
|
|
246
|
+
set: (0, codegen_csharp_1.toExpression)(`(${parentCast}${parentField.field.name}).${via.name} = value`)
|
|
232
247
|
}));
|
|
233
248
|
}
|
|
234
249
|
if (isConstant) {
|
|
235
250
|
vp.add(new codegen_csharp_1.Attribute(csharp_declarations_1.ConstantAttribute));
|
|
236
251
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
this.addFormatAttributesToProperty(vp, virtualProperty);
|
|
240
|
-
}
|
|
252
|
+
vp.add(new codegen_csharp_1.Attribute(csharp_declarations_1.PropertyOriginAttribute, { parameters: [`${this.state.project.serviceNamespace}.PropertyOrigin.Inherited`] }));
|
|
253
|
+
this.addFormatAttributesToProperty(vp, virtualProperty);
|
|
241
254
|
}
|
|
242
255
|
/* Inlined properties. */
|
|
243
|
-
for (const virtualProperty of linq_1.values(this.schema.language.csharp.virtualProperties.inlined)) {
|
|
244
|
-
|
|
256
|
+
for (const virtualProperty of (0, linq_1.values)(this.schema.language.csharp.virtualProperties.inlined)) {
|
|
257
|
+
let isPolymorphic = false;
|
|
258
|
+
if (virtualProperty.private && virtualProperty.property.schema.type === codemodel_1.SchemaType.Object && virtualProperty.property.schema.discriminator) {
|
|
245
259
|
// continue;
|
|
246
260
|
// can't remove it, it has to be either public or internally implemented.
|
|
261
|
+
isPolymorphic = true;
|
|
247
262
|
}
|
|
248
263
|
if (virtualProperty.accessViaProperty) {
|
|
249
264
|
const containingProperty = this.pMap.get(virtualProperty.accessViaProperty);
|
|
@@ -252,30 +267,28 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
252
267
|
const requiredPropertyType = this.state.project.modelsNamespace.NewResolveTypeDeclaration(virtualProperty.property.schema, true, this.state);
|
|
253
268
|
// regular inlined property
|
|
254
269
|
const vp = new codegen_csharp_1.Property(virtualProperty.name, propertyType, {
|
|
255
|
-
description: (
|
|
256
|
-
get: codegen_csharp_1.toExpression(`${this.accessor(virtualProperty)}`),
|
|
257
|
-
set: (((
|
|
270
|
+
description: (_u = virtualProperty.property.language.csharp) === null || _u === void 0 ? void 0 : _u.description,
|
|
271
|
+
get: (0, codegen_csharp_1.toExpression)(`${this.accessor(virtualProperty)}`),
|
|
272
|
+
set: (((_v = virtualProperty.property.language.csharp) === null || _v === void 0 ? void 0 : _v.readOnly) || ((_w = virtualProperty.property.language.csharp) === null || _w === void 0 ? void 0 : _w.constantValue)) ? undefined : (0, codegen_csharp_1.toExpression)(`${this.accessor(virtualProperty)} = value ${virtualProperty.required ? '' : ` ?? ${requiredPropertyType.defaultOfType}`}`)
|
|
258
273
|
});
|
|
259
|
-
if (!virtualProperty.private) {
|
|
274
|
+
if (!virtualProperty.private || isPolymorphic) {
|
|
260
275
|
this.add(vp);
|
|
261
276
|
}
|
|
262
|
-
if (virtualProperty.private || vp.getAccess !== codegen_csharp_1.Access.Public || vp.setAccess !== codegen_csharp_1.Access.Public || vp.set === undefined) {
|
|
263
|
-
this.add(new codegen_csharp_1.Property(`${(
|
|
277
|
+
if (virtualProperty.private || vp.getAccess !== codegen_csharp_1.Access.Public || vp.setAccess !== codegen_csharp_1.Access.Public || vp.set === undefined || isPolymorphic) {
|
|
278
|
+
this.add(new codegen_csharp_1.Property(`${(_x = virtualProperty.originalContainingSchema.language.csharp) === null || _x === void 0 ? void 0 : _x.internalInterfaceImplementation.fullName}.${virtualProperty.name}`, propertyType, {
|
|
264
279
|
description: `Internal Acessors for ${virtualProperty.name}`,
|
|
265
280
|
getAccess: codegen_csharp_1.Access.Explicit,
|
|
266
281
|
setAccess: codegen_csharp_1.Access.Explicit,
|
|
267
282
|
get: vp.get,
|
|
268
|
-
set: codegen_csharp_1.toExpression(`${this.accessor(virtualProperty)} = value`)
|
|
283
|
+
set: (0, codegen_csharp_1.toExpression)(`${this.accessor(virtualProperty)} = value`)
|
|
269
284
|
}));
|
|
270
285
|
}
|
|
271
|
-
if (((
|
|
286
|
+
if (((_y = virtualProperty.property.language.csharp) === null || _y === void 0 ? void 0 : _y.constantValue) !== undefined) {
|
|
272
287
|
vp.setAccess = codegen_csharp_1.Access.Internal;
|
|
273
288
|
vp.set = undefined;
|
|
274
289
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
this.addFormatAttributesToProperty(vp, virtualProperty);
|
|
278
|
-
}
|
|
290
|
+
vp.add(new codegen_csharp_1.Attribute(csharp_declarations_1.PropertyOriginAttribute, { parameters: [`${this.state.project.serviceNamespace}.PropertyOrigin.Inlined`] }));
|
|
291
|
+
this.addFormatAttributesToProperty(vp, virtualProperty);
|
|
279
292
|
}
|
|
280
293
|
}
|
|
281
294
|
}
|
|
@@ -335,7 +348,7 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
335
348
|
}
|
|
336
349
|
}
|
|
337
350
|
else
|
|
338
|
-
for (const each of linq_1.values((_c = aSchema.parents) === null || _c === void 0 ? void 0 : _c.immediate)) {
|
|
351
|
+
for (const each of (0, linq_1.values)((_c = aSchema.parents) === null || _c === void 0 ? void 0 : _c.immediate)) {
|
|
339
352
|
const r = this.additionalPropertiesType(each);
|
|
340
353
|
if (r) {
|
|
341
354
|
return r;
|
|
@@ -348,7 +361,7 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
348
361
|
let hasAdditionalPropertiesInParent = false;
|
|
349
362
|
// handle <allOf>s
|
|
350
363
|
// add an 'implements' for the interface for the allOf.
|
|
351
|
-
for (const { key: eachSchemaIndex, value: eachSchemaValue } of linq_1.items((_a = this.schema.parents) === null || _a === void 0 ? void 0 : _a.immediate)) {
|
|
364
|
+
for (const { key: eachSchemaIndex, value: eachSchemaValue } of (0, linq_1.items)((_a = this.schema.parents) === null || _a === void 0 ? void 0 : _a.immediate)) {
|
|
352
365
|
if (eachSchemaValue.type === codemodel_1.SchemaType.Dictionary) {
|
|
353
366
|
continue;
|
|
354
367
|
}
|
|
@@ -357,7 +370,7 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
357
370
|
const td = this.state.project.modelsNamespace.NewResolveTypeDeclaration(aSchema, true, aState);
|
|
358
371
|
const parentClass = (_b = aSchema.language.csharp) === null || _b === void 0 ? void 0 : _b.classImplementation;
|
|
359
372
|
const className = parentClass.fullName;
|
|
360
|
-
const fieldName = codegen_1.camelCase(codegen_1.deconstruct(className.replace(/^.*\./, '')));
|
|
373
|
+
const fieldName = (0, codegen_1.camelCase)((0, codegen_1.deconstruct)(className.replace(/^.*\./, '')));
|
|
361
374
|
// add the interface as a parent to our interface.
|
|
362
375
|
const iface = (_c = aSchema.language.csharp) === null || _c === void 0 ? void 0 : _c.interfaceImplementation;
|
|
363
376
|
// add a field for the inherited values
|
|
@@ -392,7 +405,7 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
392
405
|
// we have a discriminator value, and we should tell our parent who we are so that they can build a proper deserializer method.
|
|
393
406
|
// um. just how do we *really* know which allOf is polymorphic?
|
|
394
407
|
// that's really sad.
|
|
395
|
-
for (const { key: eachAllOfIndex, value: eachAllOfValue } of linq_1.items((_a = this.schema.parents) === null || _a === void 0 ? void 0 : _a.all)) {
|
|
408
|
+
for (const { key: eachAllOfIndex, value: eachAllOfValue } of (0, linq_1.items)((_a = this.schema.parents) === null || _a === void 0 ? void 0 : _a.all)) {
|
|
396
409
|
const parentSchema = eachAllOfValue;
|
|
397
410
|
const aState = this.state.path('allOf', eachAllOfIndex);
|
|
398
411
|
// ensure the parent schema has it's class created first.
|
|
@@ -409,7 +422,7 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
409
422
|
}
|
|
410
423
|
addHeaderDeserializer() {
|
|
411
424
|
var _a, _b;
|
|
412
|
-
const avp = schema_1.getAllVirtualProperties((_a = this.schema.language.csharp) === null || _a === void 0 ? void 0 : _a.virtualProperties);
|
|
425
|
+
const avp = (0, schema_1.getAllVirtualProperties)((_a = this.schema.language.csharp) === null || _a === void 0 ? void 0 : _a.virtualProperties);
|
|
413
426
|
const headers = new codegen_csharp_1.Parameter('headers', codegen_csharp_1.System.Net.Http.Headers.HttpResponseHeaders);
|
|
414
427
|
const readHeaders = new codegen_csharp_1.Method(`${clientruntime_1.ClientRuntime.IHeaderSerializable}.ReadHeaders`, undefined, {
|
|
415
428
|
access: codegen_csharp_1.Access.Explicit,
|
|
@@ -417,12 +430,12 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
417
430
|
});
|
|
418
431
|
let used = false;
|
|
419
432
|
let i = 0;
|
|
420
|
-
for (const headerProperty of linq_1.values(avp).where(each => { var _a, _b; return ((_a = each.property.language.csharp) === null || _a === void 0 ? void 0 : _a[codemodel_v3_1.HeaderProperty]) === codemodel_v3_1.HeaderPropertyType.HeaderAndBody || ((_b = each.property.language.csharp) === null || _b === void 0 ? void 0 : _b[codemodel_v3_1.HeaderProperty]) === codemodel_v3_1.HeaderPropertyType.Header; })) {
|
|
433
|
+
for (const headerProperty of (0, linq_1.values)(avp).where(each => { var _a, _b; return ((_a = each.property.language.csharp) === null || _a === void 0 ? void 0 : _a[codemodel_v3_1.HeaderProperty]) === codemodel_v3_1.HeaderPropertyType.HeaderAndBody || ((_b = each.property.language.csharp) === null || _b === void 0 ? void 0 : _b[codemodel_v3_1.HeaderProperty]) === codemodel_v3_1.HeaderPropertyType.Header; })) {
|
|
421
434
|
used = true;
|
|
422
435
|
const t = `((${(_b = headerProperty.originalContainingSchema.language.csharp) === null || _b === void 0 ? void 0 : _b.fullInternalInterfaceName})this)`;
|
|
423
|
-
const values = `__${codegen_1.camelCase([...codegen_1.deconstruct(headerProperty.property.serializedName), 'Header'])}`;
|
|
436
|
+
const values = `__${(0, codegen_1.camelCase)([...(0, codegen_1.deconstruct)(headerProperty.property.serializedName), 'Header'])}`;
|
|
424
437
|
const td = this.state.project.modelsNamespace.NewResolveTypeDeclaration(headerProperty.property.schema, false, this.state);
|
|
425
|
-
readHeaders.add(codegen_csharp_1.If(`${codegen_csharp_1.valueOf(headers)}.TryGetValues("${headerProperty.property.serializedName}", out var ${values}${i})`, `${t}.${headerProperty.name} = ${td.deserializeFromContainerMember(codemodel_v3_1.KnownMediaType.Header, headers, values + i, td.defaultOfType)};`));
|
|
438
|
+
readHeaders.add((0, codegen_csharp_1.If)(`${(0, codegen_csharp_1.valueOf)(headers)}.TryGetValues("${headerProperty.property.serializedName}", out var ${values}${i})`, `${t}.${headerProperty.name} = ${td.deserializeFromContainerMember(codemodel_v3_1.KnownMediaType.Header, headers, values + i, td.defaultOfType)};`));
|
|
426
439
|
i++;
|
|
427
440
|
}
|
|
428
441
|
if (used) {
|
|
@@ -432,12 +445,12 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
432
445
|
}
|
|
433
446
|
appendResourceGroupName() {
|
|
434
447
|
var _a, _b;
|
|
435
|
-
const virtualProperties = schema_1.getAllVirtualProperties((_a = this.schema.language.csharp) === null || _a === void 0 ? void 0 : _a.virtualProperties);
|
|
436
|
-
const idProperties = linq_1.values(virtualProperties).where(each => each.name === 'Id').toArray();
|
|
437
|
-
const resourceGroupNameProperties = linq_1.values(virtualProperties).where(each => each.name === 'ResourceGroupName').toArray();
|
|
448
|
+
const virtualProperties = (0, schema_1.getAllVirtualProperties)((_a = this.schema.language.csharp) === null || _a === void 0 ? void 0 : _a.virtualProperties);
|
|
449
|
+
const idProperties = (0, linq_1.values)(virtualProperties).where(each => each.name === 'Id').toArray();
|
|
450
|
+
const resourceGroupNameProperties = (0, linq_1.values)(virtualProperties).where(each => each.name === 'ResourceGroupName').toArray();
|
|
438
451
|
if (idProperties.length == 1 && resourceGroupNameProperties.length === 0) {
|
|
439
452
|
const idProperty = idProperties[0];
|
|
440
|
-
const resourceGroupNamePropertyName = codegen_1.getPascalIdentifier('ResourceGroupName');
|
|
453
|
+
const resourceGroupNamePropertyName = (0, codegen_1.getPascalIdentifier)('ResourceGroupName');
|
|
441
454
|
const resourceGroupNameDescription = 'Gets the resource group name';
|
|
442
455
|
const actualResourceGroupProperty = idProperty.property;
|
|
443
456
|
actualResourceGroupProperty.serializedName = resourceGroupNamePropertyName;
|
|
@@ -446,7 +459,7 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
446
459
|
description: resourceGroupNameDescription,
|
|
447
460
|
getAccess: codegen_csharp_1.Access.Public,
|
|
448
461
|
setAccess: codegen_csharp_1.Access.Public,
|
|
449
|
-
get: codegen_csharp_1.toExpression('(new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?<subscriptionId>[^/]+)/resourceGroups/(?<resourceGroupName>[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?<subscriptionId>[^/]+)/resourceGroups/(?<resourceGroupName>[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null)')
|
|
462
|
+
get: (0, codegen_csharp_1.toExpression)('(new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?<subscriptionId>[^/]+)/resourceGroups/(?<resourceGroupName>[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?<subscriptionId>[^/]+)/resourceGroups/(?<resourceGroupName>[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null)')
|
|
450
463
|
});
|
|
451
464
|
const format = this.state.project.formats[`${(_b = this.schema.language.csharp) === null || _b === void 0 ? void 0 : _b.name}`];
|
|
452
465
|
const virtualResourceGroupNameProperty = {
|
|
@@ -461,10 +474,8 @@ class ModelClass extends codegen_csharp_1.Class {
|
|
|
461
474
|
required: false,
|
|
462
475
|
format: format
|
|
463
476
|
};
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
this.addFormatAttributesToProperty(resourceGroupNameProperty, virtualResourceGroupNameProperty);
|
|
467
|
-
}
|
|
477
|
+
resourceGroupNameProperty.add(new codegen_csharp_1.Attribute(csharp_declarations_1.PropertyOriginAttribute, { parameters: [`${this.state.project.serviceNamespace}.PropertyOrigin.Owned`] }));
|
|
478
|
+
this.addFormatAttributesToProperty(resourceGroupNameProperty, virtualResourceGroupNameProperty);
|
|
468
479
|
this.add(resourceGroupNameProperty);
|
|
469
480
|
}
|
|
470
481
|
}
|