@autorest/powershell 2.1.401 → 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.
Files changed (477) hide show
  1. package/.rush/temp/package-deps_build.json +213 -186
  2. package/.rush/temp/shrinkwrap-deps.json +322 -326
  3. package/autorest-configuration.md +60 -47
  4. package/dist/cmdlets/class.d.ts +21 -8
  5. package/dist/cmdlets/class.d.ts.map +1 -1
  6. package/dist/cmdlets/class.js +475 -151
  7. package/dist/cmdlets/class.js.map +1 -1
  8. package/dist/cmdlets/namespace.d.ts.map +1 -1
  9. package/dist/cmdlets/namespace.js +1 -0
  10. package/dist/cmdlets/namespace.js.map +1 -1
  11. package/dist/enums/namespace.d.ts.map +1 -1
  12. package/dist/enums/namespace.js +17 -10
  13. package/dist/enums/namespace.js.map +1 -1
  14. package/dist/generators/csproj.d.ts.map +1 -1
  15. package/dist/generators/csproj.js +2 -1
  16. package/dist/generators/csproj.js.map +1 -1
  17. package/dist/generators/gitignore.d.ts.map +1 -1
  18. package/dist/generators/gitignore.js +1 -0
  19. package/dist/generators/gitignore.js.map +1 -1
  20. package/dist/generators/nuspec.d.ts.map +1 -1
  21. package/dist/generators/nuspec.js +4 -3
  22. package/dist/generators/nuspec.js.map +1 -1
  23. package/dist/generators/psm1.d.ts.map +1 -1
  24. package/dist/generators/psm1.js +24 -15
  25. package/dist/generators/psm1.js.map +1 -1
  26. package/dist/generators/script-cmdlet.d.ts.map +1 -1
  27. package/dist/generators/script-cmdlet.js +1 -1
  28. package/dist/generators/script-cmdlet.js.map +1 -1
  29. package/dist/internal/name-inferrer.d.ts.map +1 -1
  30. package/dist/internal/name-inferrer.js +2 -0
  31. package/dist/internal/name-inferrer.js.map +1 -1
  32. package/dist/internal/project.d.ts +46 -5
  33. package/dist/internal/project.d.ts.map +1 -1
  34. package/dist/internal/project.js +72 -13
  35. package/dist/internal/project.js.map +1 -1
  36. package/dist/internal/state.d.ts +3 -2
  37. package/dist/internal/state.d.ts.map +1 -1
  38. package/dist/internal/state.js +3 -3
  39. package/dist/internal/state.js.map +1 -1
  40. package/dist/llcsharp/clientruntime.d.ts +5 -0
  41. package/dist/llcsharp/clientruntime.d.ts.map +1 -1
  42. package/dist/llcsharp/clientruntime.js +5 -0
  43. package/dist/llcsharp/clientruntime.js.map +1 -1
  44. package/dist/llcsharp/enums/enum.d.ts +2 -2
  45. package/dist/llcsharp/enums/enum.d.ts.map +1 -1
  46. package/dist/llcsharp/enums/enum.js +11 -10
  47. package/dist/llcsharp/enums/enum.js.map +1 -1
  48. package/dist/llcsharp/generator.d.ts +3 -3
  49. package/dist/llcsharp/generator.d.ts.map +1 -1
  50. package/dist/llcsharp/generator.js +4 -2
  51. package/dist/llcsharp/generator.js.map +1 -1
  52. package/dist/llcsharp/model/interface.d.ts +3 -2
  53. package/dist/llcsharp/model/interface.d.ts.map +1 -1
  54. package/dist/llcsharp/model/interface.js +68 -17
  55. package/dist/llcsharp/model/interface.js.map +1 -1
  56. package/dist/llcsharp/model/model-class-dictionary.d.ts.map +1 -1
  57. package/dist/llcsharp/model/model-class-dictionary.js +12 -6
  58. package/dist/llcsharp/model/model-class-dictionary.js.map +1 -1
  59. package/dist/llcsharp/model/model-class-json.d.ts.map +1 -1
  60. package/dist/llcsharp/model/model-class-json.js +20 -12
  61. package/dist/llcsharp/model/model-class-json.js.map +1 -1
  62. package/dist/llcsharp/model/model-class-serializer.d.ts +9 -21
  63. package/dist/llcsharp/model/model-class-serializer.d.ts.map +1 -1
  64. package/dist/llcsharp/model/model-class-serializer.js +21 -50
  65. package/dist/llcsharp/model/model-class-serializer.js.map +1 -1
  66. package/dist/llcsharp/model/model-class.d.ts +7 -4
  67. package/dist/llcsharp/model/model-class.d.ts.map +1 -1
  68. package/dist/llcsharp/model/model-class.js +147 -82
  69. package/dist/llcsharp/model/model-class.js.map +1 -1
  70. package/dist/llcsharp/model/namespace.d.ts +4 -4
  71. package/dist/llcsharp/model/namespace.d.ts.map +1 -1
  72. package/dist/llcsharp/model/namespace.js +40 -18
  73. package/dist/llcsharp/model/namespace.js.map +1 -1
  74. package/dist/llcsharp/model/property.d.ts +4 -4
  75. package/dist/llcsharp/model/property.d.ts.map +1 -1
  76. package/dist/llcsharp/model/property.js +9 -7
  77. package/dist/llcsharp/model/property.js.map +1 -1
  78. package/dist/llcsharp/operation/api-class.d.ts.map +1 -1
  79. package/dist/llcsharp/operation/api-class.js +24 -23
  80. package/dist/llcsharp/operation/api-class.js.map +1 -1
  81. package/dist/llcsharp/operation/method.d.ts +7 -5
  82. package/dist/llcsharp/operation/method.d.ts.map +1 -1
  83. package/dist/llcsharp/operation/method.js +157 -93
  84. package/dist/llcsharp/operation/method.js.map +1 -1
  85. package/dist/llcsharp/operation/namespace.js +2 -1
  86. package/dist/llcsharp/operation/namespace.js.map +1 -1
  87. package/dist/llcsharp/operation/parameter.d.ts +4 -4
  88. package/dist/llcsharp/operation/parameter.d.ts.map +1 -1
  89. package/dist/llcsharp/operation/parameter.js +7 -5
  90. package/dist/llcsharp/operation/parameter.js.map +1 -1
  91. package/dist/llcsharp/project.d.ts +4 -0
  92. package/dist/llcsharp/project.d.ts.map +1 -1
  93. package/dist/llcsharp/project.js +7 -2
  94. package/dist/llcsharp/project.js.map +1 -1
  95. package/dist/llcsharp/schema/Uuid.d.ts +2 -2
  96. package/dist/llcsharp/schema/Uuid.d.ts.map +1 -1
  97. package/dist/llcsharp/schema/Uuid.js.map +1 -1
  98. package/dist/llcsharp/schema/array.d.ts +3 -3
  99. package/dist/llcsharp/schema/array.d.ts.map +1 -1
  100. package/dist/llcsharp/schema/array.js +15 -8
  101. package/dist/llcsharp/schema/array.js.map +1 -1
  102. package/dist/llcsharp/schema/binary.d.ts +3 -3
  103. package/dist/llcsharp/schema/binary.d.ts.map +1 -1
  104. package/dist/llcsharp/schema/binary.js.map +1 -1
  105. package/dist/llcsharp/schema/boolean.d.ts +4 -4
  106. package/dist/llcsharp/schema/boolean.d.ts.map +1 -1
  107. package/dist/llcsharp/schema/boolean.js +1 -1
  108. package/dist/llcsharp/schema/boolean.js.map +1 -1
  109. package/dist/llcsharp/schema/byte-array.d.ts +3 -3
  110. package/dist/llcsharp/schema/byte-array.d.ts.map +1 -1
  111. package/dist/llcsharp/schema/byte-array.js +12 -2
  112. package/dist/llcsharp/schema/byte-array.js.map +1 -1
  113. package/dist/llcsharp/schema/char.d.ts +4 -4
  114. package/dist/llcsharp/schema/char.d.ts.map +1 -1
  115. package/dist/llcsharp/schema/char.js +3 -3
  116. package/dist/llcsharp/schema/char.js.map +1 -1
  117. package/dist/llcsharp/schema/date-time.d.ts +7 -7
  118. package/dist/llcsharp/schema/date-time.d.ts.map +1 -1
  119. package/dist/llcsharp/schema/date-time.js +4 -4
  120. package/dist/llcsharp/schema/date-time.js.map +1 -1
  121. package/dist/llcsharp/schema/date.d.ts +2 -2
  122. package/dist/llcsharp/schema/date.d.ts.map +1 -1
  123. package/dist/llcsharp/schema/date.js.map +1 -1
  124. package/dist/llcsharp/schema/duration.d.ts +5 -5
  125. package/dist/llcsharp/schema/duration.d.ts.map +1 -1
  126. package/dist/llcsharp/schema/duration.js +2 -2
  127. package/dist/llcsharp/schema/duration.js.map +1 -1
  128. package/dist/llcsharp/schema/enum.d.ts +2 -2
  129. package/dist/llcsharp/schema/enum.d.ts.map +1 -1
  130. package/dist/llcsharp/schema/enum.js +5 -3
  131. package/dist/llcsharp/schema/enum.js.map +1 -1
  132. package/dist/llcsharp/schema/extended-type-declaration.d.ts +2 -2
  133. package/dist/llcsharp/schema/extended-type-declaration.d.ts.map +1 -1
  134. package/dist/llcsharp/schema/integer.d.ts +4 -4
  135. package/dist/llcsharp/schema/integer.d.ts.map +1 -1
  136. package/dist/llcsharp/schema/integer.js +1 -1
  137. package/dist/llcsharp/schema/integer.js.map +1 -1
  138. package/dist/llcsharp/schema/object.d.ts +3 -3
  139. package/dist/llcsharp/schema/object.d.ts.map +1 -1
  140. package/dist/llcsharp/schema/object.js +25 -21
  141. package/dist/llcsharp/schema/object.js.map +1 -1
  142. package/dist/llcsharp/schema/password.d.ts +23 -0
  143. package/dist/llcsharp/schema/password.d.ts.map +1 -0
  144. package/dist/llcsharp/schema/password.js +89 -0
  145. package/dist/llcsharp/schema/password.js.map +1 -0
  146. package/dist/llcsharp/schema/primitive.d.ts +4 -4
  147. package/dist/llcsharp/schema/primitive.d.ts.map +1 -1
  148. package/dist/llcsharp/schema/primitive.js +7 -3
  149. package/dist/llcsharp/schema/primitive.js.map +1 -1
  150. package/dist/llcsharp/schema/schema-resolver.d.ts +4 -3
  151. package/dist/llcsharp/schema/schema-resolver.d.ts.map +1 -1
  152. package/dist/llcsharp/schema/schema-resolver.js +61 -64
  153. package/dist/llcsharp/schema/schema-resolver.js.map +1 -1
  154. package/dist/llcsharp/schema/string.d.ts +3 -3
  155. package/dist/llcsharp/schema/string.d.ts.map +1 -1
  156. package/dist/llcsharp/schema/string.js +14 -10
  157. package/dist/llcsharp/schema/string.js.map +1 -1
  158. package/dist/main.d.ts.map +1 -1
  159. package/dist/main.js +23 -14
  160. package/dist/main.js.map +1 -1
  161. package/dist/models/model-extensions.d.ts +3 -2
  162. package/dist/models/model-extensions.d.ts.map +1 -1
  163. package/dist/models/model-extensions.js +195 -168
  164. package/dist/models/model-extensions.js.map +1 -1
  165. package/dist/module/module-class.d.ts +4 -2
  166. package/dist/module/module-class.d.ts.map +1 -1
  167. package/dist/module/module-class.js +67 -13
  168. package/dist/module/module-class.js.map +1 -1
  169. package/dist/module/module-namespace.d.ts +2 -2
  170. package/dist/module/module-namespace.d.ts.map +1 -1
  171. package/dist/module/module-namespace.js +3 -2
  172. package/dist/module/module-namespace.js.map +1 -1
  173. package/dist/plugins/add-azure-completers-v2.d.ts +3 -0
  174. package/dist/plugins/add-azure-completers-v2.d.ts.map +1 -0
  175. package/dist/plugins/{add-azure-completers.js → add-azure-completers-v2.js} +7 -5
  176. package/dist/plugins/add-azure-completers-v2.js.map +1 -0
  177. package/dist/plugins/create-commands-v2.d.ts +40 -0
  178. package/dist/plugins/create-commands-v2.d.ts.map +1 -0
  179. package/dist/plugins/{create-commands.js → create-commands-v2.js} +128 -78
  180. package/dist/plugins/create-commands-v2.js.map +1 -0
  181. package/dist/plugins/cs-namer-v2.d.ts +3 -0
  182. package/dist/plugins/cs-namer-v2.d.ts.map +1 -0
  183. package/dist/plugins/cs-namer-v2.js +230 -0
  184. package/dist/plugins/cs-namer-v2.js.map +1 -0
  185. package/dist/plugins/llcsharp-v2.d.ts +3 -0
  186. package/dist/plugins/llcsharp-v2.d.ts.map +1 -0
  187. package/dist/plugins/{llcsharp.js → llcsharp-v2.js} +3 -3
  188. package/dist/plugins/llcsharp-v2.js.map +1 -0
  189. package/dist/plugins/modifiers-v2.d.ts +3 -0
  190. package/dist/plugins/modifiers-v2.d.ts.map +1 -0
  191. package/dist/plugins/{modifiers.js → modifiers-v2.js} +151 -32
  192. package/dist/plugins/modifiers-v2.js.map +1 -0
  193. package/dist/plugins/plugin-create-inline-properties.d.ts +4 -0
  194. package/dist/plugins/plugin-create-inline-properties.d.ts.map +1 -0
  195. package/dist/plugins/plugin-create-inline-properties.js +356 -0
  196. package/dist/plugins/plugin-create-inline-properties.js.map +1 -0
  197. package/dist/plugins/plugin-tweak-m4-model.d.ts +3 -0
  198. package/dist/plugins/plugin-tweak-m4-model.d.ts.map +1 -0
  199. package/dist/plugins/plugin-tweak-m4-model.js +166 -0
  200. package/dist/plugins/plugin-tweak-m4-model.js.map +1 -0
  201. package/dist/plugins/plugin-tweak-model-azure-v2.d.ts +3 -0
  202. package/dist/plugins/plugin-tweak-model-azure-v2.d.ts.map +1 -0
  203. package/dist/plugins/plugin-tweak-model-azure-v2.js +169 -0
  204. package/dist/plugins/plugin-tweak-model-azure-v2.js.map +1 -0
  205. package/dist/plugins/plugin-tweak-model.d.ts +9 -0
  206. package/dist/plugins/plugin-tweak-model.d.ts.map +1 -0
  207. package/dist/plugins/plugin-tweak-model.js +572 -0
  208. package/dist/plugins/plugin-tweak-model.js.map +1 -0
  209. package/dist/plugins/powershell-v2.d.ts +3 -0
  210. package/dist/plugins/powershell-v2.d.ts.map +1 -0
  211. package/dist/plugins/{powershell.js → powershell-v2.js} +9 -4
  212. package/dist/plugins/powershell-v2.js.map +1 -0
  213. package/dist/plugins/{ps-namer.d.ts → ps-namer-v2.d.ts} +2 -2
  214. package/dist/plugins/ps-namer-v2.d.ts.map +1 -0
  215. package/dist/plugins/{ps-namer.js → ps-namer-v2.js} +64 -49
  216. package/dist/plugins/ps-namer-v2.js.map +1 -0
  217. package/dist/utils/PwshModel.d.ts +8 -0
  218. package/dist/utils/PwshModel.d.ts.map +1 -0
  219. package/dist/utils/PwshModel.js +17 -0
  220. package/dist/utils/PwshModel.js.map +1 -0
  221. package/dist/utils/command-operation.d.ts +51 -0
  222. package/dist/utils/command-operation.d.ts.map +1 -0
  223. package/dist/utils/command-operation.js +33 -0
  224. package/dist/utils/command-operation.js.map +1 -0
  225. package/dist/utils/components.d.ts +133 -0
  226. package/dist/utils/components.d.ts.map +1 -0
  227. package/dist/utils/components.js +100 -0
  228. package/dist/utils/components.js.map +1 -0
  229. package/dist/utils/extensions.d.ts +11 -0
  230. package/dist/utils/extensions.d.ts.map +1 -0
  231. package/dist/utils/extensions.js +16 -0
  232. package/dist/utils/extensions.js.map +1 -0
  233. package/dist/utils/http-definitions.d.ts +45 -0
  234. package/dist/utils/http-definitions.d.ts.map +1 -0
  235. package/dist/utils/http-definitions.js +47 -0
  236. package/dist/utils/http-definitions.js.map +1 -0
  237. package/dist/utils/http-operation.d.ts +8 -0
  238. package/dist/utils/http-operation.d.ts.map +1 -0
  239. package/dist/utils/http-operation.js +254 -0
  240. package/dist/utils/http-operation.js.map +1 -0
  241. package/dist/utils/info.d.ts +36 -0
  242. package/dist/utils/info.d.ts.map +1 -0
  243. package/dist/utils/info.js +36 -0
  244. package/dist/utils/info.js.map +1 -0
  245. package/dist/utils/model-state.d.ts +44 -0
  246. package/dist/utils/model-state.d.ts.map +1 -0
  247. package/dist/utils/model-state.js +206 -0
  248. package/dist/utils/model-state.js.map +1 -0
  249. package/dist/utils/powershell-comment.d.ts +2 -0
  250. package/dist/utils/powershell-comment.d.ts.map +1 -0
  251. package/dist/utils/powershell-comment.js +25 -0
  252. package/dist/utils/powershell-comment.js.map +1 -0
  253. package/dist/utils/programatic-operation.d.ts +20 -0
  254. package/dist/utils/programatic-operation.d.ts.map +1 -0
  255. package/dist/utils/programatic-operation.js +29 -0
  256. package/dist/utils/programatic-operation.js.map +1 -0
  257. package/dist/utils/resolve-conflicts.d.ts +7 -0
  258. package/dist/utils/resolve-conflicts.d.ts.map +1 -0
  259. package/dist/utils/resolve-conflicts.js +57 -0
  260. package/dist/utils/resolve-conflicts.js.map +1 -0
  261. package/dist/utils/schema.d.ts +116 -0
  262. package/dist/utils/schema.d.ts.map +1 -0
  263. package/dist/utils/schema.js +186 -0
  264. package/dist/utils/schema.js.map +1 -0
  265. package/dist/utils/security-scheme.d.ts +123 -0
  266. package/dist/utils/security-scheme.d.ts.map +1 -0
  267. package/dist/utils/security-scheme.js +119 -0
  268. package/dist/utils/security-scheme.js.map +1 -0
  269. package/dist/utils/uid.d.ts +2 -0
  270. package/dist/utils/uid.d.ts.map +1 -0
  271. package/dist/utils/uid.js +8 -0
  272. package/dist/utils/uid.js.map +1 -0
  273. package/package.json +22 -21
  274. package/resources/assets/build-module.ps1 +12 -15
  275. package/resources/assets/check-dependencies.ps1 +4 -14
  276. package/resources/assets/create-model-cmdlets.ps1 +157 -0
  277. package/resources/assets/custom/{readme.md → README.md} +7 -7
  278. package/resources/assets/docs/README.md +11 -0
  279. package/resources/assets/examples/{readme.md → README.md} +0 -0
  280. package/resources/assets/export-surface.ps1 +1 -11
  281. package/resources/assets/exports/{readme.md → README.md} +2 -2
  282. package/resources/assets/generate-help.ps1 +2 -12
  283. package/resources/assets/how-to.md +5 -5
  284. package/resources/assets/internal/{readme.md → README.md} +3 -3
  285. package/resources/assets/pack-module.ps1 +1 -11
  286. package/resources/assets/resources/{readme.md → README.md} +0 -0
  287. package/resources/assets/run-module.ps1 +3 -11
  288. package/resources/assets/test/{readme.md → README.md} +0 -0
  289. package/resources/assets/test/loadEnv.ps1 +1 -11
  290. package/resources/assets/test-module.ps1 +39 -24
  291. package/resources/assets/tools/Resources/{readme.md → README.md} +3 -2
  292. package/resources/assets/tools/Resources/docs/{readme.md → README.md} +1 -1
  293. package/resources/assets/tools/Resources/examples/{readme.md → README.md} +0 -0
  294. package/resources/assets/tools/Resources/how-to.md +5 -5
  295. package/resources/assets/tools/Resources/resources/{readme.md → README.md} +0 -0
  296. package/resources/assets/tools/Resources/test/{readme.md → README.md} +0 -0
  297. package/resources/modules/Az.Accounts/2.7.5/Accounts.format.ps1xml +496 -0
  298. package/resources/modules/Az.Accounts/2.7.5/Accounts.generated.format.ps1xml +468 -0
  299. package/resources/modules/Az.Accounts/2.7.5/Accounts.types.ps1xml +303 -0
  300. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Az.Accounts.nuspec +5 -3
  301. package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.psd1 +387 -0
  302. package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.psm1 +375 -0
  303. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Azure.Core.dll +0 -0
  304. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Azure.Identity.dll +0 -0
  305. package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies → 2.7.5/AzSharedAlcAssemblies}/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  306. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
  307. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Microsoft.Identity.Client.dll +0 -0
  308. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/System.Memory.Data.dll +0 -0
  309. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/System.Text.Json.dll +0 -0
  310. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Hyak.Common.dll +0 -0
  311. package/resources/modules/Az.Accounts/2.7.5/Microsoft.ApplicationInsights.dll +0 -0
  312. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.Common.dll +0 -0
  313. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll +0 -0
  314. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Authentication.ResourceManager.deps.json +945 -404
  315. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll +0 -0
  316. 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
  317. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.dll +0 -0
  318. 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
  319. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.dll +0 -0
  320. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
  321. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Aks.dll +0 -0
  322. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Authorization.dll +0 -0
  323. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Compute.dll +0 -0
  324. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll +0 -0
  325. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.KeyVault.dll +0 -0
  326. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Monitor.dll +0 -0
  327. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Network.dll +0 -0
  328. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll +0 -0
  329. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll +0 -0
  330. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll +0 -0
  331. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Clients.Websites.dll +0 -0
  332. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Cmdlets.Accounts.deps.json +2413 -0
  333. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll +0 -0
  334. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml +3567 -1995
  335. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Common.Share.dll +0 -0
  336. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Common.dll +0 -0
  337. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Storage.dll +0 -0
  338. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Azure.PowerShell.Strategies.dll +0 -0
  339. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.Rest.ClientRuntime.Azure.dll +0 -0
  340. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Rest.ClientRuntime.dll +0 -0
  341. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.WindowsAzure.Storage.DataMovement.dll +0 -0
  342. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/Microsoft.WindowsAzure.Storage.dll +0 -0
  343. package/resources/modules/Az.Accounts/2.7.5/PostImportScripts/LoadAuthenticators.ps1 +219 -0
  344. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Azure.Core.dll +0 -0
  345. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Azure.Identity.dll +0 -0
  346. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
  347. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  348. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
  349. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Identity.Client.dll +0 -0
  350. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Newtonsoft.Json.12.0.3.dll +0 -0
  351. package/resources/modules/Az.Accounts/{1.8.1/PreloadAssemblies/Newtonsoft.Json.10.dll → 2.7.5/PreloadAssemblies/Newtonsoft.Json.dll} +0 -0
  352. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Buffers.dll +0 -0
  353. 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
  354. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Memory.Data.dll +0 -0
  355. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Memory.dll +0 -0
  356. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Net.Http.WinHttpHandler.dll +0 -0
  357. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Numerics.Vectors.dll +0 -0
  358. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Private.ServiceModel.dll +0 -0
  359. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Reflection.DispatchProxy.dll +0 -0
  360. 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
  361. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Security.AccessControl.dll +0 -0
  362. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Security.Cryptography.Cng.dll +0 -0
  363. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Security.Permissions.dll +0 -0
  364. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Security.Principal.Windows.dll +0 -0
  365. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.ServiceModel.Primitives.dll +0 -0
  366. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Text.Encodings.Web.dll +0 -0
  367. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Text.Json.dll +0 -0
  368. 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
  369. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/PreloadAssemblies/System.Xml.ReaderWriter.dll +0 -0
  370. package/resources/modules/Az.Accounts/2.7.5/StartupScripts/AzError.ps1 +278 -0
  371. package/resources/modules/Az.Accounts/2.7.5/StartupScripts/InitializeAssemblyResolver.ps1 +234 -0
  372. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/[Content_Types].xml +1 -0
  373. package/resources/modules/Az.Accounts/{1.8.1 → 2.7.5}/_rels/.rels +2 -2
  374. package/resources/modules/Az.Accounts/2.7.5/en-US/about_az.help.txt +50 -0
  375. 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
  376. package/resources/psruntime/AsyncCommandRuntime.cs +4 -0
  377. package/resources/psruntime/AsyncOperationResponse.cs +10 -11
  378. package/resources/psruntime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +3 -1
  379. package/resources/psruntime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +94 -87
  380. package/resources/psruntime/BuildTime/Cmdlets/ExportPsd1.cs +168 -102
  381. package/resources/psruntime/BuildTime/Cmdlets/ExportTestStub.cs +22 -11
  382. package/resources/psruntime/BuildTime/Cmdlets/GetScriptCmdlet.cs +2 -1
  383. package/resources/psruntime/BuildTime/MarkdownRenderer.cs +1 -8
  384. package/resources/psruntime/BuildTime/Models/PsHelpMarkdownOutputs.cs +33 -11
  385. package/resources/psruntime/BuildTime/Models/PsHelpTypes.cs +3 -0
  386. package/resources/psruntime/BuildTime/Models/PsMarkdownTypes.cs +17 -14
  387. package/resources/psruntime/BuildTime/Models/PsProxyOutputs.cs +111 -13
  388. package/resources/psruntime/BuildTime/Models/PsProxyTypes.cs +18 -3
  389. package/resources/psruntime/BuildTime/PsAttributes.cs +1 -1
  390. package/resources/psruntime/BuildTime/PsExtensions.cs +9 -0
  391. package/resources/psruntime/BuildTime/PsHelpers.cs +2 -1
  392. package/resources/psruntime/DictionaryExtensions.cs +8 -11
  393. package/resources/psruntime/EventDataExtensions.cs +1 -1
  394. package/resources/psruntime/MessageAttribute.cs +360 -0
  395. package/resources/psruntime/MessageAttributeHelper.cs +161 -0
  396. package/resources/psruntime/Properties/Resources.Designer.cs +5633 -0
  397. package/resources/psruntime/Properties/Resources.resx +1741 -0
  398. package/resources/psruntime/TypeConverterExtensions.cs +31 -10
  399. package/resources/runtime/csharp/client/Extensions.cs +7 -1
  400. package/resources/runtime/csharp/client/IAssociativeArray.cs +4 -1
  401. package/resources/runtime/csharp/client/UndeclaredResponseException.cs +10 -2
  402. package/resources/runtime/csharp/json/Customizations/IJsonSerializable.cs +21 -7
  403. package/resources/runtime/csharp/json/Nodes/JsonNumber.cs +5 -5
  404. package/resources/runtime/csharp/pipeline/ISendAsync.cs +7 -3
  405. package/resources/runtime/csharp/pipeline/PipelineMocking.cs +17 -9
  406. package/resources/utils/Unprotect-SecureString.ps1 +16 -0
  407. package/changelog.md +0 -4
  408. package/dist/llcsharp/enums/json-serializer.d.ts +0 -9
  409. package/dist/llcsharp/enums/json-serializer.d.ts.map +0 -1
  410. package/dist/llcsharp/enums/json-serializer.js +0 -41
  411. package/dist/llcsharp/enums/json-serializer.js.map +0 -1
  412. package/dist/llcsharp/model/model-class-xml.d.ts +0 -15
  413. package/dist/llcsharp/model/model-class-xml.d.ts.map +0 -1
  414. package/dist/llcsharp/model/model-class-xml.js +0 -145
  415. package/dist/llcsharp/model/model-class-xml.js.map +0 -1
  416. package/dist/plugins/add-azure-completers.d.ts +0 -3
  417. package/dist/plugins/add-azure-completers.d.ts.map +0 -1
  418. package/dist/plugins/add-azure-completers.js.map +0 -1
  419. package/dist/plugins/create-commands.d.ts +0 -38
  420. package/dist/plugins/create-commands.d.ts.map +0 -1
  421. package/dist/plugins/create-commands.js.map +0 -1
  422. package/dist/plugins/cs-namer.d.ts +0 -3
  423. package/dist/plugins/cs-namer.d.ts.map +0 -1
  424. package/dist/plugins/cs-namer.js +0 -203
  425. package/dist/plugins/cs-namer.js.map +0 -1
  426. package/dist/plugins/llcsharp.d.ts +0 -3
  427. package/dist/plugins/llcsharp.d.ts.map +0 -1
  428. package/dist/plugins/llcsharp.js.map +0 -1
  429. package/dist/plugins/modifiers.d.ts +0 -3
  430. package/dist/plugins/modifiers.d.ts.map +0 -1
  431. package/dist/plugins/modifiers.js.map +0 -1
  432. package/dist/plugins/powershell.d.ts +0 -3
  433. package/dist/plugins/powershell.d.ts.map +0 -1
  434. package/dist/plugins/powershell.js.map +0 -1
  435. package/dist/plugins/ps-namer.d.ts.map +0 -1
  436. package/dist/plugins/ps-namer.js.map +0 -1
  437. package/resources/assets/docs/readme.md +0 -11
  438. package/resources/modules/Az.Accounts/1.8.1/Accounts.format.ps1xml +0 -368
  439. package/resources/modules/Az.Accounts/1.8.1/Accounts.generated.format.ps1xml +0 -422
  440. package/resources/modules/Az.Accounts/1.8.1/Accounts.types.ps1xml +0 -281
  441. package/resources/modules/Az.Accounts/1.8.1/Az.Accounts.psd1 +0 -360
  442. package/resources/modules/Az.Accounts/1.8.1/Az.Accounts.psm1 +0 -339
  443. package/resources/modules/Az.Accounts/1.8.1/Microsoft.ApplicationInsights.dll +0 -0
  444. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll +0 -0
  445. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll +0 -0
  446. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Authentication.dll +0 -0
  447. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll +0 -0
  448. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll +0 -0
  449. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll +0 -0
  450. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll +0 -0
  451. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Azure.PowerShell.Common.dll +0 -0
  452. package/resources/modules/Az.Accounts/1.8.1/Microsoft.Rest.ClientRuntime.dll +0 -0
  453. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Azure.Core.dll +0 -0
  454. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  455. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll +0 -0
  456. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.dll +0 -0
  457. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Numerics.Vectors.dll +0 -0
  458. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Runtime.CompilerServices.Unsafe.dll +0 -0
  459. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Text.Encodings.Web.dll +0 -0
  460. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Text.Json.dll +0 -0
  461. package/resources/modules/Az.Accounts/1.8.1/NetCoreAssemblies/System.Threading.Tasks.Extensions.dll +0 -0
  462. package/resources/modules/Az.Accounts/1.8.1/PostImportScripts/LoadAuthenticators.ps1 +0 -197
  463. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Azure.Core.dll +0 -0
  464. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
  465. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll +0 -0
  466. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.dll +0 -0
  467. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Buffers.dll +0 -0
  468. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Diagnostics.DiagnosticSource.dll +0 -0
  469. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Numerics.Vectors.dll +0 -0
  470. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Private.ServiceModel.dll +0 -0
  471. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.4.0.4.0.dll +0 -0
  472. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.4.0.4.1.dll +0 -0
  473. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.ServiceModel.Primitives.dll +0 -0
  474. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Text.Encodings.Web.dll +0 -0
  475. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Text.Json.dll +0 -0
  476. package/resources/modules/Az.Accounts/1.8.1/PreloadAssemblies/System.Threading.Tasks.Extensions.4.3.1.0.dll +0 -0
  477. package/resources/modules/Az.Accounts/1.8.1/StartupScripts/AzError.ps1 +0 -256
