@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.
Files changed (494) hide show
  1. package/.rush/temp/package-deps_build.json +214 -206
  2. package/.rush/temp/shrinkwrap-deps.json +253 -280
  3. package/autorest-configuration-for-sdk.md +9 -3
  4. package/autorest-configuration.md +1 -1
  5. package/dist/cmdlets/class.d.ts +27 -2
  6. package/dist/cmdlets/class.d.ts.map +1 -1
  7. package/dist/cmdlets/class.js +913 -549
  8. package/dist/cmdlets/class.js.map +1 -1
  9. package/dist/cmdlets/namespace.d.ts.map +1 -1
  10. package/dist/cmdlets/namespace.js +39 -5
  11. package/dist/cmdlets/namespace.js.map +1 -1
  12. package/dist/enums/namespace.js +5 -5
  13. package/dist/enums/namespace.js.map +1 -1
  14. package/dist/exports.d.ts +3 -0
  15. package/dist/exports.d.ts.map +1 -0
  16. package/dist/exports.js +19 -0
  17. package/dist/exports.js.map +1 -0
  18. package/dist/generators/gitignore.d.ts.map +1 -1
  19. package/dist/generators/gitignore.js +2 -0
  20. package/dist/generators/gitignore.js.map +1 -1
  21. package/dist/generators/psm1.custom.js +2 -2
  22. package/dist/generators/psm1.custom.js.map +1 -1
  23. package/dist/generators/psm1.d.ts.map +1 -1
  24. package/dist/generators/psm1.internal.js +2 -2
  25. package/dist/generators/psm1.internal.js.map +1 -1
  26. package/dist/generators/psm1.js +17 -11
  27. package/dist/generators/psm1.js.map +1 -1
  28. package/dist/generators/readme.d.ts.map +1 -1
  29. package/dist/generators/readme.js +0 -3
  30. package/dist/generators/readme.js.map +1 -1
  31. package/dist/generators/script-cmdlet.js +18 -18
  32. package/dist/generators/script-cmdlet.js.map +1 -1
  33. package/dist/internal/name-inferrer.d.ts +1 -1
  34. package/dist/internal/name-inferrer.d.ts.map +1 -1
  35. package/dist/internal/name-inferrer.js +12 -12
  36. package/dist/internal/name-inferrer.js.map +1 -1
  37. package/dist/internal/powershell-declarations.d.ts +3 -0
  38. package/dist/internal/powershell-declarations.d.ts.map +1 -1
  39. package/dist/internal/powershell-declarations.js +5 -2
  40. package/dist/internal/powershell-declarations.js.map +1 -1
  41. package/dist/internal/project.d.ts +14 -8
  42. package/dist/internal/project.d.ts.map +1 -1
  43. package/dist/internal/project.js +27 -20
  44. package/dist/internal/project.js.map +1 -1
  45. package/dist/internal/state.d.ts +3 -2
  46. package/dist/internal/state.d.ts.map +1 -1
  47. package/dist/internal/state.js.map +1 -1
  48. package/dist/llcsharp/clientruntime.d.ts +1 -0
  49. package/dist/llcsharp/clientruntime.d.ts.map +1 -1
  50. package/dist/llcsharp/clientruntime.js +12 -11
  51. package/dist/llcsharp/clientruntime.js.map +1 -1
  52. package/dist/llcsharp/code-model.d.ts +7 -7
  53. package/dist/llcsharp/code-model.d.ts.map +1 -1
  54. package/dist/llcsharp/enums/enum.d.ts +1 -1
  55. package/dist/llcsharp/enums/enum.d.ts.map +1 -1
  56. package/dist/llcsharp/enums/enum.js +42 -42
  57. package/dist/llcsharp/enums/enum.js.map +1 -1
  58. package/dist/llcsharp/exports.js +5 -1
  59. package/dist/llcsharp/exports.js.map +1 -1
  60. package/dist/llcsharp/generator.d.ts +3 -2
  61. package/dist/llcsharp/generator.d.ts.map +1 -1
  62. package/dist/llcsharp/generator.js.map +1 -1
  63. package/dist/llcsharp/model/idictionary.js +16 -16
  64. package/dist/llcsharp/model/idictionary.js.map +1 -1
  65. package/dist/llcsharp/model/interface.d.ts +1 -1
  66. package/dist/llcsharp/model/interface.d.ts.map +1 -1
  67. package/dist/llcsharp/model/interface.js +25 -11
  68. package/dist/llcsharp/model/interface.js.map +1 -1
  69. package/dist/llcsharp/model/model-class-dictionary.js +18 -18
  70. package/dist/llcsharp/model/model-class-dictionary.js.map +1 -1
  71. package/dist/llcsharp/model/model-class-json.js +20 -20
  72. package/dist/llcsharp/model/model-class-json.js.map +1 -1
  73. package/dist/llcsharp/model/model-class-serializer.d.ts +1 -1
  74. package/dist/llcsharp/model/model-class-serializer.d.ts.map +1 -1
  75. package/dist/llcsharp/model/model-class-serializer.js +6 -6
  76. package/dist/llcsharp/model/model-class-serializer.js.map +1 -1
  77. package/dist/llcsharp/model/model-class.d.ts +1 -1
  78. package/dist/llcsharp/model/model-class.d.ts.map +1 -1
  79. package/dist/llcsharp/model/model-class.js +108 -97
  80. package/dist/llcsharp/model/model-class.js.map +1 -1
  81. package/dist/llcsharp/model/namespace.d.ts +1 -1
  82. package/dist/llcsharp/model/namespace.d.ts.map +1 -1
  83. package/dist/llcsharp/model/namespace.js +4 -12
  84. package/dist/llcsharp/model/namespace.js.map +1 -1
  85. package/dist/llcsharp/model/property.d.ts +1 -1
  86. package/dist/llcsharp/model/property.d.ts.map +1 -1
  87. package/dist/llcsharp/model/property.js +20 -20
  88. package/dist/llcsharp/model/property.js.map +1 -1
  89. package/dist/llcsharp/operation/api-class.d.ts.map +1 -1
  90. package/dist/llcsharp/operation/api-class.js +26 -1
  91. package/dist/llcsharp/operation/api-class.js.map +1 -1
  92. package/dist/llcsharp/operation/method.d.ts +10 -5
  93. package/dist/llcsharp/operation/method.d.ts.map +1 -1
  94. package/dist/llcsharp/operation/method.js +287 -134
  95. package/dist/llcsharp/operation/method.js.map +1 -1
  96. package/dist/llcsharp/operation/parameter.d.ts +1 -1
  97. package/dist/llcsharp/operation/parameter.d.ts.map +1 -1
  98. package/dist/llcsharp/operation/parameter.js +10 -10
  99. package/dist/llcsharp/operation/parameter.js.map +1 -1
  100. package/dist/llcsharp/project.d.ts +10 -5
  101. package/dist/llcsharp/project.d.ts.map +1 -1
  102. package/dist/llcsharp/project.js +15 -4
  103. package/dist/llcsharp/project.js.map +1 -1
  104. package/dist/llcsharp/schema/Uuid.d.ts +1 -1
  105. package/dist/llcsharp/schema/Uuid.d.ts.map +1 -1
  106. package/dist/llcsharp/schema/Uuid.js +2 -2
  107. package/dist/llcsharp/schema/Uuid.js.map +1 -1
  108. package/dist/llcsharp/schema/array.d.ts +1 -1
  109. package/dist/llcsharp/schema/array.d.ts.map +1 -1
  110. package/dist/llcsharp/schema/array.js +45 -43
  111. package/dist/llcsharp/schema/array.js.map +1 -1
  112. package/dist/llcsharp/schema/binary.d.ts +1 -1
  113. package/dist/llcsharp/schema/binary.d.ts.map +1 -1
  114. package/dist/llcsharp/schema/binary.js +9 -9
  115. package/dist/llcsharp/schema/binary.js.map +1 -1
  116. package/dist/llcsharp/schema/boolean.d.ts +1 -1
  117. package/dist/llcsharp/schema/boolean.d.ts.map +1 -1
  118. package/dist/llcsharp/schema/byte-array.d.ts +1 -1
  119. package/dist/llcsharp/schema/byte-array.d.ts.map +1 -1
  120. package/dist/llcsharp/schema/byte-array.js +24 -24
  121. package/dist/llcsharp/schema/byte-array.js.map +1 -1
  122. package/dist/llcsharp/schema/char.d.ts +1 -1
  123. package/dist/llcsharp/schema/char.d.ts.map +1 -1
  124. package/dist/llcsharp/schema/char.js +1 -1
  125. package/dist/llcsharp/schema/char.js.map +1 -1
  126. package/dist/llcsharp/schema/date-time.d.ts +1 -1
  127. package/dist/llcsharp/schema/date-time.d.ts.map +1 -1
  128. package/dist/llcsharp/schema/date-time.js +45 -41
  129. package/dist/llcsharp/schema/date-time.js.map +1 -1
  130. package/dist/llcsharp/schema/date.d.ts +1 -1
  131. package/dist/llcsharp/schema/date.d.ts.map +1 -1
  132. package/dist/llcsharp/schema/duration.d.ts +1 -1
  133. package/dist/llcsharp/schema/duration.d.ts.map +1 -1
  134. package/dist/llcsharp/schema/duration.js +9 -7
  135. package/dist/llcsharp/schema/duration.js.map +1 -1
  136. package/dist/llcsharp/schema/enum.d.ts +6 -2
  137. package/dist/llcsharp/schema/enum.d.ts.map +1 -1
  138. package/dist/llcsharp/schema/enum.js +13 -4
  139. package/dist/llcsharp/schema/enum.js.map +1 -1
  140. package/dist/llcsharp/schema/extended-type-declaration.d.ts +1 -1
  141. package/dist/llcsharp/schema/extended-type-declaration.d.ts.map +1 -1
  142. package/dist/llcsharp/schema/fixed-array.d.ts +1 -1
  143. package/dist/llcsharp/schema/fixed-array.d.ts.map +1 -1
  144. package/dist/llcsharp/schema/fixed-array.js +44 -42
  145. package/dist/llcsharp/schema/fixed-array.js.map +1 -1
  146. package/dist/llcsharp/schema/integer.d.ts +1 -1
  147. package/dist/llcsharp/schema/integer.d.ts.map +1 -1
  148. package/dist/llcsharp/schema/integer.js +5 -5
  149. package/dist/llcsharp/schema/integer.js.map +1 -1
  150. package/dist/llcsharp/schema/object.d.ts +1 -1
  151. package/dist/llcsharp/schema/object.d.ts.map +1 -1
  152. package/dist/llcsharp/schema/object.js +28 -28
  153. package/dist/llcsharp/schema/object.js.map +1 -1
  154. package/dist/llcsharp/schema/password.d.ts +1 -1
  155. package/dist/llcsharp/schema/password.d.ts.map +1 -1
  156. package/dist/llcsharp/schema/password.js +13 -13
  157. package/dist/llcsharp/schema/password.js.map +1 -1
  158. package/dist/llcsharp/schema/primitive.d.ts +1 -1
  159. package/dist/llcsharp/schema/primitive.d.ts.map +1 -1
  160. package/dist/llcsharp/schema/primitive.js +40 -37
  161. package/dist/llcsharp/schema/primitive.js.map +1 -1
  162. package/dist/llcsharp/schema/schema-resolver.d.ts +1 -1
  163. package/dist/llcsharp/schema/schema-resolver.d.ts.map +1 -1
  164. package/dist/llcsharp/schema/schema-resolver.js +5 -9
  165. package/dist/llcsharp/schema/schema-resolver.js.map +1 -1
  166. package/dist/llcsharp/schema/string.d.ts +1 -1
  167. package/dist/llcsharp/schema/string.d.ts.map +1 -1
  168. package/dist/llcsharp/schema/string.js +48 -44
  169. package/dist/llcsharp/schema/string.js.map +1 -1
  170. package/dist/llcsharp/schema/uri.d.ts +1 -1
  171. package/dist/llcsharp/schema/uri.d.ts.map +1 -1
  172. package/dist/llcsharp/schema/uri.js +2 -2
  173. package/dist/llcsharp/schema/uri.js.map +1 -1
  174. package/dist/llcsharp/validations.js +2 -2
  175. package/dist/llcsharp/validations.js.map +1 -1
  176. package/dist/main.d.ts.map +1 -1
  177. package/dist/main.js +5 -2
  178. package/dist/main.js.map +1 -1
  179. package/dist/models/model-extensions.d.ts +1 -1
  180. package/dist/models/model-extensions.d.ts.map +1 -1
  181. package/dist/models/model-extensions.js +39 -39
  182. package/dist/models/model-extensions.js.map +1 -1
  183. package/dist/module/module-class.d.ts.map +1 -1
  184. package/dist/module/module-class.js +45 -15
  185. package/dist/module/module-class.js.map +1 -1
  186. package/dist/module/module-namespace.js +3 -3
  187. package/dist/module/module-namespace.js.map +1 -1
  188. package/dist/plugins/add-azure-completers-v2.d.ts +6 -1
  189. package/dist/plugins/add-azure-completers-v2.d.ts.map +1 -1
  190. package/dist/plugins/add-azure-completers-v2.js +5 -4
  191. package/dist/plugins/add-azure-completers-v2.js.map +1 -1
  192. package/dist/plugins/create-commands-v2.d.ts +17 -7
  193. package/dist/plugins/create-commands-v2.d.ts.map +1 -1
  194. package/dist/plugins/create-commands-v2.js +302 -66
  195. package/dist/plugins/create-commands-v2.js.map +1 -1
  196. package/dist/plugins/cs-namer-v2.d.ts +6 -1
  197. package/dist/plugins/cs-namer-v2.d.ts.map +1 -1
  198. package/dist/plugins/cs-namer-v2.js +42 -41
  199. package/dist/plugins/cs-namer-v2.js.map +1 -1
  200. package/dist/plugins/llcsharp-v2.d.ts +5 -2
  201. package/dist/plugins/llcsharp-v2.d.ts.map +1 -1
  202. package/dist/plugins/llcsharp-v2.js +14 -9
  203. package/dist/plugins/llcsharp-v2.js.map +1 -1
  204. package/dist/plugins/modifiers-v2.d.ts +6 -1
  205. package/dist/plugins/modifiers-v2.d.ts.map +1 -1
  206. package/dist/plugins/modifiers-v2.js +135 -88
  207. package/dist/plugins/modifiers-v2.js.map +1 -1
  208. package/dist/plugins/plugin-create-inline-properties.d.ts +6 -1
  209. package/dist/plugins/plugin-create-inline-properties.d.ts.map +1 -1
  210. package/dist/plugins/plugin-create-inline-properties.js +44 -32
  211. package/dist/plugins/plugin-create-inline-properties.js.map +1 -1
  212. package/dist/plugins/plugin-tweak-m4-model.d.ts +7 -1
  213. package/dist/plugins/plugin-tweak-m4-model.d.ts.map +1 -1
  214. package/dist/plugins/plugin-tweak-m4-model.js +39 -10
  215. package/dist/plugins/plugin-tweak-m4-model.js.map +1 -1
  216. package/dist/plugins/plugin-tweak-model-azure-v2.d.ts +6 -1
  217. package/dist/plugins/plugin-tweak-model-azure-v2.d.ts.map +1 -1
  218. package/dist/plugins/plugin-tweak-model-azure-v2.js +32 -22
  219. package/dist/plugins/plugin-tweak-model-azure-v2.js.map +1 -1
  220. package/dist/plugins/plugin-tweak-model.d.ts +6 -1
  221. package/dist/plugins/plugin-tweak-model.d.ts.map +1 -1
  222. package/dist/plugins/plugin-tweak-model.js +33 -32
  223. package/dist/plugins/plugin-tweak-model.js.map +1 -1
  224. package/dist/plugins/powershell-v2.d.ts +5 -2
  225. package/dist/plugins/powershell-v2.d.ts.map +1 -1
  226. package/dist/plugins/powershell-v2.js +32 -28
  227. package/dist/plugins/powershell-v2.js.map +1 -1
  228. package/dist/plugins/ps-namer-v2.d.ts +6 -1
  229. package/dist/plugins/ps-namer-v2.d.ts.map +1 -1
  230. package/dist/plugins/ps-namer-v2.js +33 -32
  231. package/dist/plugins/ps-namer-v2.js.map +1 -1
  232. package/dist/plugins/sdk-create-inline-properties.d.ts +1 -1
  233. package/dist/plugins/sdk-create-inline-properties.d.ts.map +1 -1
  234. package/dist/plugins/sdk-create-inline-properties.js +129 -39
  235. package/dist/plugins/sdk-create-inline-properties.js.map +1 -1
  236. package/dist/plugins/sdk-cs-namer.d.ts +1 -1
  237. package/dist/plugins/sdk-cs-namer.d.ts.map +1 -1
  238. package/dist/plugins/sdk-cs-namer.js +59 -34
  239. package/dist/plugins/sdk-cs-namer.js.map +1 -1
  240. package/dist/plugins/sdk-cs-simplifier.d.ts +1 -1
  241. package/dist/plugins/sdk-cs-simplifier.d.ts.map +1 -1
  242. package/dist/plugins/sdk-cs-simplifier.js +3 -3
  243. package/dist/plugins/sdk-cs-simplifier.js.map +1 -1
  244. package/dist/plugins/sdk-generate.d.ts +1 -1
  245. package/dist/plugins/sdk-generate.d.ts.map +1 -1
  246. package/dist/plugins/sdk-generate.js +23 -18
  247. package/dist/plugins/sdk-generate.js.map +1 -1
  248. package/dist/plugins/sdk-modifiers.d.ts +4 -0
  249. package/dist/plugins/sdk-modifiers.d.ts.map +1 -0
  250. package/dist/plugins/sdk-modifiers.js +175 -0
  251. package/dist/plugins/sdk-modifiers.js.map +1 -0
  252. package/dist/plugins/sdk-tweak-model.d.ts +1 -1
  253. package/dist/plugins/sdk-tweak-model.d.ts.map +1 -1
  254. package/dist/plugins/sdk-tweak-model.js +140 -44
  255. package/dist/plugins/sdk-tweak-model.js.map +1 -1
  256. package/dist/sdk/project.d.ts +2 -2
  257. package/dist/sdk/project.d.ts.map +1 -1
  258. package/dist/sdk/project.js +10 -9
  259. package/dist/sdk/project.js.map +1 -1
  260. package/dist/sdk/state.d.ts +2 -2
  261. package/dist/sdk/state.d.ts.map +1 -1
  262. package/dist/sdk/utility.d.ts +12 -3
  263. package/dist/sdk/utility.d.ts.map +1 -1
  264. package/dist/sdk/utility.js +122 -30
  265. package/dist/sdk/utility.js.map +1 -1
  266. package/dist/utils/PwshModel.d.ts +1 -1
  267. package/dist/utils/PwshModel.d.ts.map +1 -1
  268. package/dist/utils/PwshModel.js +1 -1
  269. package/dist/utils/PwshModel.js.map +1 -1
  270. package/dist/utils/SdkModel.d.ts +1 -1
  271. package/dist/utils/SdkModel.d.ts.map +1 -1
  272. package/dist/utils/SdkModel.js +1 -1
  273. package/dist/utils/SdkModel.js.map +1 -1
  274. package/dist/utils/command-operation.d.ts +11 -3
  275. package/dist/utils/command-operation.d.ts.map +1 -1
  276. package/dist/utils/command-operation.js +26 -4
  277. package/dist/utils/command-operation.js.map +1 -1
  278. package/dist/utils/components.d.ts +1 -1
  279. package/dist/utils/components.d.ts.map +1 -1
  280. package/dist/utils/components.js +2 -2
  281. package/dist/utils/components.js.map +1 -1
  282. package/dist/utils/http-operation.d.ts +2 -0
  283. package/dist/utils/http-operation.d.ts.map +1 -1
  284. package/dist/utils/http-operation.js +16 -12
  285. package/dist/utils/http-operation.js.map +1 -1
  286. package/dist/utils/model-state.d.ts +7 -5
  287. package/dist/utils/model-state.d.ts.map +1 -1
  288. package/dist/utils/model-state.js +28 -20
  289. package/dist/utils/model-state.js.map +1 -1
  290. package/dist/utils/programatic-operation.d.ts +1 -1
  291. package/dist/utils/programatic-operation.d.ts.map +1 -1
  292. package/dist/utils/programatic-operation.js +1 -1
  293. package/dist/utils/programatic-operation.js.map +1 -1
  294. package/dist/utils/resolve-conflicts.js +8 -8
  295. package/dist/utils/resolve-conflicts.js.map +1 -1
  296. package/dist/utils/resourceName.d.ts +3 -0
  297. package/dist/utils/resourceName.d.ts.map +1 -0
  298. package/dist/utils/resourceName.js +29 -0
  299. package/dist/utils/resourceName.js.map +1 -0
  300. package/dist/utils/schema.d.ts +1 -1
  301. package/dist/utils/schema.d.ts.map +1 -1
  302. package/dist/utils/schema.js +11 -11
  303. package/dist/utils/schema.js.map +1 -1
  304. package/dist/utils/security-scheme.d.ts +2 -2
  305. package/dist/utils/security-scheme.d.ts.map +1 -1
  306. package/dist/utils/security-scheme.js +2 -2
  307. package/dist/utils/security-scheme.js.map +1 -1
  308. package/dist/utils/sort-parameters.d.ts +3 -0
  309. package/dist/utils/sort-parameters.d.ts.map +1 -0
  310. package/dist/utils/sort-parameters.js +33 -0
  311. package/dist/utils/sort-parameters.js.map +1 -0
  312. package/dist/utils/tsp-generator.d.ts +3 -0
  313. package/dist/utils/tsp-generator.d.ts.map +1 -0
  314. package/dist/utils/tsp-generator.js +65 -0
  315. package/dist/utils/tsp-generator.js.map +1 -0
  316. package/dist/utils/tsp-host.d.ts +42 -0
  317. package/dist/utils/tsp-host.d.ts.map +1 -0
  318. package/dist/utils/tsp-host.js +56 -0
  319. package/dist/utils/tsp-host.js.map +1 -0
  320. package/generators/readme.ts +0 -3
  321. package/package.json +11 -10
  322. package/resources/assets/build-module.ps1 +31 -4
  323. package/resources/assets/check-dependencies.ps1 +3 -3
  324. package/resources/assets/create-model-cmdlets.ps1 +34 -5
  325. package/resources/assets/export-surface.ps1 +3 -3
  326. package/resources/assets/generate-help.ps1 +5 -5
  327. package/resources/assets/generate-portal-ux.ps1 +9 -25
  328. package/resources/assets/run-module.ps1 +4 -4
  329. package/resources/assets/test/loadEnv.ps1 +1 -1
  330. package/resources/assets/test-module.ps1 +11 -7
  331. package/resources/assets/tools/Resources/README.md +0 -3
  332. package/resources/assets/tools/Resources/custom/New-AzDeployment.ps1 +2 -2
  333. package/resources/assets/tools/Resources/how-to.md +2 -0
  334. package/resources/built-time-cmdlets.csproj +1 -0
  335. package/resources/modules/Az.Accounts/2.13.1/Accounts.format.ps1xml +554 -0
  336. package/resources/modules/Az.Accounts/2.13.1/Accounts.generated.format.ps1xml +471 -0
  337. package/resources/modules/Az.Accounts/2.13.1/Accounts.types.ps1xml +306 -0
  338. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Az.Accounts.nuspec +4 -5
  339. package/resources/modules/Az.Accounts/2.13.1/Az.Accounts.psd1 +389 -0
  340. package/resources/modules/Az.Accounts/2.13.1/Az.Accounts.psm1 +365 -0
  341. package/resources/modules/Az.Accounts/2.13.1/FuzzySharp.dll +0 -0
  342. package/resources/modules/Az.Accounts/2.13.1/Microsoft.ApplicationInsights.dll +0 -0
  343. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.AssemblyLoading.dll +0 -0
  344. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll +0 -0
  345. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll +0 -0
  346. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.dll +0 -0
  347. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.dll +0 -0
  348. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
  349. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Aks.dll +0 -0
  350. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Authorization.dll +0 -0
  351. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Compute.dll +0 -0
  352. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll +0 -0
  353. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.KeyVault.dll +0 -0
  354. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Monitor.dll +0 -0
  355. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Network.dll +0 -0
  356. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll +0 -0
  357. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll +0 -0
  358. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll +0 -0
  359. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Clients.Websites.dll +0 -0
  360. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll +0 -0
  361. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml +2510 -779
  362. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Common.Share.dll +0 -0
  363. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Common.dll +0 -0
  364. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Storage.dll +0 -0
  365. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.PowerShell.Strategies.dll +0 -0
  366. package/resources/modules/Az.Accounts/2.13.1/Microsoft.Rest.ClientRuntime.dll +0 -0
  367. package/resources/modules/Az.Accounts/2.13.1/PostImportScripts/LoadAuthenticators.ps1 +222 -0
  368. package/resources/modules/Az.Accounts/2.13.1/StartupScripts/AzError.ps1 +281 -0
  369. package/resources/modules/Az.Accounts/2.13.1/StartupScripts/InitializeAssemblyResolver.ps1 +242 -0
  370. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/[Content_Types].xml +2 -3
  371. package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/_rels/.rels +2 -2
  372. package/resources/modules/Az.Accounts/2.13.1/lib/netcoreapp2.1/Azure.Core.dll +0 -0
  373. package/resources/modules/Az.Accounts/2.13.1/lib/netcoreapp2.1/Microsoft.Identity.Client.dll +0 -0
  374. package/resources/modules/Az.Accounts/2.13.1/lib/netcoreapp3.1/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
  375. package/resources/modules/Az.Accounts/2.13.1/lib/netfx/Azure.Core.dll +0 -0
  376. package/resources/modules/Az.Accounts/2.13.1/lib/netfx/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
  377. package/resources/modules/Az.Accounts/2.13.1/lib/netfx/Microsoft.Identity.Client.dll +0 -0
  378. package/resources/modules/Az.Accounts/2.13.1/lib/netfx/Newtonsoft.Json.dll +0 -0
  379. package/resources/modules/Az.Accounts/2.13.1/lib/netfx/System.Diagnostics.DiagnosticSource.dll +0 -0
  380. package/resources/modules/Az.Accounts/2.13.1/lib/netfx/System.Reflection.DispatchProxy.dll +0 -0
  381. package/resources/modules/Az.Accounts/2.13.1/lib/netfx/System.Runtime.CompilerServices.Unsafe.dll +0 -0
  382. package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Azure.Identity.BrokeredAuthentication.dll +0 -0
  383. package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Azure.Identity.dll +0 -0
  384. package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Identity.Client.Broker.dll +0 -0
  385. package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Identity.Client.NativeInterop.dll +0 -0
  386. package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.IdentityModel.Abstractions.dll +0 -0
  387. package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.AccessControl.dll +0 -0
  388. package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.Permissions.dll +0 -0
  389. package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.Principal.Windows.dll +0 -0
  390. package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime.dll +0 -0
  391. package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime_arm64.dll +0 -0
  392. package/resources/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime_x86.dll +0 -0
  393. package/resources/modules/Az.Accounts/2.13.1/package/services/metadata/core-properties/f9ac9c2e40914e78a646a7b0b997403b.psmdcp +11 -0
  394. package/resources/psruntime/Attributes/PSArgumentCompleterAttribute.cs +52 -0
  395. package/resources/psruntime/BuildTime/Cmdlets/ExportHelpMarkdown.cs +4 -1
  396. package/resources/psruntime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +6 -3
  397. package/resources/psruntime/BuildTime/Cmdlets/ExportPsd1.cs +7 -4
  398. package/resources/psruntime/BuildTime/Cmdlets/ExportTestStub.cs +130 -81
  399. package/resources/psruntime/BuildTime/Cmdlets/NewAssemblyInfo.cs +64 -0
  400. package/resources/psruntime/BuildTime/MarkdownRenderer.cs +17 -9
  401. package/resources/psruntime/BuildTime/Models/PsProxyOutputs.cs +53 -8
  402. package/resources/psruntime/BuildTime/Models/PsProxyTypes.cs +35 -11
  403. package/resources/psruntime/BuildTime/PsAttributes.cs +5 -0
  404. package/resources/psruntime/BuildTime/PsHelpers.cs +4 -3
  405. package/resources/psruntime/MessageAttribute.cs +45 -55
  406. package/resources/psruntime/MessageAttributeHelper.cs +30 -7
  407. package/resources/psruntime/Properties/Resources.Designer.cs +25 -3
  408. package/resources/psruntime/Properties/Resources.resx +8 -2
  409. package/resources/runtime/csharp/pipeline/ISendAsync.cs +113 -0
  410. package/resources/runtime/csharp/pipeline/PipelineMocking.cs +1 -1
  411. package/resources/templates/azureMethod.ejs +2 -2
  412. package/resources/templates/azureMethodGroup.ejs +2 -2
  413. package/resources/templates/azureServiceClient.ejs +11 -4
  414. package/resources/templates/enum.ejs +3 -3
  415. package/resources/templates/extensionMethod.ejs +18 -12
  416. package/resources/templates/extensions.ejs +9 -2
  417. package/resources/templates/longRunningOperationMethod.ejs +10 -8
  418. package/resources/templates/method.ejs +10 -8
  419. package/resources/templates/methodBodyRestCall.ejs +77 -32
  420. package/resources/templates/methodGroupInterface.ejs +2 -61
  421. package/resources/templates/methodGroupInterfaceBody.ejs +60 -0
  422. package/resources/templates/model.ejs +15 -15
  423. package/resources/templates/serviceClientBody.ejs +8 -8
  424. package/resources/templates/serviceClientInterface.ejs +10 -4
  425. package/resources/utils/Get-SubscriptionIdTestSafe.ps1 +7 -0
  426. package/dist/utils/WrapComments.d.ts +0 -2
  427. package/dist/utils/WrapComments.d.ts.map +0 -1
  428. package/dist/utils/WrapComments.js +0 -46
  429. package/dist/utils/WrapComments.js.map +0 -1
  430. package/resources/modules/Az.Accounts/2.7.5/Accounts.format.ps1xml +0 -496
  431. package/resources/modules/Az.Accounts/2.7.5/Accounts.generated.format.ps1xml +0 -468
  432. package/resources/modules/Az.Accounts/2.7.5/Accounts.types.ps1xml +0 -303
  433. package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.psd1 +0 -387
  434. package/resources/modules/Az.Accounts/2.7.5/Az.Accounts.psm1 +0 -375
  435. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Azure.Core.dll +0 -0
  436. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Azure.Identity.dll +0 -0
  437. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
  438. package/resources/modules/Az.Accounts/2.7.5/AzSharedAlcAssemblies/Microsoft.Identity.Client.dll +0 -0
  439. package/resources/modules/Az.Accounts/2.7.5/Microsoft.ApplicationInsights.dll +0 -0
  440. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll +0 -0
  441. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.ResourceManager.deps.json +0 -2309
  442. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll +0 -0
  443. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.deps.json +0 -2273
  444. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authentication.dll +0 -0
  445. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.deps.json +0 -1316
  446. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.dll +0 -0
  447. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
  448. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.Aks.dll +0 -0
  449. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll +0 -0
  450. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll +0 -0
  451. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Cmdlets.Accounts.deps.json +0 -2413
  452. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll +0 -0
  453. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Common.Share.dll +0 -0
  454. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Azure.PowerShell.Common.dll +0 -0
  455. package/resources/modules/Az.Accounts/2.7.5/Microsoft.Rest.ClientRuntime.dll +0 -0
  456. package/resources/modules/Az.Accounts/2.7.5/PostImportScripts/LoadAuthenticators.ps1 +0 -219
  457. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Azure.Core.dll +0 -0
  458. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Azure.Identity.dll +0 -0
  459. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Azure.PowerShell.Authenticators.dll +0 -0
  460. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  461. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
  462. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Microsoft.Identity.Client.dll +0 -0
  463. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Newtonsoft.Json.12.0.3.dll +0 -0
  464. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/Newtonsoft.Json.dll +0 -0
  465. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Diagnostics.DiagnosticSource.dll +0 -0
  466. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Memory.Data.dll +0 -0
  467. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Reflection.DispatchProxy.dll +0 -0
  468. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Runtime.CompilerServices.Unsafe.dll +0 -0
  469. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Security.AccessControl.dll +0 -0
  470. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Security.Permissions.dll +0 -0
  471. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Security.Principal.Windows.dll +0 -0
  472. package/resources/modules/Az.Accounts/2.7.5/PreloadAssemblies/System.Text.Json.dll +0 -0
  473. package/resources/modules/Az.Accounts/2.7.5/StartupScripts/AzError.ps1 +0 -278
  474. package/resources/modules/Az.Accounts/2.7.5/StartupScripts/InitializeAssemblyResolver.ps1 +0 -234
  475. package/resources/modules/Az.Accounts/2.7.5/package/services/metadata/core-properties/1aa0749a068a4238881858013f1a5b7f.psmdcp +0 -11
  476. /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Hyak.Common.dll +0 -0
  477. /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Azure.Common.dll +0 -0
  478. /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.Rest.ClientRuntime.Azure.dll +0 -0
  479. /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.WindowsAzure.Storage.DataMovement.dll +0 -0
  480. /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/Microsoft.WindowsAzure.Storage.dll +0 -0
  481. /package/resources/modules/Az.Accounts/{2.7.5 → 2.13.1}/en-US/about_az.help.txt +0 -0
  482. /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netfx}/System.Numerics.Vectors.dll +0 -0
  483. /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netfx}/System.Security.Cryptography.Cng.dll +0 -0
  484. /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netfx}/System.Text.Encodings.Web.dll +0 -0
  485. /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netfx}/System.Xml.ReaderWriter.dll +0 -0
  486. /package/resources/modules/Az.Accounts/{2.7.5/AzSharedAlcAssemblies → 2.13.1/lib/netstandard2.0}/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  487. /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.Buffers.dll +0 -0
  488. /package/resources/modules/Az.Accounts/{2.7.5/AzSharedAlcAssemblies → 2.13.1/lib/netstandard2.0}/System.Memory.Data.dll +0 -0
  489. /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.Memory.dll +0 -0
  490. /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.Net.Http.WinHttpHandler.dll +0 -0
  491. /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.Private.ServiceModel.dll +0 -0
  492. /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.ServiceModel.Primitives.dll +0 -0
  493. /package/resources/modules/Az.Accounts/{2.7.5/AzSharedAlcAssemblies → 2.13.1/lib/netstandard2.0}/System.Text.Json.dll +0 -0
  494. /package/resources/modules/Az.Accounts/{2.7.5/PreloadAssemblies → 2.13.1/lib/netstandard2.0}/System.Threading.Tasks.Extensions.dll +0 -0
@@ -39,9 +39,10 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
39
39
  public static IEnumerable<FunctionInfo> GetScriptCmdlets(PSCmdlet cmdlet, string scriptFolder)
40
40
  {
41
41
  // https://stackoverflow.com/a/40969712/294804
42
+ var wrappedFolder = scriptFolder.Contains("'") ? $@"""{scriptFolder}""" : $@"'{scriptFolder}'";
42
43
  var getCmdletsCommand = $@"
43
44
  $currentFunctions = Get-ChildItem function:
44
- Get-ChildItem -Path '{scriptFolder}' -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }}
45
+ Get-ChildItem -Path {wrappedFolder} -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }}
45
46
  Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }}
46
47
  ";
47
48
  return cmdlet?.RunScript<FunctionInfo>(getCmdletsCommand) ?? RunScript<FunctionInfo>(getCmdletsCommand);
@@ -66,7 +67,7 @@ Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -a
66
67
 
67
68
  public static IEnumerable<CmdletAndHelpInfo> GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths)
68
69
  {
69
- var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp =>
70
+ var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp =>
70
71
  $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})"
71
72
  ));
72
73
  return (cmdlet?.RunScript<Hashtable>(getCmdletAndHelp) ?? RunScript<Hashtable>(getCmdletAndHelp))
@@ -87,7 +88,7 @@ Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -a
87
88
  if (File.Exists(psd1Path))