@@ -1,9 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- /*---------------------------------------------------------------------------------------------
4
- * Copyright (c) Microsoft Corporation. All rights reserved.
5
- * Licensed under the MIT License. See License.txt in the project root for license information.
6
- *--------------------------------------------------------------------------------------------*/
7
3
  const linq_1 = require("@azure-tools/linq");
8
4
  const codegen_csharp_1 = require("@azure-tools/codegen-csharp");
9
5
  const exports_1 = require("../llcsharp/exports");
@@ -23,6 +19,7 @@ class ApiVersionModelExtensionsNamespace extends codegen_csharp_1.Namespace {
23
19
  }
24
20
  class ModelExtensionsNamespace extends codegen_csharp_1.Namespace {
25
21
  constructor(parent, schemas, state, objectInitializer) {
22
+ var _a, _b, _c, _d, _e, _f, _g;
26
23
  super('Models', parent);
27
24
  this.schemas = schemas;
28
25
  this.state = state;
@@ -34,180 +31,210 @@ class ModelExtensionsNamespace extends codegen_csharp_1.Namespace {
34
31
  const $this = this;
35
32
  const resolver = (s, req) => this.resolver.resolveTypeDeclaration(s, req, state);
36
33
  // Add typeconverters to model classes (partial)
37
- for (const schema of linq_1.values(schemas)) {
38
- if (!schema || schema.details.csharp.skip) {
39
- continue;
40
- }
41
- const td = this.resolver.resolveTypeDeclaration(schema, true, state);
42
- if (td instanceof exports_1.ObjectImplementation) {
43
- // it's a class object.
44
- const className = td.schema.details.csharp.name;
45
- const interfaceName = td.schema.details.csharp.interfaceName || '';
46
- const converterClass = `${className}TypeConverter`;
47
- if (this.findClassByName(className).length > 0) {
34
+ for (const schemaGroup of linq_1.values(schemas)) {
35
+ for (const schema of linq_1.values(schemaGroup)) {
36
+ if (!schema || (schema.language.csharp && schema.language.csharp.skip)) {
48
37
  continue;
49
38
  }
50
- // get the actual full namespace for the schema
51
- const fullname = schema.details.csharp.namespace || this.fullName;
52
- const ns = this.subNamespaces[fullname] || this.add(new ApiVersionModelExtensionsNamespace(this.outputFolder, fullname));
53
- // create the model extensions for each object model
54
- // 2. A partial interface with the type converter attribute
55
- const modelInterface = new codegen_csharp_1.Interface(ns, interfaceName, {
56
- partial: true,
57
- description: td.schema.details.csharp.description,
58
- fileName: `${interfaceName}.PowerShell` // make sure that the interface ends up in the same file as the class.
59
- });
60
- modelInterface.add(new codegen_csharp_1.Attribute(powershell_declarations_1.TypeConverterAttribute, { parameters: [new codegen_csharp_1.LiteralExpression(`typeof(${converterClass})`)] }));
61
- // 1. A partial class with the type converter attribute
62
- const model = new codegen_csharp_1.Class(ns, className, undefined, {
63
- partial: true,
64
- description: td.schema.details.csharp.description,
65
- fileName: `${className}.PowerShell`
66
- });
67
- // if the model is supposed to be use 'by-reference' we should create an I*Reference interface for that
68
- // and add that interface to the extension class
69
- if (schema.details.csharp.byReference) {
70
- const refInterface = `${interfaceName}_Reference`;
71
- schema.details.csharp.referenceInterface = `${ns.fullName}.${refInterface}`;
72
- const referenceInterface = new codegen_csharp_1.Interface(ns, refInterface, {
39
+ const td = this.resolver.resolveTypeDeclaration(schema, true, state);
40
+ if (td instanceof exports_1.ObjectImplementation) {
41
+ // it's a class object.
42
+ const className = ((_a = td.schema.language.csharp) === null || _a === void 0 ? void 0 : _a.name) || '';
43
+ const interfaceName = ((_b = td.schema.language.csharp) === null || _b === void 0 ? void 0 : _b.interfaceName) || '';
44
+ const converterClass = `${className}TypeConverter`;
45
+ if (this.findClassByName(className).length > 0) {
46
+ continue;
47
+ }
48
+ // get the actual full namespace for the schema
49
+ const fullname = ((_c = schema.language.csharp) === null || _c === void 0 ? void 0 : _c.namespace) || this.fullName;
50
+ const ns = this.subNamespaces[fullname] || this.add(new ApiVersionModelExtensionsNamespace(this.outputFolder, fullname));
51
+ ns.header = this.state.project.license;
52
+ // create the model extensions for each object model
53
+ // 2. A partial interface with the type converter attribute
54
+ const modelInterface = new codegen_csharp_1.Interface(ns, interfaceName, {
73
55
  partial: true,
74
- description: `Reference for model ${fullname}`,
56
+ description: (_d = td.schema.language.csharp) === null || _d === void 0 ? void 0 : _d.description,
75
57
  fileName: `${interfaceName}.PowerShell` // make sure that the interface ends up in the same file as the class.
76
58
  });
77
- referenceInterface.add(new codegen_csharp_1.Attribute(powershell_declarations_1.TypeConverterAttribute, { parameters: [new codegen_csharp_1.LiteralExpression(`typeof(${converterClass})`)] }));
78
- referenceInterface.add(new codegen_csharp_1.InterfaceProperty('Id', codegen_csharp_1.dotnet.String, { setAccess: codegen_csharp_1.Access.Internal }));
79
- model.interfaces.push(referenceInterface);
80
- // add it to the generic reference type.
81
- // referenceType = referenceType || this.CreateReferenceType();
82
- // referenceType.interfaces.push(referenceInterface);
83
- }
84
- model.add(new codegen_csharp_1.Attribute(powershell_declarations_1.TypeConverterAttribute, { parameters: [new codegen_csharp_1.LiteralExpression(`typeof(${converterClass})`)] }));
85
- model.add(new codegen_csharp_1.LambdaMethod('FromJsonString', modelInterface, new codegen_csharp_1.LiteralExpression(`FromJson(${exports_1.ClientRuntime.JsonNode.declaration}.Parse(jsonText))`), {
86
- static: codegen_csharp_1.Modifier.Static,
87
- parameters: [new codegen_csharp_1.Parameter('jsonText', codegen_csharp_1.dotnet.String, { description: 'a string containing a JSON serialized instance of this model.' })],
88
- description: `Creates a new instance of <see cref="${td.schema.details.csharp.name}" />, deserializing the content from a json string.`,
89
- returnsDescription: 'an instance of the <see cref="className" /> model class.'
90
- }));
91
- model.add(new codegen_csharp_1.LambdaMethod('ToJsonString', codegen_csharp_1.dotnet.String, new codegen_csharp_1.LiteralExpression(`ToJson(${codegen_csharp_1.dotnet.Null}, ${exports_1.ClientRuntime.SerializationMode.IncludeAll})?.ToString()`), {
92
- description: 'Serializes this instance to a json string.',
93
- returnsDescription: 'a <see cref="System.String" /> containing this model serialized to JSON text.'
94
- }));
95
- const hashDeseralizer = new exports_1.DeserializerPartialClass(model, modelInterface, codegen_csharp_1.System.Collections.IDictionary, 'Dictionary', schema, resolver).init();
96
- const psDeseralizer = new exports_1.DeserializerPartialClass(model, modelInterface, powershell_declarations_1.PSObject, 'PSObject', schema, resolver).init();
97
- // + static <interfaceType> FromJsonString(string json);
98
- // + string ToJsonString()
99
- // 3. A TypeConverter class
100
- const typeConverter = new codegen_csharp_1.Class(ns, converterClass, powershell_declarations_1.PSTypeConverter, {
101
- description: `A PowerShell PSTypeConverter to support converting to an instance of <see cref="${className}" />`,
102
- fileName: `${className}.TypeConverter`
103
- });
104
- typeConverter.add(new codegen_csharp_1.LambdaMethod('CanConvertTo', codegen_csharp_1.dotnet.Bool, codegen_csharp_1.dotnet.False, {
105
- override: codegen_csharp_1.Modifier.Override,
106
- parameters: [
107
- new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Object, { description: 'the <see cref="System.Object"/> to convert from' }),
108
- new codegen_csharp_1.Parameter('destinationType', codegen_csharp_1.System.Type, { description: 'the <see cref="System.Type" /> to convert to' })
109
- ],
110
- description: 'Determines if the <see cref="sourceValue" /> parameter can be converted to the <see cref="destinationType" /> parameter',
111
- returnsDescription: '<c>true</c> if the converter can convert the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter, otherwise <c>false</c>',
112
- }));
113
- typeConverter.add(new codegen_csharp_1.LambdaMethod('ConvertTo', codegen_csharp_1.dotnet.Object, codegen_csharp_1.dotnet.Null, {
114
- override: codegen_csharp_1.Modifier.Override,
115
- parameters: [
116
- new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Object, { description: 'the <see cref="System.Object"/> to convert from' }),
117
- new codegen_csharp_1.Parameter('destinationType', codegen_csharp_1.System.Type, { description: 'the <see cref="System.Type" /> to convert to' }),
118
- new codegen_csharp_1.Parameter('formatProvider', codegen_csharp_1.System.IFormatProvider, { description: 'not used by this TypeConverter.' }),
119
- new codegen_csharp_1.Parameter('ignoreCase', codegen_csharp_1.dotnet.Bool, { description: 'when set to <c>true</c>, will ignore the case when converting.' }),
120
- ], description: 'NotImplemented -- this will return <c>null</c>',
121
- returnsDescription: 'will always return <c>null</c>.'
122
- }));
123
- typeConverter.add(new codegen_csharp_1.LambdaMethod('CanConvertFrom', codegen_csharp_1.dotnet.Bool, new codegen_csharp_1.LiteralExpression('CanConvertFrom(sourceValue)'), {
124
- override: codegen_csharp_1.Modifier.Override,
125
- parameters: [
126
- new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Object, { description: 'the <see cref="System.Object"/> to convert from' }),
127
- new codegen_csharp_1.Parameter('destinationType', codegen_csharp_1.System.Type, { description: 'the <see cref="System.Type" /> to convert to' })
128
- ],
129
- description: 'Determines if the converter can convert the <see cref="sourceValue"/> parameter to the <see cref="destinationType" /> parameter.',
130
- returnsDescription: '<c>true</c> if the converter can convert the <see cref="sourceValue"/> parameter to the <see cref="destinationType" /> parameter, otherwise <c>false</c>.',
131
- }));
132
- typeConverter.add(new codegen_csharp_1.LambdaMethod('ConvertFrom', codegen_csharp_1.dotnet.Object, new codegen_csharp_1.LiteralExpression('ConvertFrom(sourceValue)'), {
133
- override: codegen_csharp_1.Modifier.Override,
134
- parameters: [
135
- new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Object, { description: 'the <see cref="System.Object"/> to convert from' }),
136
- new codegen_csharp_1.Parameter('destinationType', codegen_csharp_1.System.Type, { description: 'the <see cref="System.Type" /> to convert to' }),
137
- new codegen_csharp_1.Parameter('formatProvider', codegen_csharp_1.System.IFormatProvider, { description: 'not used by this TypeConverter.' }),
138
- new codegen_csharp_1.Parameter('ignoreCase', codegen_csharp_1.dotnet.Bool, { description: 'when set to <c>true</c>, will ignore the case when converting.' }),
139
- ],
140
- description: 'Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider" /> and <see cref="ignoreCase" /> ',
141
- returnsDescription: `an instance of <see cref="${className}" />, or <c>null</c> if there is no suitable conversion.`
142
- }));
143
- typeConverter.add(new codegen_csharp_1.Method('CanConvertFrom', codegen_csharp_1.dotnet.Bool, {
144
- static: codegen_csharp_1.Modifier.Static,
145
- parameters: [
146
- new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Dynamic, { description: `the <see cref="System.Object" /> instance to check if it can be converted to the <see cref="${className}" /> type.` }),
147
- ],
148
- description: 'Determines if the converter can convert the <see cref="sourceValue"/> parameter to the <see cref="destinationType" /> parameter.',
149
- returnsDescription: `<c>true</c> if the instance could be converted to a <see cref="${className}" /> type, otherwise <c>false</c> `
150
- })).add(function* () {
151
- yield codegen_csharp_1.If('null == sourceValue', codegen_csharp_1.Return(codegen_csharp_1.dotnet.True));
152
- const t = new codegen_csharp_1.LocalVariable('type', codegen_csharp_1.System.Type, { initializer: 'sourceValue.GetType()' });
153
- yield t.declarationStatement;
154
- if (schema.details.default.uid === 'universal-parameter-type' || schema.details.csharp.byReference) {
155
- yield '// we allow string conversion too.';
156
- yield codegen_csharp_1.If(`${t.value} == typeof(${codegen_csharp_1.System.String})`, codegen_csharp_1.Return(codegen_csharp_1.dotnet.True));
59
+ modelInterface.add(new codegen_csharp_1.Attribute(powershell_declarations_1.TypeConverterAttribute, { parameters: [new codegen_csharp_1.LiteralExpression(`typeof(${converterClass})`)] }));
60
+ // 1. A partial class with the type converter attribute
61
+ const model = new codegen_csharp_1.Class(ns, className, undefined, {
62
+ partial: true,
63
+ description: (_e = td.schema.language.csharp) === null || _e === void 0 ? void 0 : _e.description,
64
+ fileName: `${className}.PowerShell`
65
+ });
66
+ // if the model is supposed to be use 'by-reference' we should create an I*Reference interface for that
67
+ // and add that interface to the extension class
68
+ if ((_f = schema.language.csharp) === null || _f === void 0 ? void 0 : _f.byReference) {
69
+ const refInterface = `${interfaceName}_Reference`;
70
+ schema.language.csharp.referenceInterface = `${ns.fullName}.${refInterface}`;
71
+ const referenceInterface = new codegen_csharp_1.Interface(ns, refInterface, {
72
+ partial: true,
73
+ description: `Reference for model ${fullname}`,
74
+ fileName: `${interfaceName}.PowerShell` // make sure that the interface ends up in the same file as the class.
75
+ });
76
+ referenceInterface.add(new codegen_csharp_1.Attribute(powershell_declarations_1.TypeConverterAttribute, { parameters: [new codegen_csharp_1.LiteralExpression(`typeof(${converterClass})`)] }));
77
+ referenceInterface.add(new codegen_csharp_1.InterfaceProperty('Id', codegen_csharp_1.dotnet.String, { setAccess: codegen_csharp_1.Access.Internal }));
78
+ model.interfaces.push(referenceInterface);
79
+ // add it to the generic reference type.
80
+ // referenceType = referenceType || this.CreateReferenceType();
81
+ // referenceType.interfaces.push(referenceInterface);
82
+ }
83
+ model.add(new codegen_csharp_1.Attribute(powershell_declarations_1.TypeConverterAttribute, { parameters: [new codegen_csharp_1.LiteralExpression(`typeof(${converterClass})`)] }));
84
+ model.add(new codegen_csharp_1.LambdaMethod('FromJsonString', modelInterface, new codegen_csharp_1.LiteralExpression(`FromJson(${exports_1.ClientRuntime.JsonNode.declaration}.Parse(jsonText))`), {
85
+ static: codegen_csharp_1.Modifier.Static,
86
+ parameters: [new codegen_csharp_1.Parameter('jsonText', codegen_csharp_1.dotnet.String, { description: 'a string containing a JSON serialized instance of this model.' })],
87
+ description: `Creates a new instance of <see cref="${(_g = td.schema.language.csharp) === null || _g === void 0 ? void 0 : _g.name}" />, deserializing the content from a json string.`,
88
+ returnsDescription: `an instance of the <see cref="${className}" /> model class.`
89
+ }));
90
+ model.add(new codegen_csharp_1.LambdaMethod('ToJsonString', codegen_csharp_1.dotnet.String, new codegen_csharp_1.LiteralExpression(`ToJson(${codegen_csharp_1.dotnet.Null}, ${exports_1.ClientRuntime.SerializationMode.IncludeAll})?.ToString()`), {
91
+ description: 'Serializes this instance to a json string.',
92
+ returnsDescription: 'a <see cref="System.String" /> containing this model serialized to JSON text.'
93
+ }));
94
+ if (this.state.project.addToString) {
95
+ // add partial OverrideToString method
96
+ const returnNow = new codegen_csharp_1.Parameter('returnNow', codegen_csharp_1.dotnet.Bool, { modifier: codegen_csharp_1.ParameterModifier.Ref, description: `/// set returnNow to true if you provide a customized OverrideToString function` });
97
+ const stringResult = new codegen_csharp_1.Parameter('stringResult', codegen_csharp_1.dotnet.String, { modifier: codegen_csharp_1.ParameterModifier.Ref, description: `/// instance serialized to a string, normally it is a Json` });
98
+ const overrideToStringMethod = new codegen_csharp_1.PartialMethod('OverrideToString', codegen_csharp_1.dotnet.Void, {
99
+ parameters: [stringResult, returnNow],
100
+ description: `<c>OverrideToString</c> will be called if it is implemented. Implement this method in a partial class to enable this behavior`
101
+ });
102
+ model.add(overrideToStringMethod);
103
+ // add ToString method
104
+ const toStringMethod = new codegen_csharp_1.Method(`ToString`, codegen_csharp_1.dotnet.String, {
105
+ override: codegen_csharp_1.Modifier.Override,
106
+ access: codegen_csharp_1.Access.Public
107
+ });
108
+ toStringMethod.add(function* () {
109
+ const skip = codegen_csharp_1.Local('returnNow', `${codegen_csharp_1.dotnet.False}`);
110
+ const result = codegen_csharp_1.Local('result', `global::System.String.Empty`);
111
+ yield skip.declarationStatement;
112
+ yield result.declarationStatement;
113
+ yield `${overrideToStringMethod.invoke(`ref ${result.value}`, `ref ${skip.value}`)};`;
114
+ yield codegen_csharp_1.If(`${skip}`, codegen_csharp_1.Return(`${result}`));
115
+ yield `return ToJsonString();`;
116
+ });
117
+ model.add(toStringMethod);
157
118
  }
158
- yield codegen_csharp_1.If(codegen_csharp_1.IsAssignableFrom(powershell_declarations_1.PSObject, t), function* () {
159
- yield '// we say yest to PSObjects';
160
- yield codegen_csharp_1.Return(codegen_csharp_1.dotnet.True);
119
+ const hashDeseralizer = new exports_1.DeserializerPartialClass(model, modelInterface, codegen_csharp_1.System.Collections.IDictionary, 'Dictionary', schema, resolver).init();
120
+ const psDeseralizer = new exports_1.DeserializerPartialClass(model, modelInterface, powershell_declarations_1.PSObject, 'PSObject', schema, resolver).init();
121
+ // + static <interfaceType> FromJsonString(string json);
122
+ // + string ToJsonString()
123
+ // 3. A TypeConverter class
124
+ const typeConverter = new codegen_csharp_1.Class(ns, converterClass, powershell_declarations_1.PSTypeConverter, {
125
+ description: `A PowerShell PSTypeConverter to support converting to an instance of <see cref="${className}" />`,
126
+ fileName: `${className}.TypeConverter`
161
127
  });
162
- yield codegen_csharp_1.If(codegen_csharp_1.IsAssignableFrom(codegen_csharp_1.System.Collections.IDictionary, t), function* () {
163
- yield '// we say yest to Hashtables/dictionaries';
164
- yield codegen_csharp_1.Return(codegen_csharp_1.dotnet.True);
128
+ typeConverter.add(new codegen_csharp_1.LambdaMethod('CanConvertTo', codegen_csharp_1.dotnet.Bool, codegen_csharp_1.dotnet.False, {
129
+ override: codegen_csharp_1.Modifier.Override,
130
+ parameters: [
131
+ new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Object, { description: 'the <see cref="System.Object"/> to convert from' }),
132
+ new codegen_csharp_1.Parameter('destinationType', codegen_csharp_1.System.Type, { description: 'the <see cref="System.Type" /> to convert to' })
133
+ ],
134
+ description: 'Determines if the <paramref name="sourceValue" /> parameter can be converted to the <paramref name="destinationType" /> parameter',
135
+ returnsDescription: '<c>true</c> if the converter can convert the <paramref name="sourceValue" /> parameter to the <paramref name="destinationType" /> parameter, otherwise <c>false</c>',
136
+ }));
137
+ typeConverter.add(new codegen_csharp_1.LambdaMethod('ConvertTo', codegen_csharp_1.dotnet.Object, codegen_csharp_1.dotnet.Null, {
138
+ override: codegen_csharp_1.Modifier.Override,
139
+ parameters: [
140
+ new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Object, { description: 'the <see cref="System.Object"/> to convert from' }),
141
+ new codegen_csharp_1.Parameter('destinationType', codegen_csharp_1.System.Type, { description: 'the <see cref="System.Type" /> to convert to' }),
142
+ new codegen_csharp_1.Parameter('formatProvider', codegen_csharp_1.System.IFormatProvider, { description: 'not used by this TypeConverter.' }),
143
+ new codegen_csharp_1.Parameter('ignoreCase', codegen_csharp_1.dotnet.Bool, { description: 'when set to <c>true</c>, will ignore the case when converting.' }),
144
+ ], description: 'NotImplemented -- this will return <c>null</c>',
145
+ returnsDescription: 'will always return <c>null</c>.'
146
+ }));
147
+ typeConverter.add(new codegen_csharp_1.LambdaMethod('CanConvertFrom', codegen_csharp_1.dotnet.Bool, new codegen_csharp_1.LiteralExpression('CanConvertFrom(sourceValue)'), {
148
+ override: codegen_csharp_1.Modifier.Override,
149
+ parameters: [
150
+ new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Object, { description: 'the <see cref="System.Object"/> to convert from' }),
151
+ new codegen_csharp_1.Parameter('destinationType', codegen_csharp_1.System.Type, { description: 'the <see cref="System.Type" /> to convert to' })
152
+ ],
153
+ description: 'Determines if the converter can convert the <paramref name="sourceValue"/> parameter to the <paramref name="destinationType" /> parameter.',
154
+ returnsDescription: '<c>true</c> if the converter can convert the <paramref name="sourceValue"/> parameter to the <paramref name="destinationType" /> parameter, otherwise <c>false</c>.',
155
+ }));
156
+ typeConverter.add(new codegen_csharp_1.LambdaMethod('ConvertFrom', codegen_csharp_1.dotnet.Object, new codegen_csharp_1.LiteralExpression('ConvertFrom(sourceValue)'), {
157
+ override: codegen_csharp_1.Modifier.Override,
158
+ parameters: [
159
+ new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Object, { description: 'the <see cref="System.Object"/> to convert from' }),
160
+ new codegen_csharp_1.Parameter('destinationType', codegen_csharp_1.System.Type, { description: 'the <see cref="System.Type" /> to convert to' }),
161
+ new codegen_csharp_1.Parameter('formatProvider', codegen_csharp_1.System.IFormatProvider, { description: 'not used by this TypeConverter.' }),
162
+ new codegen_csharp_1.Parameter('ignoreCase', codegen_csharp_1.dotnet.Bool, { description: 'when set to <c>true</c>, will ignore the case when converting.' }),
163
+ ],
164
+ description: 'Converts the <paramref name="sourceValue" /> parameter to the <paramref name="destinationType" /> parameter using <paramref name="formatProvider" /> and <paramref name="ignoreCase" /> ',
165
+ returnsDescription: `an instance of <see cref="${className}" />, or <c>null</c> if there is no suitable conversion.`
166
+ }));
167
+ typeConverter.add(new codegen_csharp_1.Method('CanConvertFrom', codegen_csharp_1.dotnet.Bool, {
168
+ static: codegen_csharp_1.Modifier.Static,
169
+ parameters: [
170
+ new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Dynamic, { description: `the <see cref="System.Object" /> instance to check if it can be converted to the <see cref="${className}" /> type.` }),
171
+ ],
172
+ description: `Determines if the converter can convert the <paramref name="sourceValue"/> parameter to the <see cref="${className}"/> type.`,
173
+ returnsDescription: `<c>true</c> if the instance could be converted to a <see cref="${className}" /> type, otherwise <c>false</c> `
174
+ })).add(function* () {
175
+ var _a;
176
+ yield codegen_csharp_1.If('null == sourceValue', codegen_csharp_1.Return(codegen_csharp_1.dotnet.True));
177
+ const t = new codegen_csharp_1.LocalVariable('type', codegen_csharp_1.System.Type, { initializer: 'sourceValue.GetType()' });
178
+ yield t.declarationStatement;
179
+ if (schema.language.default.uid || ((_a = schema.language.csharp) === null || _a === void 0 ? void 0 : _a.byReference)) {
180
+ yield '// we allow string conversion too.';
181
+ yield codegen_csharp_1.If(`${t.value} == typeof(${codegen_csharp_1.System.String})`, codegen_csharp_1.Return(codegen_csharp_1.dotnet.True));
182
+ }
183
+ yield codegen_csharp_1.If(codegen_csharp_1.IsAssignableFrom(powershell_declarations_1.PSObject, t), function* () {
184
+ yield '// we say yest to PSObjects';
185
+ yield codegen_csharp_1.Return(codegen_csharp_1.dotnet.True);
186
+ });
187
+ yield codegen_csharp_1.If(codegen_csharp_1.IsAssignableFrom(codegen_csharp_1.System.Collections.IDictionary, t), function* () {
188
+ yield '// we say yest to Hashtables/dictionaries';
189
+ yield codegen_csharp_1.Return(codegen_csharp_1.dotnet.True);
190
+ });
191
+ yield codegen_csharp_1.Try(codegen_csharp_1.If('null != sourceValue.ToJsonString()', codegen_csharp_1.Return(codegen_csharp_1.dotnet.True)));
192
+ yield codegen_csharp_1.Catch(undefined, '// Not one of our objects');
193
+ yield codegen_csharp_1.Try(function* () {
194
+ const t = new codegen_csharp_1.LocalVariable('text', codegen_csharp_1.dotnet.String, { initializer: 'sourceValue.ToString()?.Trim()' });
195
+ yield t.declarationStatement;
196
+ yield codegen_csharp_1.Return(`${codegen_csharp_1.dotnet.True} == ${t.value}?.StartsWith("{") && ${codegen_csharp_1.dotnet.True} == ${t.value}?.EndsWith("}") && ${exports_1.ClientRuntime.JsonNode.Parse(t)}.Type == ${exports_1.ClientRuntime.JsonType.Object}`);
197
+ });
198
+ yield codegen_csharp_1.Catch(undefined, '// Doesn\'t look like it can be treated as JSON');
199
+ yield codegen_csharp_1.Return(codegen_csharp_1.dotnet.False);
165
200
  });
166
- yield codegen_csharp_1.Try(codegen_csharp_1.If('null != sourceValue.ToJsonString()', codegen_csharp_1.Return(codegen_csharp_1.dotnet.True)));
167
- yield codegen_csharp_1.Catch(undefined, '// Not one of our objects');
168
- yield codegen_csharp_1.Try(function* () {
169
- const t = new codegen_csharp_1.LocalVariable('text', codegen_csharp_1.dotnet.String, { initializer: 'sourceValue.ToString()?.Trim()' });
201
+ typeConverter.add(new codegen_csharp_1.Method('ConvertFrom', modelInterface, {
202
+ static: codegen_csharp_1.Modifier.Static,
203
+ parameters: [
204
+ new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Dynamic, {
205
+ description: `the value to convert into an instance of <see cref="${className}" />.`
206
+ }),
207
+ ],
208
+ description: `Converts the <paramref name="sourceValue" /> parameter into an instance of <see cref="${className}" />`,
209
+ returnsDescription: `an instance of <see cref="${className}" />, or <c>null</c> if there is no suitable conversion.`
210
+ })).add(function* () {
211
+ var _a, _b;
212
+ // null begets null
213
+ yield codegen_csharp_1.If('null == sourceValue', codegen_csharp_1.Return(codegen_csharp_1.dotnet.Null));
214
+ const t = new codegen_csharp_1.LocalVariable('type', codegen_csharp_1.System.Type, { initializer: 'sourceValue.GetType()' });
170
215
  yield t.declarationStatement;
171
- yield codegen_csharp_1.Return(`${codegen_csharp_1.dotnet.True} == ${t.value}?.StartsWith("{") && ${codegen_csharp_1.dotnet.True} == ${t.value}?.EndsWith("}") && ${exports_1.ClientRuntime.JsonNode.Parse(t)}.Type == ${exports_1.ClientRuntime.JsonType.Object}`);
216
+ if (($this.state.project.azure && schema.language.default.uid === 'universal-parameter-type') || ((_a = schema.language.csharp) === null || _a === void 0 ? void 0 : _a.byReference)) {
217
+ yield '// support direct string to id type conversion.';
218
+ yield codegen_csharp_1.If(`${t.value} == typeof(${codegen_csharp_1.System.String})`, function* () {
219
+ yield codegen_csharp_1.Return(`new ${className} { Id = sourceValue }`);
220
+ });
221
+ }
222
+ if ((_b = schema.language.csharp) === null || _b === void 0 ? void 0 : _b.byReference) {
223
+ yield '// if Id is present with by-reference schemas, just return the type with Id ';
224
+ yield codegen_csharp_1.Try(codegen_csharp_1.Return(`new ${className} { Id = sourceValue.Id }`));
225
+ yield codegen_csharp_1.Catch(undefined, '// Not an Id reference parameter');
226
+ }
227
+ // if the type can be assigned directly, do that
228
+ yield codegen_csharp_1.If(codegen_csharp_1.IsAssignableFrom(td, t), codegen_csharp_1.Return('sourceValue'));
229
+ // try using json first (either from string or toJsonString())
230
+ yield codegen_csharp_1.Try(codegen_csharp_1.Return(`${className}.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());`));
231
+ yield codegen_csharp_1.Catch(undefined, '// Unable to use JSON pattern');
232
+ yield codegen_csharp_1.If(codegen_csharp_1.IsAssignableFrom(powershell_declarations_1.PSObject, t), codegen_csharp_1.Return(`${className}.DeserializeFromPSObject(sourceValue)`));
233
+ yield codegen_csharp_1.If(codegen_csharp_1.IsAssignableFrom(codegen_csharp_1.System.Collections.IDictionary, t), codegen_csharp_1.Return(`${className}.DeserializeFromDictionary(sourceValue)`));
234
+ // null if not successful
235
+ yield codegen_csharp_1.Return(codegen_csharp_1.dotnet.Null);
172
236
  });
173
- yield codegen_csharp_1.Catch(undefined, '// Doesn\'t look like it can be treated as JSON');
174
- yield codegen_csharp_1.Return(codegen_csharp_1.dotnet.False);
175
- });
176
- typeConverter.add(new codegen_csharp_1.Method('ConvertFrom', modelInterface, {
177
- static: codegen_csharp_1.Modifier.Static,
178
- parameters: [
179
- new codegen_csharp_1.Parameter('sourceValue', codegen_csharp_1.dotnet.Dynamic, {
180
- description: `the value to convert into an instance of <see cref="${className}" />.`
181
- }),
182
- ],
183
- description: 'Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider" /> and <see cref="ignoreCase" />',
184
- returnsDescription: `an instance of <see cref="${className}" />, or <c>null</c> if there is no suitable conversion.`
185
- })).add(function* () {
186
- // null begets null
187
- yield codegen_csharp_1.If('null == sourceValue', codegen_csharp_1.Return(codegen_csharp_1.dotnet.Null));
188
- const t = new codegen_csharp_1.LocalVariable('type', codegen_csharp_1.System.Type, { initializer: 'sourceValue.GetType()' });
189
- yield t.declarationStatement;
190
- if (($this.state.project.azure && schema.details.default.uid === 'universal-parameter-type') || schema.details.csharp.byReference) {
191
- yield '// support direct string to id type conversion.';
192
- yield codegen_csharp_1.If(`${t.value} == typeof(${codegen_csharp_1.System.String})`, function* () {
193
- yield codegen_csharp_1.Return(`new ${className} { Id = sourceValue }`);
194
- });
195
- }
196
- if (schema.details.csharp.byReference) {
197
- yield '// if Id is present with by-reference schemas, just return the type with Id ';
198
- yield codegen_csharp_1.Try(codegen_csharp_1.Return(`new ${className} { Id = sourceValue.Id }`));
199
- yield codegen_csharp_1.Catch(undefined, '// Not an Id reference parameter');
200
- }
201
- // if the type can be assigned directly, do that
202
- yield codegen_csharp_1.If(codegen_csharp_1.IsAssignableFrom(td, t), codegen_csharp_1.Return('sourceValue'));
203
- // try using json first (either from string or toJsonString())
204
- yield codegen_csharp_1.Try(codegen_csharp_1.Return(`${className}.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());`));
205
- yield codegen_csharp_1.Catch(undefined, '// Unable to use JSON pattern');
206
- yield codegen_csharp_1.If(codegen_csharp_1.IsAssignableFrom(powershell_declarations_1.PSObject, t), codegen_csharp_1.Return(`${className}.DeserializeFromPSObject(sourceValue)`));
207
- yield codegen_csharp_1.If(codegen_csharp_1.IsAssignableFrom(codegen_csharp_1.System.Collections.IDictionary, t), codegen_csharp_1.Return(`${className}.DeserializeFromDictionary(sourceValue)`));
208
- // null if not successful
209
- yield codegen_csharp_1.Return(codegen_csharp_1.dotnet.Null);
210
- });
237
+ }
211
238
  }
212
239
  }
213
240
  }
@@ -1 +1 @@
1
- {"version":3,"file":"model-extensions.js","sourceRoot":"","sources":["../../models/model-extensions.ts"],"names":[],"mappings":";;AAAA;;;gGAGgG;AAChG,4CAA4E;AAC5E,gEAA6S;AAC7S,iDAAsI;AAEtI,iFAAwG;AACxG,+BAA4B;AAI5B,MAAM,kCAAmC,SAAQ,0BAAS;IAIxD,YAAoB,UAAkB,EAAmB,UAAkB,EAAE,iBAAyD;QACpI,KAAK,CAAC,UAAU,CAAC,CAAC;QADA,eAAU,GAAV,UAAU,CAAQ;QAAmB,eAAU,GAAV,UAAU,CAAQ;QAEzE,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,gCAAe,CAAC,GAAG,uBAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC;IACpE,CAAC;IAPD,IAAW,YAAY;QACrB,OAAO,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,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CAAC,CAAC,EAAE,uBAAM,CAAC,aAAa,CAAC,CAAC,CAAC;wBAEzD,8DAA8D;wBAC9D,MAAM,oBAAG,CAAC,uBAAM,CAAC,GAAG,SAAS,sGAAsG,CAAC,CAAC,CAAC;wBACtI,MAAM,sBAAK,CAAC,SAAS,EAAE,+BAA+B,CAAC,CAAC;wBAExD,MAAM,mBAAE,CAAC,iCAAgB,CAAC,kCAAQ,EAAE,CAAC,CAAC,EAAE,uBAAM,CAAC,GAAG,SAAS,uCAAuC,CAAC,CAAC,CAAC;wBACrG,MAAM,mBAAE,CAAC,iCAAgB,CAAC,uBAAM,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,uBAAM,CAAC,GAAG,SAAS,yCAAyC,CAAC,CAAC,CAAC;wBAE7H,yBAAyB;wBACzB,MAAM,uBAAM,CAAC,uBAAM,CAAC,IAAI,CAAC,CAAC;oBAC5B,CAAC,CAAC,CAAC;iBACJ;aACF;SACF;IACH,CAAC;IAjQD,mBAAmB;QACjB,MAAM,EAAE,GAAG,IAAI,sBAAK,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAC5C,EAAE,CAAC,GAAG,CAAC,IAAI,yBAAQ,CAAC,IAAI,EAAE,uBAAM,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,uBAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC1E,OAAO,EAAE,CAAC;IACZ,CAAC;IAGD,IAAW,YAAY;QACrB,OAAO,WAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;CAyPF;AAnQD,4DAmQC"}
@@ -1,7 +1,7 @@
1
1
  import { Class, ClassType, Field, Method, Namespace, Parameter, TypeDeclaration } from '@azure-tools/codegen-csharp';
2
2
  import { State } from '../internal/state';
3
3
  import { DeepPartial } from '@azure-tools/codegen';
4
- export declare class ModuleClass extends Class {
4
+ export declare class NewModuleClass extends Class {
5
5
  private readonly state;
6
6
  TaskOfHttpResponseMessage: TypeDeclaration;
7
7
  incomingSignalFunc: ClassType;
@@ -22,13 +22,15 @@ export declare class ModuleClass extends Class {
22
22
  pGetEventData: Parameter;
23
23
  pParameterSetName: Parameter;
24
24
  pParameterSetNameWithDefault: Parameter;
25
+ pExtensibleParameters: Parameter;
25
26
  pProcessRecordId: Parameter;
26
27
  pException: Parameter;
27
28
  fPipeline: Field;
28
29
  fPipelineWithProxy: Field;
29
30
  fHandler: Field;
30
31
  fWebProxy: Field;
31
- constructor(namespace: Namespace, state: State, objectInitializer?: DeepPartial<ModuleClass>);
32
+ fUseProxy: Field;
33
+ constructor(namespace: Namespace, state: State, objectInitializer?: DeepPartial<NewModuleClass>);
32
34
  createInitAndPipeline(namespace: Namespace): void;
33
35
  createAzureInitAndPipeline(namespace: Namespace): void;
34
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"module-class.d.ts","sourceRoot":"","sources":["../../module/module-class.ts"],"names":[],"mappings":"AAKA,OAAO,EAAiB,KAAK,EAAE,SAAS,EAAuB,KAAK,EAAgG,MAAM,EAAY,SAAS,EAAE,SAAS,EAA4F,eAAe,EAAgC,MAAM,6BAA6B,CAAC;AAGzX,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,qBAAa,WAAY,SAAQ,KAAK;IA6DF,OAAO,CAAC,QAAQ,CAAC,KAAK;IA1DxD,yBAAyB,kBAAoE;IAG7F,kBAAkB,YAI6B;IAE/C,iBAAiB,YAU8B;IAE/C,sBAAsB,cAIpB;IAEF,QAAQ,YAGwC;IAEhD,UAAU,SAA4H;IACtI,oBAAoB,EAAG,MAAM,CAAC;IAE9B,eAAe,YAAsJ;IACrK,SAAS,YAA+I;IACxJ,MAAM,YAAiF;IACvF,gBAAgB,YAAiG;IACjH,sBAAsB,YAAiI;IAEvJ,cAAc,YAAmG;IACjH,cAAc,YAAq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