88
89
  {
89
90
  var currentGuid = File.ReadAllLines(psd1Path)
90
- .FirstOrDefault(l => l.StartsWith(GuidStart))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries)
91
+ .FirstOrDefault(l => l.TrimStart().StartsWith(GuidStart.TrimStart()))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries)
91
92
  .LastOrDefault()?.Replace("'", String.Empty);
92
93
  guid = currentGuid != null ? Guid.Parse(currentGuid) : guid;
93
94
  }
@@ -21,7 +21,7 @@ namespace Microsoft.Message.ClientRuntime
21
21
 
22
22
  //The version the change is effective from, non mandatory
23
23
  public string DeprecateByVersion { get; }
24
- public bool DeprecateByVersionSet { get; } = false;
24
+ public string DeprecateByAzVersion { get; }
25
25
 
26
26
  //The date on which the change comes in effect
27
27
  public DateTime ChangeInEfectByDate { get; }
@@ -32,23 +32,18 @@ namespace Microsoft.Message.ClientRuntime
32
32
  //New way fo calling the cmdlet
33
33
  public string NewWay { get; set; }
34
34
 
35
- public GenericBreakingChangeAttribute(string message)
36
- {
37
- _message = message;
38
- }
39
-
40
- public GenericBreakingChangeAttribute(string message, string deprecateByVersion)
35
+ public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion)
41
36
  {
42
37
  _message = message;
38
+ this.DeprecateByAzVersion = deprecateByAzVersion;
43
39
  this.DeprecateByVersion = deprecateByVersion;
44
- this.DeprecateByVersionSet = true;
45
40
  }
46
41
 
47
- public GenericBreakingChangeAttribute(string message, string deprecateByVersion, string changeInEfectByDate)
42
+ public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate)
48
43
  {
49
44
  _message = message;
50
45
  this.DeprecateByVersion = deprecateByVersion;
51
- this.DeprecateByVersionSet = true;
46
+ this.DeprecateByAzVersion = deprecateByAzVersion;
52
47
 
53
48
  if (DateTime.TryParse(changeInEfectByDate, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result))
54
49
  {
@@ -86,10 +81,8 @@ namespace Microsoft.Message.ClientRuntime
86
81
  writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByDateMessage, this.ChangeInEfectByDate.ToString("d")));
87
82
  }
88
83
 
89
- if (DeprecateByVersionSet)
90
- {
91
- writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
92
- }
84
+ writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion));
85
+ writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
93
86
 
94
87
  if (OldWay != null && NewWay != null)
95
88
  {
@@ -114,18 +107,13 @@ namespace Microsoft.Message.ClientRuntime
114
107
 
115
108
  public string ReplacementCmdletName { get; set; }
116
109
 
117
- public CmdletBreakingChangeAttribute() :
118
- base(string.Empty)
110
+ public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion) :
111
+ base(string.Empty, deprecateByAzVersion, deprecateByVersion)
119
112
  {
120
113
  }
121
114
 
122
- public CmdletBreakingChangeAttribute(string deprecateByVersione) :
123
- base(string.Empty, deprecateByVersione)
124
- {
125
- }
126
-
127
- public CmdletBreakingChangeAttribute(string deprecateByVersion, string changeInEfectByDate) :
128
- base(string.Empty, deprecateByVersion, changeInEfectByDate)
115
+ public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) :
116
+ base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate)
129
117
  {
130
118
  }
131
119
 
@@ -146,20 +134,15 @@ namespace Microsoft.Message.ClientRuntime
146
134
  public class ParameterSetBreakingChangeAttribute : GenericBreakingChangeAttribute
147
135
  {
148
136
  public string[] ChangedParameterSet { set; get; }
149
- public ParameterSetBreakingChangeAttribute(string[] changedParameterSet) :
150
- base(string.Empty)
151
- {
152
- ChangedParameterSet = changedParameterSet;
153
- }
154
137
 
155
- public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersione) :
156
- base(string.Empty, deprecateByVersione)
138
+ public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion) :
139
+ base(string.Empty, deprecateByAzVersion, deprecateByVersion)
157
140
  {
158
141
  ChangedParameterSet = changedParameterSet;
159
142
  }
160
143
 
161
- public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersion, string changeInEfectByDate) :
162
- base(string.Empty, deprecateByVersion, changeInEfectByDate)
144
+ public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) :
145
+ base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate)
163
146
  {
164
147
  ChangedParameterSet = changedParameterSet;
165
148
  }
@@ -185,6 +168,11 @@ namespace Microsoft.Message.ClientRuntime
185
168
  {
186
169
  public string _message;
187
170
 
171
+ public DateTime EstimatedGaDate { get; }
172
+
173
+ public bool IsEstimatedGaDateSet { get; } = false;
174
+
175
+
188
176
  public PreviewMessageAttribute()
189
177
  {
190
178
  this._message = Resources.PreviewCmdletMessage;
@@ -192,12 +180,26 @@ namespace Microsoft.Message.ClientRuntime
192
180
 
193
181
  public PreviewMessageAttribute(string message)
194
182
  {
195
- this._message = message;
183
+ this._message = string.IsNullOrEmpty(message) ? Resources.PreviewCmdletMessage : message;
196
184
  }
197
185
 
198
- public void PrintCustomAttributeInfo(System.Management.Automation.PSCmdlet psCmdlet)
186
+ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(message)
199
187
  {
200
- psCmdlet.WriteWarning(this._message);
188
+ if (DateTime.TryParse(estimatedDateOfGa, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result))
189
+ {
190
+ this.EstimatedGaDate = result;
191
+ this.IsEstimatedGaDateSet = true;
192
+ }
193
+ }
194
+
195
+ public void PrintCustomAttributeInfo(Action<string> writeOutput)
196
+ {
197
+ writeOutput(this._message);
198
+
199
+ if (IsEstimatedGaDateSet)
200
+ {
201
+ writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString()));
202
+ }
201
203
  }
202
204
 
203
205
  public virtual bool IsApplicableToInvocation(InvocationInfo invocation)
@@ -219,20 +221,14 @@ namespace Microsoft.Message.ClientRuntime
219
221
 
220
222
  public String NewParameterType { get; set; }
221
223
 
222
- public ParameterBreakingChangeAttribute(string nameOfParameterChanging) :
223
- base(string.Empty)
224
+ public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion) :
225
+ base(string.Empty, deprecateByAzVersion, deprecateByVersion)
224
226
  {
225
227
  this.NameOfParameterChanging = nameOfParameterChanging;
226
228
  }
227
229
 
228
- public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion) :
229
- base(string.Empty, deprecateByVersion)
230
- {
231
- this.NameOfParameterChanging = nameOfParameterChanging;
232
- }
233
-
234
- public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion, string changeInEfectByDate) :
235
- base(string.Empty, deprecateByVersion, changeInEfectByDate)
230
+ public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) :
231
+ base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate)
236
232
  {
237
233
  this.NameOfParameterChanging = nameOfParameterChanging;
238
234
  }
@@ -298,20 +294,14 @@ namespace Microsoft.Message.ClientRuntime
298
294
 
299
295
  public string[] NewOutputProperties { get; set; }
300
296
 
301
- public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType) :
302
- base(string.Empty)
303
- {
304
- this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType;
305
- }
306
-
307
- public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion) :
308
- base(string.Empty, deprecateByVersion)
297
+ public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion) :
298
+ base(string.Empty, deprecateByAzVersion, deprecateByVersion)
309
299
  {
310
300
  this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType;
311
301
  }
312
302
 
313
- public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion, string changeInEfectByDate) :
314
- base(string.Empty, deprecateByVersion, changeInEfectByDate)
303
+ public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) :
304
+ base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate)
315
305
  {
316
306
  this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType;
317
307
  }
@@ -23,6 +23,7 @@ namespace Microsoft.Message.ClientRuntime
23
23
  using System.Threading.Tasks;
24
24
  public class MessageAttributeHelper
25
25
  {
26
+ private static readonly bool IsAzure = Convert.ToBoolean(@"${$project.azure}");
26
27
  public const string BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK = "https://aka.ms/azps-changewarnings";
27
28
  public const string SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME = "SuppressAzurePowerShellBreakingChangeWarnings";
28
29
 
@@ -34,7 +35,7 @@ namespace Microsoft.Message.ClientRuntime
34
35
  * the boundParameterNames is a list of parameters bound to the cmdlet at runtime,
35
36
  * We only process the Parameter beaking change attributes attached only params listed in this list (if present)
36
37
  * */
37
- public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet)
38
+ public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet, bool showPreviewMessage = true)
38
39
  {
39
40
  bool supressWarningOrError = false;
40
41
 
@@ -52,37 +53,53 @@ namespace Microsoft.Message.ClientRuntime
52
53
  //Do not process the attributes at runtime... The env variable to override the warning messages is set
53
54
  return;
54
55
  }
56
+ if (IsAzure && invocationInfo.BoundParameters.ContainsKey("DefaultProfile"))
57
+ {
58
+ psCmdlet.WriteWarning("The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.");
59
+ }
60
+
61
+ ProcessBreakingChangeAttributesAtRuntime(commandInfo, invocationInfo, parameterSet, psCmdlet);
62
+
63
+ }
55
64
 
65
+ private static void ProcessBreakingChangeAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet)
66
+ {
56
67
  List<GenericBreakingChangeAttribute> attributes = new List<GenericBreakingChangeAttribute>(GetAllBreakingChangeAttributesInType(commandInfo, invocationInfo, parameterSet));
57
68
  StringBuilder sb = new StringBuilder();
58
- Action<string> appendBreakingChangeInfo = (string s) => sb.Append(s);
69
+ Action<string> appendAttributeMessage = (string s) => sb.Append(s);
59
70
 
60
71
  if (attributes != null && attributes.Count > 0)
61
72
  {
62
- appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0]));
73
+ appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0]));
63
74
 
64
75
  foreach (GenericBreakingChangeAttribute attribute in attributes)
65
76
  {
66
- attribute.PrintCustomAttributeInfo(appendBreakingChangeInfo);
77
+ attribute.PrintCustomAttributeInfo(appendAttributeMessage);
67
78
  }
68
79
 
69
- appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK));
80
+ appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK));
70
81
 
71
82
  psCmdlet.WriteWarning(sb.ToString());
72
83
  }
84
+ }
85
+
73
86
 
87
+ public static void ProcessPreviewMessageAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet)
88
+ {
74
89
  List<PreviewMessageAttribute> previewAttributes = new List<PreviewMessageAttribute>(GetAllPreviewAttributesInType(commandInfo, invocationInfo));
90
+ StringBuilder sb = new StringBuilder();
91
+ Action<string> appendAttributeMessage = (string s) => sb.Append(s);
75
92
 
76
93
  if (previewAttributes != null && previewAttributes.Count > 0)
77
94
  {
78
95
  foreach (PreviewMessageAttribute attribute in previewAttributes)
79
96
  {
80
- attribute.PrintCustomAttributeInfo(psCmdlet);
97
+ attribute.PrintCustomAttributeInfo(appendAttributeMessage);
81
98
  }
99
+ psCmdlet.WriteWarning(sb.ToString());
82
100
  }
83
101
  }
84
102
 
85
-
86
103
  /**
87
104
  * This function takes in a CommandInfo (CmdletInfo or FunctionInfo)
88
105
  * And returns all the deprecation attributes attached to it
@@ -124,6 +141,12 @@ namespace Microsoft.Message.ClientRuntime
124
141
  }
125
142
  return invocationInfo == null ? attributeList : attributeList.Where(e => e.GetType() == typeof(ParameterSetBreakingChangeAttribute) ? ((ParameterSetBreakingChangeAttribute)e).IsApplicableToInvocation(invocationInfo, parameterSet) : e.IsApplicableToInvocation(invocationInfo));
126
143
  }
144
+
145
+ public static bool ContainsPreviewAttribute(CommandInfo commandInfo, InvocationInfo invocationInfo)
146
+ {
147
+ return GetAllPreviewAttributesInType(commandInfo, invocationInfo)?.Count() > 0;
148
+ }
149
+
127
150
  private static IEnumerable<PreviewMessageAttribute> GetAllPreviewAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo)
128
151
  {
129
152
  List<PreviewMessageAttribute> attributeList = new List<PreviewMessageAttribute>();
@@ -734,7 +734,7 @@ namespace Microsoft.generated.runtime.Properties
734
734
  }
735
735
 
736
736
  /// <summary>
737
- /// Looks up a localized string similar to Note :The change is expected to take effect from the version : &apos;{0}&apos;
737
+ /// Looks up a localized string similar to Note :The change is expected to take effect from version : &apos;{0}&apos;
738
738
  ///
739
739
  ///.
740
740
  /// </summary>
@@ -746,6 +746,19 @@ namespace Microsoft.generated.runtime.Properties
746
746
  }
747
747
  }
748
748
 
749
+ /// <summary>
750
+ /// Looks up a localized string similar to Note :The change is expected to take effect from az version : &apos;{0}&apos;
751
+ ///
752
+ ///.
753
+ /// </summary>
754
+ public static string BreakingChangesAttributesInEffectByAzVersion
755
+ {
756
+ get
757
+ {
758
+ return ResourceManager.GetString("BreakingChangesAttributesInEffectByAzVersion", resourceCulture);
759
+ }
760
+ }
761
+
749
762
  /// <summary>
750
763
  /// Looks up a localized string similar to ```powershell
751
764
  ///# Old
@@ -3122,7 +3135,16 @@ namespace Microsoft.generated.runtime.Properties
3122
3135
  }
3123
3136
 
3124
3137
  /// <summary>
3125
- /// Looks up a localized string similar to This cmdlet is in preview. The functionality may not be available in the selected subscription.
3138
+ /// Looks up a localized string similar to The estimated generally available date is &apos;{0}&apos;..
3139
+ /// </summary>
3140
+ public static string PreviewCmdletETAMessage {
3141
+ get {
3142
+ return ResourceManager.GetString("PreviewCmdletETAMessage", resourceCulture);
3143
+ }
3144
+ }
3145
+
3146
+ /// <summary>
3147
+ /// Looks up a localized string similar to This cmdlet is in preview. Its behavior is subject to change based on customer feedback..
3126
3148
  /// </summary>
3127
3149
  public static string PreviewCmdletMessage
3128
3150
  {
@@ -5630,4 +5652,4 @@ namespace Microsoft.generated.runtime.Properties
5630
5652
  }
5631
5653
  }
5632
5654
  }
5633
- }
5655
+ }
@@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
1705
1705
  </data>
1706
1706
  <data name="BreakingChangesAttributesInEffectByVersion" xml:space="preserve">
1707
1707
  <value>
1708
- - The change is expected to take effect from the version : '{0}'</value>
1708
+ - The change is expected to take effect from version : '{0}'</value>
1709
1709
  </data>
1710
1710
  <data name="BreakingChangesAttributesUsageChangeMessage" xml:space="preserve">
1711
1711
  <value>```powershell
@@ -1736,6 +1736,12 @@ The type of the parameter is changing from '{0}' to '{1}'.</value>
1736
1736
  Note : Go to {0} for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.</value>
1737
1737
  </data>
1738
1738
  <data name="PreviewCmdletMessage" xml:space="preserve">
1739
- <value>This cmdlet is in preview. The functionality may not be available in the selected subscription.</value>
1739
+ <value>This cmdlet is in preview. Its behavior is subject to change based on customer feedback.</value>
1740
+ </data>
1741
+ <data name="PreviewCmdletETAMessage" xml:space="preserve">
1742
+ <value> The estimated generally available date is '{0}'.</value>
1743
+ </data>
1744
+ <data name="BreakingChangesAttributesInEffectByAzVersion" xml:space="preserve">
1745
+ <value>- The change is expected to take effect from Az version : '{0}'</value>
1740
1746
  </data>
1741
1747
  </root>
@@ -11,6 +11,8 @@ namespace Microsoft.Rest.ClientRuntime
11
11
  using System.Threading.Tasks;
12
12
  using System.Collections;
13
13
  using System.Linq;
14
+ using System;
15
+
14
16
 
15
17
  /// <summary>
16
18
  /// The interface for sending an HTTP request across the wire.
@@ -70,6 +72,7 @@ namespace Microsoft.Rest.ClientRuntime
70
72
 
71
73
  public partial class HttpPipeline : ISendAsync
72
74
  {
75
+ private const int DefaultMaxRetry = 3;
73
76
  private ISendAsync pipeline;
74
77
  private ISendAsyncTerminalFactory terminal;
75
78
  private List<ISendAsyncFactory> steps = new List<ISendAsyncFactory>();
@@ -92,6 +95,111 @@ namespace Microsoft.Rest.ClientRuntime
92
95
  /// </summary>
93
96
  public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline };
94
97
 
98
+ private bool shouldRetry429(HttpResponseMessage response)
99
+ {
100
+ if (response.StatusCode == (System.Net.HttpStatusCode)429)
101
+ {
102
+ var retryAfter = response.Headers.RetryAfter;
103
+ if (retryAfter != null && retryAfter.Delta.HasValue)
104
+ {
105
+ return true;
106
+ }
107
+ }
108
+ return false;
109
+ }
110
+ /// <summary>
111
+ /// The step to handle 429 response with retry-after header.
112
+ /// </summary>
113
+ public async Task<HttpResponseMessage> Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next)
114
+ {
115
+ int retryCount = int.MaxValue;
116
+
117
+ try
118
+ {
119
+ try
120
+ {
121
+ retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES_FOR_429"));
122
+ }
123
+ finally
124
+ {
125
+ retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES_FOR_429"));
126
+ }
127
+ }
128
+ catch (System.Exception)
129
+ {
130
+ //no action
131
+ }
132
+ var cloneRequest = await request.CloneWithContent();
133
+ var response = await next.SendAsync(request, callback);
134
+ int count = 0;
135
+ while (shouldRetry429(response) && count++ < retryCount)
136
+ {
137
+ request = await cloneRequest.CloneWithContent();
138
+ var retryAfter = response.Headers.RetryAfter;
139
+ await Task.Delay(retryAfter.Delta.Value, callback.Token);
140
+ await callback.Signal("Debug", $"Start to retry {count} time(s) on status code 429 after waiting {retryAfter.Delta.Value.TotalSeconds} seconds.");
141
+ response = await next.SendAsync(request, callback);
142
+ }
143
+ return response;
144
+ }
145
+
146
+ private bool shouldRetryError(HttpResponseMessage response)
147
+ {
148
+ if (response.StatusCode >= System.Net.HttpStatusCode.InternalServerError)
149
+ {
150
+ if (response.StatusCode != System.Net.HttpStatusCode.NotImplemented &&
151
+ response.StatusCode != System.Net.HttpStatusCode.HttpVersionNotSupported)
152
+ {
153
+ return true;
154
+ }
155
+ }
156
+ else if (response.StatusCode == System.Net.HttpStatusCode.RequestTimeout)
157
+ {
158
+ return true;
159
+ }
160
+ else if (response.StatusCode == (System.Net.HttpStatusCode)429 && response.Headers.RetryAfter == null)
161
+ {
162
+ return true;
163
+ }
164
+ return false;
165
+ }
166
+
167
+ /// <summary>
168
+ /// Returns true if status code in HttpRequestExceptionWithStatus exception is greater
169
+ /// than or equal to 500 and not NotImplemented (501) or HttpVersionNotSupported (505).
170
+ /// Or it's 429 (TOO MANY REQUESTS) without Retry-After header.
171
+ /// </summary>
172
+ public async Task<HttpResponseMessage> RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next)
173
+ {
174
+ int retryCount = DefaultMaxRetry;
175
+
176
+ try
177
+ {
178
+ try
179
+ {
180
+ retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES"));
181
+ }
182
+ finally
183
+ {
184
+ retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES"));
185
+ }
186
+ }
187
+ catch (System.Exception)
188
+ {
189
+ //no action
190
+ }
191
+ var cloneRequest = await request.CloneWithContent();
192
+ var response = await next.SendAsync(request, callback);
193
+ int count = 0;
194
+ while (shouldRetryError(response) && count++ < retryCount)
195
+ {
196
+ await callback.Signal("Debug", $"Start to retry {count} time(s) on status code {response.StatusCode}");
197
+ request = await cloneRequest.CloneWithContent();
198
+ response = await next.SendAsync(request, callback);
199
+ }
200
+ return response;
201
+ }
202
+
95
203
  public ISendAsyncTerminalFactory TerminalFactory
96
204
  {
97
205
  get => terminal;
@@ -117,6 +225,11 @@ namespace Microsoft.Rest.ClientRuntime
117
225
 
118
226
  // create the pipeline from scratch.
119
227
  var next = terminal.Create();
228
+ if (Convert.ToBoolean(@"${$project.enableApiRetry}"))
229
+ {
230
+ next = (new SendAsyncFactory(Retry429)).Create(next) ?? next;
231
+ next = (new SendAsyncFactory(RetryError)).Create(next) ?? next;
232
+ }
120
233
  foreach (var factory in steps)
121
234
  {
122
235
  // skip factories that return null.
@@ -259,4 +259,4 @@ namespace Microsoft.Rest.ClientRuntime
259
259
  }
260
260
  }
261
261
  }
262
- }
262
+ }
@@ -1,5 +1,5 @@
1
1
  <%if(!method.extensions || !method.extensions['x-ms-long-running-operation']) {-%>
2
- <%- include('method', {method: method}) %>
2
+ <%- include('method', {method: method, clientPrefix: clientPrefix}) %>
3
3
  <%} else {-%>
4
- <%- include('longRunningOperationMethod', {method: method}) %>
4
+ <%- include('longRunningOperationMethod', {method: method, clientPrefix: clientPrefix}) %>
5
5
  <%};-%>
@@ -1,5 +1,5 @@
1
1
  <%- project.commentHeader %>
2
- <% var key = methodGroup.$key == 'Operations' ? '' : methodGroup.$key-%>
2
+ <% var key = project.helper.ConvertToValidMethodGroupKey(methodGroup.$key)-%>
3
3
 
4
4
  namespace <%- project.namespace %>
5
5
  {
@@ -40,7 +40,7 @@ namespace <%- project.namespace %>
40
40
  public <%-client%> Client { get; private set; }
41
41
 
42
42
  <% methodGroup.operations.forEach(function(method){ -%>
43
- <%- include('azureMethod', {method: method}) -%>
43
+ <%- include('azureMethod', {method: method, clientPrefix: '.Client'}) -%>
44
44
  <% }); -%>
45
45
  }
46
46
  }
@@ -10,7 +10,7 @@ namespace <%- project.namespace %>
10
10
 
11
11
  <% if (project.model.info.description) { -%>
12
12
  /// <summary>
13
- /// <%- project.model.info.description %>
13
+ /// <%=project.helper.wrapComments(' ', '/// ', project.model.info.description)%>
14
14
  /// </summary>
15
15
  <% } -%>
16
16
  <% var client = project.model.info.title -%>
@@ -28,8 +28,8 @@ namespace <%- project.namespace %>
28
28
  /// </summary>
29
29
  private void Initialize()
30
30
  {
31
- <% project.model.operationGroups.forEach(function(methodGroup){ -%>
32
- <% var key = methodGroup.$key == 'Operations' ? '' : methodGroup.$key-%>
31
+ <% project.model.operationGroups.filter(methodGroup => methodGroup.$key != '').forEach(function(methodGroup){ -%>
32
+ <% var key = project.helper.ConvertToValidMethodGroupKey(methodGroup.$key)-%>
33
33
  this.<%- project.helper.PascalCase(methodGroup.$key) %> = new <%- project.helper.PascalCase(key) %>Operations(this);
34
34
  <% }); -%>
35
35
  this.BaseUri = new System.Uri("https://management.azure.com");
@@ -74,7 +74,14 @@ namespace <%- project.namespace %>
74
74
  DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter());
75
75
  <% } -%>
76
76
  DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter());
77
- <%# ToDo: Add method whose group is empty, and need to check in which case the group is empty.-%>
78
77
  }
78
+ <%# ToDo: Add method whose group is empty, and need to check in which case the group is empty.-%>
79
+ <% var methodGroupWithoutKey = (project.state.model.operationGroups || []).filter(op => op.$key == '')
80
+ if (methodGroupWithoutKey.length > 0) {
81
+ var methodGroup = methodGroupWithoutKey[0]
82
+ methodGroup.operations.forEach(function(method){
83
+ -%>
84
+ <%- include('azureMethod', {method: method, clientPrefix: ''}) -%>
85
+ <% });} -%>
79
86
  }
80
87
  }
@@ -17,7 +17,7 @@ namespace <%- project.namespace %>.Models
17
17
  if (item.language.default.description) {
18
18
  -%>
19
19
  /// <summary>
20
- /// <%-item.language.default.description%>
20
+ /// <%=project.helper.wrapComments(' ', '/// ', item.language.default.description)%>
21
21
  /// </summary>
22
22
  <% } -%>
23
23
  [System.Runtime.Serialization.EnumMember(Value = "<%-item.value%>")]
@@ -63,10 +63,10 @@ if (item.language.default.description) {
63
63
  <%model.choices.forEach(function(choice){-%>
64
64
  <%if(choice.language.default.description){-%>
65
65
  /// <summary>
66
- /// <%-choice.language.default.description%>
66
+ /// <%=project.helper.wrapComments(' ', '/// ', choice.language.default.description)%>
67
67
  /// </summary>
68
68
  <%}-%>
69
- public const string <%-choice.language.default.name%> = "<%-choice.value%>";
69
+ public const string <%-project.helper.GetValidCsharpName(choice.language.default.name)%> = "<%-choice.value%>";
70
70
  <%});-%>
71
71
  }
72
72
  <% } -%>