@azure/arm-securitydevops 1.0.0-beta.1

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 (309) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +109 -0
  4. package/dist/index.js +4908 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/samples-dev/azureDevOpsConnectorCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/azureDevOpsConnectorCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/azureDevOpsConnectorCreateOrUpdateSample.js +43 -0
  11. package/dist-esm/samples-dev/azureDevOpsConnectorCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/azureDevOpsConnectorDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/azureDevOpsConnectorDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/azureDevOpsConnectorDeleteSample.js +31 -0
  15. package/dist-esm/samples-dev/azureDevOpsConnectorDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/azureDevOpsConnectorGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/azureDevOpsConnectorGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/azureDevOpsConnectorGetSample.js +31 -0
  19. package/dist-esm/samples-dev/azureDevOpsConnectorGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/azureDevOpsConnectorListByResourceGroupSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/azureDevOpsConnectorListByResourceGroupSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/azureDevOpsConnectorListByResourceGroupSample.js +44 -0
  23. package/dist-esm/samples-dev/azureDevOpsConnectorListByResourceGroupSample.js.map +1 -0
  24. package/dist-esm/samples-dev/azureDevOpsConnectorListBySubscriptionSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/azureDevOpsConnectorListBySubscriptionSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/azureDevOpsConnectorListBySubscriptionSample.js +43 -0
  27. package/dist-esm/samples-dev/azureDevOpsConnectorListBySubscriptionSample.js.map +1 -0
  28. package/dist-esm/samples-dev/azureDevOpsConnectorStatsGetSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/azureDevOpsConnectorStatsGetSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/azureDevOpsConnectorStatsGetSample.js +31 -0
  31. package/dist-esm/samples-dev/azureDevOpsConnectorStatsGetSample.js.map +1 -0
  32. package/dist-esm/samples-dev/azureDevOpsConnectorUpdateSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/azureDevOpsConnectorUpdateSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/azureDevOpsConnectorUpdateSample.js +38 -0
  35. package/dist-esm/samples-dev/azureDevOpsConnectorUpdateSample.js.map +1 -0
  36. package/dist-esm/samples-dev/azureDevOpsOrgCreateOrUpdateSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/azureDevOpsOrgCreateOrUpdateSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/azureDevOpsOrgCreateOrUpdateSample.js +35 -0
  39. package/dist-esm/samples-dev/azureDevOpsOrgCreateOrUpdateSample.js.map +1 -0
  40. package/dist-esm/samples-dev/azureDevOpsOrgGetSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/azureDevOpsOrgGetSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/azureDevOpsOrgGetSample.js +32 -0
  43. package/dist-esm/samples-dev/azureDevOpsOrgGetSample.js.map +1 -0
  44. package/dist-esm/samples-dev/azureDevOpsOrgListSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/azureDevOpsOrgListSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/azureDevOpsOrgListSample.js +45 -0
  47. package/dist-esm/samples-dev/azureDevOpsOrgListSample.js.map +1 -0
  48. package/dist-esm/samples-dev/azureDevOpsOrgUpdateSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/azureDevOpsOrgUpdateSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/azureDevOpsOrgUpdateSample.js +36 -0
  51. package/dist-esm/samples-dev/azureDevOpsOrgUpdateSample.js.map +1 -0
  52. package/dist-esm/samples-dev/azureDevOpsProjectCreateOrUpdateSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/azureDevOpsProjectCreateOrUpdateSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/azureDevOpsProjectCreateOrUpdateSample.js +36 -0
  55. package/dist-esm/samples-dev/azureDevOpsProjectCreateOrUpdateSample.js.map +1 -0
  56. package/dist-esm/samples-dev/azureDevOpsProjectGetSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/azureDevOpsProjectGetSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/azureDevOpsProjectGetSample.js +33 -0
  59. package/dist-esm/samples-dev/azureDevOpsProjectGetSample.js.map +1 -0
  60. package/dist-esm/samples-dev/azureDevOpsProjectListSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/azureDevOpsProjectListSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/azureDevOpsProjectListSample.js +46 -0
  63. package/dist-esm/samples-dev/azureDevOpsProjectListSample.js.map +1 -0
  64. package/dist-esm/samples-dev/azureDevOpsProjectUpdateSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/azureDevOpsProjectUpdateSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/azureDevOpsProjectUpdateSample.js +39 -0
  67. package/dist-esm/samples-dev/azureDevOpsProjectUpdateSample.js.map +1 -0
  68. package/dist-esm/samples-dev/azureDevOpsRepoCreateOrUpdateSample.d.ts +2 -0
  69. package/dist-esm/samples-dev/azureDevOpsRepoCreateOrUpdateSample.d.ts.map +1 -0
  70. package/dist-esm/samples-dev/azureDevOpsRepoCreateOrUpdateSample.js +46 -0
  71. package/dist-esm/samples-dev/azureDevOpsRepoCreateOrUpdateSample.js.map +1 -0
  72. package/dist-esm/samples-dev/azureDevOpsRepoGetSample.d.ts +2 -0
  73. package/dist-esm/samples-dev/azureDevOpsRepoGetSample.d.ts.map +1 -0
  74. package/dist-esm/samples-dev/azureDevOpsRepoGetSample.js +34 -0
  75. package/dist-esm/samples-dev/azureDevOpsRepoGetSample.js.map +1 -0
  76. package/dist-esm/samples-dev/azureDevOpsRepoListByConnectorSample.d.ts +2 -0
  77. package/dist-esm/samples-dev/azureDevOpsRepoListByConnectorSample.d.ts.map +1 -0
  78. package/dist-esm/samples-dev/azureDevOpsRepoListByConnectorSample.js +45 -0
  79. package/dist-esm/samples-dev/azureDevOpsRepoListByConnectorSample.js.map +1 -0
  80. package/dist-esm/samples-dev/azureDevOpsRepoListSample.d.ts +2 -0
  81. package/dist-esm/samples-dev/azureDevOpsRepoListSample.d.ts.map +1 -0
  82. package/dist-esm/samples-dev/azureDevOpsRepoListSample.js +47 -0
  83. package/dist-esm/samples-dev/azureDevOpsRepoListSample.js.map +1 -0
  84. package/dist-esm/samples-dev/azureDevOpsRepoUpdateSample.d.ts +2 -0
  85. package/dist-esm/samples-dev/azureDevOpsRepoUpdateSample.d.ts.map +1 -0
  86. package/dist-esm/samples-dev/azureDevOpsRepoUpdateSample.js +36 -0
  87. package/dist-esm/samples-dev/azureDevOpsRepoUpdateSample.js.map +1 -0
  88. package/dist-esm/samples-dev/gitHubConnectorCreateOrUpdateSample.d.ts +2 -0
  89. package/dist-esm/samples-dev/gitHubConnectorCreateOrUpdateSample.d.ts.map +1 -0
  90. package/dist-esm/samples-dev/gitHubConnectorCreateOrUpdateSample.js +35 -0
  91. package/dist-esm/samples-dev/gitHubConnectorCreateOrUpdateSample.js.map +1 -0
  92. package/dist-esm/samples-dev/gitHubConnectorDeleteSample.d.ts +2 -0
  93. package/dist-esm/samples-dev/gitHubConnectorDeleteSample.d.ts.map +1 -0
  94. package/dist-esm/samples-dev/gitHubConnectorDeleteSample.js +31 -0
  95. package/dist-esm/samples-dev/gitHubConnectorDeleteSample.js.map +1 -0
  96. package/dist-esm/samples-dev/gitHubConnectorGetSample.d.ts +2 -0
  97. package/dist-esm/samples-dev/gitHubConnectorGetSample.d.ts.map +1 -0
  98. package/dist-esm/samples-dev/gitHubConnectorGetSample.js +31 -0
  99. package/dist-esm/samples-dev/gitHubConnectorGetSample.js.map +1 -0
  100. package/dist-esm/samples-dev/gitHubConnectorListByResourceGroupSample.d.ts +2 -0
  101. package/dist-esm/samples-dev/gitHubConnectorListByResourceGroupSample.d.ts.map +1 -0
  102. package/dist-esm/samples-dev/gitHubConnectorListByResourceGroupSample.js +44 -0
  103. package/dist-esm/samples-dev/gitHubConnectorListByResourceGroupSample.js.map +1 -0
  104. package/dist-esm/samples-dev/gitHubConnectorListBySubscriptionSample.d.ts +2 -0
  105. package/dist-esm/samples-dev/gitHubConnectorListBySubscriptionSample.d.ts.map +1 -0
  106. package/dist-esm/samples-dev/gitHubConnectorListBySubscriptionSample.js +43 -0
  107. package/dist-esm/samples-dev/gitHubConnectorListBySubscriptionSample.js.map +1 -0
  108. package/dist-esm/samples-dev/gitHubConnectorStatsGetSample.d.ts +2 -0
  109. package/dist-esm/samples-dev/gitHubConnectorStatsGetSample.d.ts.map +1 -0
  110. package/dist-esm/samples-dev/gitHubConnectorStatsGetSample.js +31 -0
  111. package/dist-esm/samples-dev/gitHubConnectorStatsGetSample.js.map +1 -0
  112. package/dist-esm/samples-dev/gitHubConnectorUpdateSample.d.ts +2 -0
  113. package/dist-esm/samples-dev/gitHubConnectorUpdateSample.d.ts.map +1 -0
  114. package/dist-esm/samples-dev/gitHubConnectorUpdateSample.js +36 -0
  115. package/dist-esm/samples-dev/gitHubConnectorUpdateSample.js.map +1 -0
  116. package/dist-esm/samples-dev/gitHubOwnerCreateOrUpdateSample.d.ts +2 -0
  117. package/dist-esm/samples-dev/gitHubOwnerCreateOrUpdateSample.d.ts.map +1 -0
  118. package/dist-esm/samples-dev/gitHubOwnerCreateOrUpdateSample.js +33 -0
  119. package/dist-esm/samples-dev/gitHubOwnerCreateOrUpdateSample.js.map +1 -0
  120. package/dist-esm/samples-dev/gitHubOwnerGetSample.d.ts +2 -0
  121. package/dist-esm/samples-dev/gitHubOwnerGetSample.d.ts.map +1 -0
  122. package/dist-esm/samples-dev/gitHubOwnerGetSample.js +32 -0
  123. package/dist-esm/samples-dev/gitHubOwnerGetSample.js.map +1 -0
  124. package/dist-esm/samples-dev/gitHubOwnerListSample.d.ts +2 -0
  125. package/dist-esm/samples-dev/gitHubOwnerListSample.d.ts.map +1 -0
  126. package/dist-esm/samples-dev/gitHubOwnerListSample.js +45 -0
  127. package/dist-esm/samples-dev/gitHubOwnerListSample.js.map +1 -0
  128. package/dist-esm/samples-dev/gitHubOwnerUpdateSample.d.ts +2 -0
  129. package/dist-esm/samples-dev/gitHubOwnerUpdateSample.d.ts.map +1 -0
  130. package/dist-esm/samples-dev/gitHubOwnerUpdateSample.js +34 -0
  131. package/dist-esm/samples-dev/gitHubOwnerUpdateSample.js.map +1 -0
  132. package/dist-esm/samples-dev/gitHubRepoCreateOrUpdateSample.d.ts +2 -0
  133. package/dist-esm/samples-dev/gitHubRepoCreateOrUpdateSample.d.ts.map +1 -0
  134. package/dist-esm/samples-dev/gitHubRepoCreateOrUpdateSample.js +34 -0
  135. package/dist-esm/samples-dev/gitHubRepoCreateOrUpdateSample.js.map +1 -0
  136. package/dist-esm/samples-dev/gitHubRepoGetSample.d.ts +2 -0
  137. package/dist-esm/samples-dev/gitHubRepoGetSample.d.ts.map +1 -0
  138. package/dist-esm/samples-dev/gitHubRepoGetSample.js +33 -0
  139. package/dist-esm/samples-dev/gitHubRepoGetSample.js.map +1 -0
  140. package/dist-esm/samples-dev/gitHubRepoListByConnectorSample.d.ts +2 -0
  141. package/dist-esm/samples-dev/gitHubRepoListByConnectorSample.d.ts.map +1 -0
  142. package/dist-esm/samples-dev/gitHubRepoListByConnectorSample.js +45 -0
  143. package/dist-esm/samples-dev/gitHubRepoListByConnectorSample.js.map +1 -0
  144. package/dist-esm/samples-dev/gitHubRepoListSample.d.ts +2 -0
  145. package/dist-esm/samples-dev/gitHubRepoListSample.d.ts.map +1 -0
  146. package/dist-esm/samples-dev/gitHubRepoListSample.js +46 -0
  147. package/dist-esm/samples-dev/gitHubRepoListSample.js.map +1 -0
  148. package/dist-esm/samples-dev/gitHubRepoUpdateSample.d.ts +2 -0
  149. package/dist-esm/samples-dev/gitHubRepoUpdateSample.d.ts.map +1 -0
  150. package/dist-esm/samples-dev/gitHubRepoUpdateSample.js +35 -0
  151. package/dist-esm/samples-dev/gitHubRepoUpdateSample.js.map +1 -0
  152. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  153. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  154. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  155. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  156. package/dist-esm/src/index.d.ts +5 -0
  157. package/dist-esm/src/index.d.ts.map +1 -0
  158. package/dist-esm/src/index.js +12 -0
  159. package/dist-esm/src/index.js.map +1 -0
  160. package/dist-esm/src/lroImpl.d.ts +16 -0
  161. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  162. package/dist-esm/src/lroImpl.js +29 -0
  163. package/dist-esm/src/lroImpl.js.map +1 -0
  164. package/dist-esm/src/microsoftSecurityDevOps.d.ts +29 -0
  165. package/dist-esm/src/microsoftSecurityDevOps.d.ts.map +1 -0
  166. package/dist-esm/src/microsoftSecurityDevOps.js +112 -0
  167. package/dist-esm/src/microsoftSecurityDevOps.js.map +1 -0
  168. package/dist-esm/src/models/index.d.ts +833 -0
  169. package/dist-esm/src/models/index.d.ts.map +1 -0
  170. package/dist-esm/src/models/index.js +80 -0
  171. package/dist-esm/src/models/index.js.map +1 -0
  172. package/dist-esm/src/models/mappers.d.ts +45 -0
  173. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  174. package/dist-esm/src/models/mappers.js +1102 -0
  175. package/dist-esm/src/models/mappers.js.map +1 -0
  176. package/dist-esm/src/models/parameters.d.ts +30 -0
  177. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  178. package/dist-esm/src/models/parameters.js +217 -0
  179. package/dist-esm/src/models/parameters.js.map +1 -0
  180. package/dist-esm/src/operations/azureDevOpsConnectorOperations.d.ts +103 -0
  181. package/dist-esm/src/operations/azureDevOpsConnectorOperations.d.ts.map +1 -0
  182. package/dist-esm/src/operations/azureDevOpsConnectorOperations.js +508 -0
  183. package/dist-esm/src/operations/azureDevOpsConnectorOperations.js.map +1 -0
  184. package/dist-esm/src/operations/azureDevOpsConnectorStatsOperations.d.ts +20 -0
  185. package/dist-esm/src/operations/azureDevOpsConnectorStatsOperations.d.ts.map +1 -0
  186. package/dist-esm/src/operations/azureDevOpsConnectorStatsOperations.js +53 -0
  187. package/dist-esm/src/operations/azureDevOpsConnectorStatsOperations.js.map +1 -0
  188. package/dist-esm/src/operations/azureDevOpsOrgOperations.d.ts +79 -0
  189. package/dist-esm/src/operations/azureDevOpsOrgOperations.d.ts.map +1 -0
  190. package/dist-esm/src/operations/azureDevOpsOrgOperations.js +360 -0
  191. package/dist-esm/src/operations/azureDevOpsOrgOperations.js.map +1 -0
  192. package/dist-esm/src/operations/azureDevOpsProjectOperations.d.ts +87 -0
  193. package/dist-esm/src/operations/azureDevOpsProjectOperations.d.ts.map +1 -0
  194. package/dist-esm/src/operations/azureDevOpsProjectOperations.js +387 -0
  195. package/dist-esm/src/operations/azureDevOpsProjectOperations.js.map +1 -0
  196. package/dist-esm/src/operations/azureDevOpsRepoOperations.d.ts +117 -0
  197. package/dist-esm/src/operations/azureDevOpsRepoOperations.d.ts.map +1 -0
  198. package/dist-esm/src/operations/azureDevOpsRepoOperations.js +515 -0
  199. package/dist-esm/src/operations/azureDevOpsRepoOperations.js.map +1 -0
  200. package/dist-esm/src/operations/gitHubConnectorOperations.d.ts +103 -0
  201. package/dist-esm/src/operations/gitHubConnectorOperations.d.ts.map +1 -0
  202. package/dist-esm/src/operations/gitHubConnectorOperations.js +503 -0
  203. package/dist-esm/src/operations/gitHubConnectorOperations.js.map +1 -0
  204. package/dist-esm/src/operations/gitHubConnectorStatsOperations.d.ts +20 -0
  205. package/dist-esm/src/operations/gitHubConnectorStatsOperations.d.ts.map +1 -0
  206. package/dist-esm/src/operations/gitHubConnectorStatsOperations.js +53 -0
  207. package/dist-esm/src/operations/gitHubConnectorStatsOperations.js.map +1 -0
  208. package/dist-esm/src/operations/gitHubOwnerOperations.d.ts +81 -0
  209. package/dist-esm/src/operations/gitHubOwnerOperations.d.ts.map +1 -0
  210. package/dist-esm/src/operations/gitHubOwnerOperations.js +352 -0
  211. package/dist-esm/src/operations/gitHubOwnerOperations.js.map +1 -0
  212. package/dist-esm/src/operations/gitHubRepoOperations.d.ts +113 -0
  213. package/dist-esm/src/operations/gitHubRepoOperations.d.ts.map +1 -0
  214. package/dist-esm/src/operations/gitHubRepoOperations.js +496 -0
  215. package/dist-esm/src/operations/gitHubRepoOperations.js.map +1 -0
  216. package/dist-esm/src/operations/index.d.ts +11 -0
  217. package/dist-esm/src/operations/index.d.ts.map +1 -0
  218. package/dist-esm/src/operations/index.js +18 -0
  219. package/dist-esm/src/operations/index.js.map +1 -0
  220. package/dist-esm/src/operations/operations.d.ts +32 -0
  221. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  222. package/dist-esm/src/operations/operations.js +120 -0
  223. package/dist-esm/src/operations/operations.js.map +1 -0
  224. package/dist-esm/src/operationsInterfaces/azureDevOpsConnectorOperations.d.ts +68 -0
  225. package/dist-esm/src/operationsInterfaces/azureDevOpsConnectorOperations.d.ts.map +1 -0
  226. package/dist-esm/src/operationsInterfaces/azureDevOpsConnectorOperations.js +9 -0
  227. package/dist-esm/src/operationsInterfaces/azureDevOpsConnectorOperations.js.map +1 -0
  228. package/dist-esm/src/operationsInterfaces/azureDevOpsConnectorStatsOperations.d.ts +12 -0
  229. package/dist-esm/src/operationsInterfaces/azureDevOpsConnectorStatsOperations.d.ts.map +1 -0
  230. package/dist-esm/src/operationsInterfaces/azureDevOpsConnectorStatsOperations.js +9 -0
  231. package/dist-esm/src/operationsInterfaces/azureDevOpsConnectorStatsOperations.js.map +1 -0
  232. package/dist-esm/src/operationsInterfaces/azureDevOpsOrgOperations.d.ts +55 -0
  233. package/dist-esm/src/operationsInterfaces/azureDevOpsOrgOperations.d.ts.map +1 -0
  234. package/dist-esm/src/operationsInterfaces/azureDevOpsOrgOperations.js +9 -0
  235. package/dist-esm/src/operationsInterfaces/azureDevOpsOrgOperations.js.map +1 -0
  236. package/dist-esm/src/operationsInterfaces/azureDevOpsProjectOperations.d.ts +61 -0
  237. package/dist-esm/src/operationsInterfaces/azureDevOpsProjectOperations.d.ts.map +1 -0
  238. package/dist-esm/src/operationsInterfaces/azureDevOpsProjectOperations.js +9 -0
  239. package/dist-esm/src/operationsInterfaces/azureDevOpsProjectOperations.js.map +1 -0
  240. package/dist-esm/src/operationsInterfaces/azureDevOpsRepoOperations.d.ts +73 -0
  241. package/dist-esm/src/operationsInterfaces/azureDevOpsRepoOperations.d.ts.map +1 -0
  242. package/dist-esm/src/operationsInterfaces/azureDevOpsRepoOperations.js +9 -0
  243. package/dist-esm/src/operationsInterfaces/azureDevOpsRepoOperations.js.map +1 -0
  244. package/dist-esm/src/operationsInterfaces/gitHubConnectorOperations.d.ts +68 -0
  245. package/dist-esm/src/operationsInterfaces/gitHubConnectorOperations.d.ts.map +1 -0
  246. package/dist-esm/src/operationsInterfaces/gitHubConnectorOperations.js +9 -0
  247. package/dist-esm/src/operationsInterfaces/gitHubConnectorOperations.js.map +1 -0
  248. package/dist-esm/src/operationsInterfaces/gitHubConnectorStatsOperations.d.ts +12 -0
  249. package/dist-esm/src/operationsInterfaces/gitHubConnectorStatsOperations.d.ts.map +1 -0
  250. package/dist-esm/src/operationsInterfaces/gitHubConnectorStatsOperations.js +9 -0
  251. package/dist-esm/src/operationsInterfaces/gitHubConnectorStatsOperations.js.map +1 -0
  252. package/dist-esm/src/operationsInterfaces/gitHubOwnerOperations.d.ts +56 -0
  253. package/dist-esm/src/operationsInterfaces/gitHubOwnerOperations.d.ts.map +1 -0
  254. package/dist-esm/src/operationsInterfaces/gitHubOwnerOperations.js +9 -0
  255. package/dist-esm/src/operationsInterfaces/gitHubOwnerOperations.js.map +1 -0
  256. package/dist-esm/src/operationsInterfaces/gitHubRepoOperations.d.ts +69 -0
  257. package/dist-esm/src/operationsInterfaces/gitHubRepoOperations.d.ts.map +1 -0
  258. package/dist-esm/src/operationsInterfaces/gitHubRepoOperations.js +9 -0
  259. package/dist-esm/src/operationsInterfaces/gitHubRepoOperations.js.map +1 -0
  260. package/dist-esm/src/operationsInterfaces/index.d.ts +11 -0
  261. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  262. package/dist-esm/src/operationsInterfaces/index.js +18 -0
  263. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  264. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  265. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  266. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  267. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  268. package/dist-esm/test/sampleTest.d.ts +2 -0
  269. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  270. package/dist-esm/test/sampleTest.js +38 -0
  271. package/dist-esm/test/sampleTest.js.map +1 -0
  272. package/dist-esm/test/securitydevops_examples.spec.d.ts +4 -0
  273. package/dist-esm/test/securitydevops_examples.spec.d.ts.map +1 -0
  274. package/dist-esm/test/securitydevops_examples.spec.js +117 -0
  275. package/dist-esm/test/securitydevops_examples.spec.js.map +1 -0
  276. package/package.json +121 -0
  277. package/review/arm-securitydevops.api.md +901 -0
  278. package/rollup.config.js +122 -0
  279. package/src/index.ts +12 -0
  280. package/src/lroImpl.ts +34 -0
  281. package/src/microsoftSecurityDevOps.ts +189 -0
  282. package/src/models/index.ts +1008 -0
  283. package/src/models/mappers.ts +1179 -0
  284. package/src/models/parameters.ts +258 -0
  285. package/src/operations/azureDevOpsConnectorOperations.ts +679 -0
  286. package/src/operations/azureDevOpsConnectorStatsOperations.ts +73 -0
  287. package/src/operations/azureDevOpsOrgOperations.ts +511 -0
  288. package/src/operations/azureDevOpsProjectOperations.ts +556 -0
  289. package/src/operations/azureDevOpsRepoOperations.ts +744 -0
  290. package/src/operations/gitHubConnectorOperations.ts +674 -0
  291. package/src/operations/gitHubConnectorStatsOperations.ts +73 -0
  292. package/src/operations/gitHubOwnerOperations.ts +503 -0
  293. package/src/operations/gitHubRepoOperations.ts +707 -0
  294. package/src/operations/index.ts +18 -0
  295. package/src/operations/operations.ts +137 -0
  296. package/src/operationsInterfaces/azureDevOpsConnectorOperations.ts +133 -0
  297. package/src/operationsInterfaces/azureDevOpsConnectorStatsOperations.ts +27 -0
  298. package/src/operationsInterfaces/azureDevOpsOrgOperations.ts +114 -0
  299. package/src/operationsInterfaces/azureDevOpsProjectOperations.ts +126 -0
  300. package/src/operationsInterfaces/azureDevOpsRepoOperations.ts +149 -0
  301. package/src/operationsInterfaces/gitHubConnectorOperations.ts +133 -0
  302. package/src/operationsInterfaces/gitHubConnectorStatsOperations.ts +27 -0
  303. package/src/operationsInterfaces/gitHubOwnerOperations.ts +115 -0
  304. package/src/operationsInterfaces/gitHubRepoOperations.ts +139 -0
  305. package/src/operationsInterfaces/index.ts +18 -0
  306. package/src/operationsInterfaces/operations.ts +22 -0
  307. package/tsconfig.json +33 -0
  308. package/types/arm-securitydevops.d.ts +1477 -0
  309. package/types/tsdoc-metadata.json +11 -0
package/dist/index.js ADDED
@@ -0,0 +1,4908 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var coreClient = require('@azure/core-client');
7
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
8
+ var coreLro = require('@azure/core-lro');
9
+
10
+ function _interopNamespace(e) {
11
+ if (e && e.__esModule) return e;
12
+ var n = Object.create(null);
13
+ if (e) {
14
+ Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default') {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ n["default"] = e;
25
+ return Object.freeze(n);
26
+ }
27
+
28
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
30
+
31
+ /*
32
+ * Copyright (c) Microsoft Corporation.
33
+ * Licensed under the MIT License.
34
+ *
35
+ * Code generated by Microsoft (R) AutoRest Code Generator.
36
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
37
+ */
38
+ /** Known values of {@link ProvisioningState} that the service accepts. */
39
+ exports.KnownProvisioningState = void 0;
40
+ (function (KnownProvisioningState) {
41
+ /** Succeeded */
42
+ KnownProvisioningState["Succeeded"] = "Succeeded";
43
+ /** Failed */
44
+ KnownProvisioningState["Failed"] = "Failed";
45
+ /** Canceled */
46
+ KnownProvisioningState["Canceled"] = "Canceled";
47
+ })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
48
+ /** Known values of {@link AutoDiscovery} that the service accepts. */
49
+ exports.KnownAutoDiscovery = void 0;
50
+ (function (KnownAutoDiscovery) {
51
+ /** Disabled */
52
+ KnownAutoDiscovery["Disabled"] = "Disabled";
53
+ /** Enabled */
54
+ KnownAutoDiscovery["Enabled"] = "Enabled";
55
+ })(exports.KnownAutoDiscovery || (exports.KnownAutoDiscovery = {}));
56
+ /** Known values of {@link CreatedByType} that the service accepts. */
57
+ exports.KnownCreatedByType = void 0;
58
+ (function (KnownCreatedByType) {
59
+ /** User */
60
+ KnownCreatedByType["User"] = "User";
61
+ /** Application */
62
+ KnownCreatedByType["Application"] = "Application";
63
+ /** ManagedIdentity */
64
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
65
+ /** Key */
66
+ KnownCreatedByType["Key"] = "Key";
67
+ })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
68
+ /** Known values of {@link ActionableRemediationState} that the service accepts. */
69
+ exports.KnownActionableRemediationState = void 0;
70
+ (function (KnownActionableRemediationState) {
71
+ /** None */
72
+ KnownActionableRemediationState["None"] = "None";
73
+ /** Disabled */
74
+ KnownActionableRemediationState["Disabled"] = "Disabled";
75
+ /** Enabled */
76
+ KnownActionableRemediationState["Enabled"] = "Enabled";
77
+ })(exports.KnownActionableRemediationState || (exports.KnownActionableRemediationState = {}));
78
+ /** Known values of {@link RuleCategory} that the service accepts. */
79
+ exports.KnownRuleCategory = void 0;
80
+ (function (KnownRuleCategory) {
81
+ /** Code */
82
+ KnownRuleCategory["Code"] = "Code";
83
+ /** Artifacts */
84
+ KnownRuleCategory["Artifacts"] = "Artifacts";
85
+ /** Dependencies */
86
+ KnownRuleCategory["Dependencies"] = "Dependencies";
87
+ /** Secrets */
88
+ KnownRuleCategory["Secrets"] = "Secrets";
89
+ /** IaC */
90
+ KnownRuleCategory["IaC"] = "IaC";
91
+ /** Containers */
92
+ KnownRuleCategory["Containers"] = "Containers";
93
+ })(exports.KnownRuleCategory || (exports.KnownRuleCategory = {}));
94
+ /** Known values of {@link Origin} that the service accepts. */
95
+ exports.KnownOrigin = void 0;
96
+ (function (KnownOrigin) {
97
+ /** User */
98
+ KnownOrigin["User"] = "user";
99
+ /** System */
100
+ KnownOrigin["System"] = "system";
101
+ /** UserSystem */
102
+ KnownOrigin["UserSystem"] = "user,system";
103
+ })(exports.KnownOrigin || (exports.KnownOrigin = {}));
104
+ /** Known values of {@link ActionType} that the service accepts. */
105
+ exports.KnownActionType = void 0;
106
+ (function (KnownActionType) {
107
+ /** Internal */
108
+ KnownActionType["Internal"] = "Internal";
109
+ })(exports.KnownActionType || (exports.KnownActionType = {}));
110
+
111
+ /*
112
+ * Copyright (c) Microsoft Corporation.
113
+ * Licensed under the MIT License.
114
+ *
115
+ * Code generated by Microsoft (R) AutoRest Code Generator.
116
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
117
+ */
118
+ const AzureDevOpsConnectorListResponse = {
119
+ type: {
120
+ name: "Composite",
121
+ className: "AzureDevOpsConnectorListResponse",
122
+ modelProperties: {
123
+ value: {
124
+ serializedName: "value",
125
+ type: {
126
+ name: "Sequence",
127
+ element: {
128
+ type: {
129
+ name: "Composite",
130
+ className: "AzureDevOpsConnector"
131
+ }
132
+ }
133
+ }
134
+ },
135
+ nextLink: {
136
+ serializedName: "nextLink",
137
+ type: {
138
+ name: "String"
139
+ }
140
+ }
141
+ }
142
+ }
143
+ };
144
+ const AzureDevOpsConnectorProperties = {
145
+ type: {
146
+ name: "Composite",
147
+ className: "AzureDevOpsConnectorProperties",
148
+ modelProperties: {
149
+ provisioningState: {
150
+ serializedName: "provisioningState",
151
+ type: {
152
+ name: "String"
153
+ }
154
+ },
155
+ authorization: {
156
+ serializedName: "authorization",
157
+ type: {
158
+ name: "Composite",
159
+ className: "AuthorizationInfo"
160
+ }
161
+ },
162
+ orgs: {
163
+ serializedName: "orgs",
164
+ type: {
165
+ name: "Sequence",
166
+ element: {
167
+ type: {
168
+ name: "Composite",
169
+ className: "AzureDevOpsOrgMetadata"
170
+ }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ }
176
+ };
177
+ const AuthorizationInfo = {
178
+ type: {
179
+ name: "Composite",
180
+ className: "AuthorizationInfo",
181
+ modelProperties: {
182
+ code: {
183
+ serializedName: "code",
184
+ type: {
185
+ name: "String"
186
+ }
187
+ }
188
+ }
189
+ }
190
+ };
191
+ const AzureDevOpsOrgMetadata = {
192
+ type: {
193
+ name: "Composite",
194
+ className: "AzureDevOpsOrgMetadata",
195
+ modelProperties: {
196
+ name: {
197
+ serializedName: "name",
198
+ type: {
199
+ name: "String"
200
+ }
201
+ },
202
+ autoDiscovery: {
203
+ serializedName: "autoDiscovery",
204
+ type: {
205
+ name: "String"
206
+ }
207
+ },
208
+ projects: {
209
+ serializedName: "projects",
210
+ type: {
211
+ name: "Sequence",
212
+ element: {
213
+ type: {
214
+ name: "Composite",
215
+ className: "AzureDevOpsProjectMetadata"
216
+ }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ }
222
+ };
223
+ const AzureDevOpsProjectMetadata = {
224
+ type: {
225
+ name: "Composite",
226
+ className: "AzureDevOpsProjectMetadata",
227
+ modelProperties: {
228
+ name: {
229
+ serializedName: "name",
230
+ type: {
231
+ name: "String"
232
+ }
233
+ },
234
+ autoDiscovery: {
235
+ serializedName: "autoDiscovery",
236
+ type: {
237
+ name: "String"
238
+ }
239
+ },
240
+ repos: {
241
+ serializedName: "repos",
242
+ type: {
243
+ name: "Sequence",
244
+ element: {
245
+ type: {
246
+ name: "String"
247
+ }
248
+ }
249
+ }
250
+ }
251
+ }
252
+ }
253
+ };
254
+ const Resource = {
255
+ type: {
256
+ name: "Composite",
257
+ className: "Resource",
258
+ modelProperties: {
259
+ id: {
260
+ serializedName: "id",
261
+ readOnly: true,
262
+ type: {
263
+ name: "String"
264
+ }
265
+ },
266
+ name: {
267
+ serializedName: "name",
268
+ readOnly: true,
269
+ type: {
270
+ name: "String"
271
+ }
272
+ },
273
+ type: {
274
+ serializedName: "type",
275
+ readOnly: true,
276
+ type: {
277
+ name: "String"
278
+ }
279
+ },
280
+ systemData: {
281
+ serializedName: "systemData",
282
+ type: {
283
+ name: "Composite",
284
+ className: "SystemData"
285
+ }
286
+ }
287
+ }
288
+ }
289
+ };
290
+ const SystemData = {
291
+ type: {
292
+ name: "Composite",
293
+ className: "SystemData",
294
+ modelProperties: {
295
+ createdBy: {
296
+ serializedName: "createdBy",
297
+ type: {
298
+ name: "String"
299
+ }
300
+ },
301
+ createdByType: {
302
+ serializedName: "createdByType",
303
+ type: {
304
+ name: "String"
305
+ }
306
+ },
307
+ createdAt: {
308
+ serializedName: "createdAt",
309
+ type: {
310
+ name: "DateTime"
311
+ }
312
+ },
313
+ lastModifiedBy: {
314
+ serializedName: "lastModifiedBy",
315
+ type: {
316
+ name: "String"
317
+ }
318
+ },
319
+ lastModifiedByType: {
320
+ serializedName: "lastModifiedByType",
321
+ type: {
322
+ name: "String"
323
+ }
324
+ },
325
+ lastModifiedAt: {
326
+ serializedName: "lastModifiedAt",
327
+ type: {
328
+ name: "DateTime"
329
+ }
330
+ }
331
+ }
332
+ }
333
+ };
334
+ const ErrorResponse = {
335
+ type: {
336
+ name: "Composite",
337
+ className: "ErrorResponse",
338
+ modelProperties: {
339
+ error: {
340
+ serializedName: "error",
341
+ type: {
342
+ name: "Composite",
343
+ className: "ErrorDetail"
344
+ }
345
+ }
346
+ }
347
+ }
348
+ };
349
+ const ErrorDetail = {
350
+ type: {
351
+ name: "Composite",
352
+ className: "ErrorDetail",
353
+ modelProperties: {
354
+ code: {
355
+ serializedName: "code",
356
+ readOnly: true,
357
+ type: {
358
+ name: "String"
359
+ }
360
+ },
361
+ message: {
362
+ serializedName: "message",
363
+ readOnly: true,
364
+ type: {
365
+ name: "String"
366
+ }
367
+ },
368
+ target: {
369
+ serializedName: "target",
370
+ readOnly: true,
371
+ type: {
372
+ name: "String"
373
+ }
374
+ },
375
+ details: {
376
+ serializedName: "details",
377
+ readOnly: true,
378
+ type: {
379
+ name: "Sequence",
380
+ element: {
381
+ type: {
382
+ name: "Composite",
383
+ className: "ErrorDetail"
384
+ }
385
+ }
386
+ }
387
+ },
388
+ additionalInfo: {
389
+ serializedName: "additionalInfo",
390
+ readOnly: true,
391
+ type: {
392
+ name: "Sequence",
393
+ element: {
394
+ type: {
395
+ name: "Composite",
396
+ className: "ErrorAdditionalInfo"
397
+ }
398
+ }
399
+ }
400
+ }
401
+ }
402
+ }
403
+ };
404
+ const ErrorAdditionalInfo = {
405
+ type: {
406
+ name: "Composite",
407
+ className: "ErrorAdditionalInfo",
408
+ modelProperties: {
409
+ type: {
410
+ serializedName: "type",
411
+ readOnly: true,
412
+ type: {
413
+ name: "String"
414
+ }
415
+ },
416
+ info: {
417
+ serializedName: "info",
418
+ readOnly: true,
419
+ type: {
420
+ name: "Dictionary",
421
+ value: { type: { name: "any" } }
422
+ }
423
+ }
424
+ }
425
+ }
426
+ };
427
+ const AzureDevOpsRepoListResponse = {
428
+ type: {
429
+ name: "Composite",
430
+ className: "AzureDevOpsRepoListResponse",
431
+ modelProperties: {
432
+ value: {
433
+ serializedName: "value",
434
+ type: {
435
+ name: "Sequence",
436
+ element: {
437
+ type: {
438
+ name: "Composite",
439
+ className: "AzureDevOpsRepo"
440
+ }
441
+ }
442
+ }
443
+ },
444
+ nextLink: {
445
+ serializedName: "nextLink",
446
+ type: {
447
+ name: "String"
448
+ }
449
+ }
450
+ }
451
+ }
452
+ };
453
+ const AzureDevOpsRepoProperties = {
454
+ type: {
455
+ name: "Composite",
456
+ className: "AzureDevOpsRepoProperties",
457
+ modelProperties: {
458
+ provisioningState: {
459
+ serializedName: "provisioningState",
460
+ type: {
461
+ name: "String"
462
+ }
463
+ },
464
+ repoId: {
465
+ serializedName: "repoId",
466
+ type: {
467
+ name: "String"
468
+ }
469
+ },
470
+ repoUrl: {
471
+ serializedName: "repoUrl",
472
+ type: {
473
+ name: "String"
474
+ }
475
+ },
476
+ orgName: {
477
+ serializedName: "orgName",
478
+ type: {
479
+ name: "String"
480
+ }
481
+ },
482
+ projectName: {
483
+ serializedName: "projectName",
484
+ type: {
485
+ name: "String"
486
+ }
487
+ },
488
+ visibility: {
489
+ serializedName: "visibility",
490
+ type: {
491
+ name: "String"
492
+ }
493
+ },
494
+ actionableRemediation: {
495
+ serializedName: "actionableRemediation",
496
+ type: {
497
+ name: "Composite",
498
+ className: "ActionableRemediation"
499
+ }
500
+ }
501
+ }
502
+ }
503
+ };
504
+ const ActionableRemediation = {
505
+ type: {
506
+ name: "Composite",
507
+ className: "ActionableRemediation",
508
+ modelProperties: {
509
+ state: {
510
+ serializedName: "state",
511
+ type: {
512
+ name: "String"
513
+ }
514
+ },
515
+ severityLevels: {
516
+ serializedName: "severityLevels",
517
+ type: {
518
+ name: "Sequence",
519
+ element: {
520
+ type: {
521
+ name: "String"
522
+ }
523
+ }
524
+ }
525
+ },
526
+ categories: {
527
+ serializedName: "categories",
528
+ type: {
529
+ name: "Sequence",
530
+ element: {
531
+ type: {
532
+ name: "String"
533
+ }
534
+ }
535
+ }
536
+ },
537
+ branchConfiguration: {
538
+ serializedName: "branchConfiguration",
539
+ type: {
540
+ name: "Composite",
541
+ className: "TargetBranchConfiguration"
542
+ }
543
+ }
544
+ }
545
+ }
546
+ };
547
+ const TargetBranchConfiguration = {
548
+ type: {
549
+ name: "Composite",
550
+ className: "TargetBranchConfiguration",
551
+ modelProperties: {
552
+ names: {
553
+ serializedName: "names",
554
+ type: {
555
+ name: "Sequence",
556
+ element: {
557
+ type: {
558
+ name: "String"
559
+ }
560
+ }
561
+ }
562
+ }
563
+ }
564
+ }
565
+ };
566
+ const AzureDevOpsConnectorStatsListResponse = {
567
+ type: {
568
+ name: "Composite",
569
+ className: "AzureDevOpsConnectorStatsListResponse",
570
+ modelProperties: {
571
+ value: {
572
+ serializedName: "value",
573
+ type: {
574
+ name: "Sequence",
575
+ element: {
576
+ type: {
577
+ name: "Composite",
578
+ className: "AzureDevOpsConnectorStats"
579
+ }
580
+ }
581
+ }
582
+ },
583
+ nextLink: {
584
+ serializedName: "nextLink",
585
+ type: {
586
+ name: "String"
587
+ }
588
+ }
589
+ }
590
+ }
591
+ };
592
+ const AzureDevOpsConnectorStatsProperties = {
593
+ type: {
594
+ name: "Composite",
595
+ className: "AzureDevOpsConnectorStatsProperties",
596
+ modelProperties: {
597
+ provisioningState: {
598
+ serializedName: "provisioningState",
599
+ type: {
600
+ name: "String"
601
+ }
602
+ },
603
+ orgsCount: {
604
+ serializedName: "orgsCount",
605
+ type: {
606
+ name: "Number"
607
+ }
608
+ },
609
+ projectsCount: {
610
+ serializedName: "projectsCount",
611
+ type: {
612
+ name: "Number"
613
+ }
614
+ },
615
+ reposCount: {
616
+ serializedName: "reposCount",
617
+ type: {
618
+ name: "Number"
619
+ }
620
+ }
621
+ }
622
+ }
623
+ };
624
+ const AzureDevOpsOrgListResponse = {
625
+ type: {
626
+ name: "Composite",
627
+ className: "AzureDevOpsOrgListResponse",
628
+ modelProperties: {
629
+ value: {
630
+ serializedName: "value",
631
+ type: {
632
+ name: "Sequence",
633
+ element: {
634
+ type: {
635
+ name: "Composite",
636
+ className: "AzureDevOpsOrg"
637
+ }
638
+ }
639
+ }
640
+ },
641
+ nextLink: {
642
+ serializedName: "nextLink",
643
+ type: {
644
+ name: "String"
645
+ }
646
+ }
647
+ }
648
+ }
649
+ };
650
+ const AzureDevOpsOrgProperties = {
651
+ type: {
652
+ name: "Composite",
653
+ className: "AzureDevOpsOrgProperties",
654
+ modelProperties: {
655
+ provisioningState: {
656
+ serializedName: "provisioningState",
657
+ type: {
658
+ name: "String"
659
+ }
660
+ },
661
+ autoDiscovery: {
662
+ serializedName: "autoDiscovery",
663
+ type: {
664
+ name: "String"
665
+ }
666
+ }
667
+ }
668
+ }
669
+ };
670
+ const AzureDevOpsProjectListResponse = {
671
+ type: {
672
+ name: "Composite",
673
+ className: "AzureDevOpsProjectListResponse",
674
+ modelProperties: {
675
+ value: {
676
+ serializedName: "value",
677
+ type: {
678
+ name: "Sequence",
679
+ element: {
680
+ type: {
681
+ name: "Composite",
682
+ className: "AzureDevOpsProject"
683
+ }
684
+ }
685
+ }
686
+ },
687
+ nextLink: {
688
+ serializedName: "nextLink",
689
+ type: {
690
+ name: "String"
691
+ }
692
+ }
693
+ }
694
+ }
695
+ };
696
+ const AzureDevOpsProjectProperties = {
697
+ type: {
698
+ name: "Composite",
699
+ className: "AzureDevOpsProjectProperties",
700
+ modelProperties: {
701
+ provisioningState: {
702
+ serializedName: "provisioningState",
703
+ type: {
704
+ name: "String"
705
+ }
706
+ },
707
+ projectId: {
708
+ serializedName: "projectId",
709
+ type: {
710
+ name: "String"
711
+ }
712
+ },
713
+ orgName: {
714
+ serializedName: "orgName",
715
+ type: {
716
+ name: "String"
717
+ }
718
+ },
719
+ autoDiscovery: {
720
+ serializedName: "autoDiscovery",
721
+ type: {
722
+ name: "String"
723
+ }
724
+ }
725
+ }
726
+ }
727
+ };
728
+ const GitHubConnectorListResponse = {
729
+ type: {
730
+ name: "Composite",
731
+ className: "GitHubConnectorListResponse",
732
+ modelProperties: {
733
+ value: {
734
+ serializedName: "value",
735
+ type: {
736
+ name: "Sequence",
737
+ element: {
738
+ type: {
739
+ name: "Composite",
740
+ className: "GitHubConnector"
741
+ }
742
+ }
743
+ }
744
+ },
745
+ nextLink: {
746
+ serializedName: "nextLink",
747
+ type: {
748
+ name: "String"
749
+ }
750
+ }
751
+ }
752
+ }
753
+ };
754
+ const GitHubConnectorProperties = {
755
+ type: {
756
+ name: "Composite",
757
+ className: "GitHubConnectorProperties",
758
+ modelProperties: {
759
+ provisioningState: {
760
+ serializedName: "provisioningState",
761
+ type: {
762
+ name: "String"
763
+ }
764
+ },
765
+ code: {
766
+ serializedName: "code",
767
+ type: {
768
+ name: "String"
769
+ }
770
+ }
771
+ }
772
+ }
773
+ };
774
+ const GitHubRepoListResponse = {
775
+ type: {
776
+ name: "Composite",
777
+ className: "GitHubRepoListResponse",
778
+ modelProperties: {
779
+ value: {
780
+ serializedName: "value",
781
+ type: {
782
+ name: "Sequence",
783
+ element: {
784
+ type: {
785
+ name: "Composite",
786
+ className: "GitHubRepo"
787
+ }
788
+ }
789
+ }
790
+ },
791
+ nextLink: {
792
+ serializedName: "nextLink",
793
+ type: {
794
+ name: "String"
795
+ }
796
+ }
797
+ }
798
+ }
799
+ };
800
+ const GitHubRepoProperties = {
801
+ type: {
802
+ name: "Composite",
803
+ className: "GitHubRepoProperties",
804
+ modelProperties: {
805
+ provisioningState: {
806
+ serializedName: "provisioningState",
807
+ type: {
808
+ name: "String"
809
+ }
810
+ },
811
+ accountId: {
812
+ serializedName: "accountId",
813
+ type: {
814
+ name: "Number"
815
+ }
816
+ },
817
+ repoUrl: {
818
+ serializedName: "repoUrl",
819
+ type: {
820
+ name: "String"
821
+ }
822
+ },
823
+ ownerName: {
824
+ serializedName: "ownerName",
825
+ type: {
826
+ name: "String"
827
+ }
828
+ }
829
+ }
830
+ }
831
+ };
832
+ const GitHubConnectorStatsListResponse = {
833
+ type: {
834
+ name: "Composite",
835
+ className: "GitHubConnectorStatsListResponse",
836
+ modelProperties: {
837
+ value: {
838
+ serializedName: "value",
839
+ type: {
840
+ name: "Sequence",
841
+ element: {
842
+ type: {
843
+ name: "Composite",
844
+ className: "GitHubConnectorStats"
845
+ }
846
+ }
847
+ }
848
+ },
849
+ nextLink: {
850
+ serializedName: "nextLink",
851
+ type: {
852
+ name: "String"
853
+ }
854
+ }
855
+ }
856
+ }
857
+ };
858
+ const GitHubConnectorStatsProperties = {
859
+ type: {
860
+ name: "Composite",
861
+ className: "GitHubConnectorStatsProperties",
862
+ modelProperties: {
863
+ provisioningState: {
864
+ serializedName: "provisioningState",
865
+ type: {
866
+ name: "String"
867
+ }
868
+ },
869
+ ownersCount: {
870
+ serializedName: "ownersCount",
871
+ type: {
872
+ name: "Number"
873
+ }
874
+ },
875
+ reposCount: {
876
+ serializedName: "reposCount",
877
+ type: {
878
+ name: "Number"
879
+ }
880
+ }
881
+ }
882
+ }
883
+ };
884
+ const GitHubOwnerListResponse = {
885
+ type: {
886
+ name: "Composite",
887
+ className: "GitHubOwnerListResponse",
888
+ modelProperties: {
889
+ value: {
890
+ serializedName: "value",
891
+ type: {
892
+ name: "Sequence",
893
+ element: {
894
+ type: {
895
+ name: "Composite",
896
+ className: "GitHubOwner"
897
+ }
898
+ }
899
+ }
900
+ },
901
+ nextLink: {
902
+ serializedName: "nextLink",
903
+ type: {
904
+ name: "String"
905
+ }
906
+ }
907
+ }
908
+ }
909
+ };
910
+ const GitHubOwnerProperties = {
911
+ type: {
912
+ name: "Composite",
913
+ className: "GitHubOwnerProperties",
914
+ modelProperties: {
915
+ provisioningState: {
916
+ serializedName: "provisioningState",
917
+ type: {
918
+ name: "String"
919
+ }
920
+ },
921
+ ownerUrl: {
922
+ serializedName: "ownerUrl",
923
+ type: {
924
+ name: "String"
925
+ }
926
+ }
927
+ }
928
+ }
929
+ };
930
+ const OperationListResult = {
931
+ type: {
932
+ name: "Composite",
933
+ className: "OperationListResult",
934
+ modelProperties: {
935
+ value: {
936
+ serializedName: "value",
937
+ readOnly: true,
938
+ type: {
939
+ name: "Sequence",
940
+ element: {
941
+ type: {
942
+ name: "Composite",
943
+ className: "Operation"
944
+ }
945
+ }
946
+ }
947
+ },
948
+ nextLink: {
949
+ serializedName: "nextLink",
950
+ readOnly: true,
951
+ type: {
952
+ name: "String"
953
+ }
954
+ }
955
+ }
956
+ }
957
+ };
958
+ const Operation = {
959
+ type: {
960
+ name: "Composite",
961
+ className: "Operation",
962
+ modelProperties: {
963
+ name: {
964
+ serializedName: "name",
965
+ readOnly: true,
966
+ type: {
967
+ name: "String"
968
+ }
969
+ },
970
+ isDataAction: {
971
+ serializedName: "isDataAction",
972
+ readOnly: true,
973
+ type: {
974
+ name: "Boolean"
975
+ }
976
+ },
977
+ display: {
978
+ serializedName: "display",
979
+ type: {
980
+ name: "Composite",
981
+ className: "OperationDisplay"
982
+ }
983
+ },
984
+ origin: {
985
+ serializedName: "origin",
986
+ readOnly: true,
987
+ type: {
988
+ name: "String"
989
+ }
990
+ },
991
+ actionType: {
992
+ serializedName: "actionType",
993
+ readOnly: true,
994
+ type: {
995
+ name: "String"
996
+ }
997
+ }
998
+ }
999
+ }
1000
+ };
1001
+ const OperationDisplay = {
1002
+ type: {
1003
+ name: "Composite",
1004
+ className: "OperationDisplay",
1005
+ modelProperties: {
1006
+ provider: {
1007
+ serializedName: "provider",
1008
+ readOnly: true,
1009
+ type: {
1010
+ name: "String"
1011
+ }
1012
+ },
1013
+ resource: {
1014
+ serializedName: "resource",
1015
+ readOnly: true,
1016
+ type: {
1017
+ name: "String"
1018
+ }
1019
+ },
1020
+ operation: {
1021
+ serializedName: "operation",
1022
+ readOnly: true,
1023
+ type: {
1024
+ name: "String"
1025
+ }
1026
+ },
1027
+ description: {
1028
+ serializedName: "description",
1029
+ readOnly: true,
1030
+ type: {
1031
+ name: "String"
1032
+ }
1033
+ }
1034
+ }
1035
+ }
1036
+ };
1037
+ const GitHubReposProperties = {
1038
+ type: {
1039
+ name: "Composite",
1040
+ className: "GitHubReposProperties",
1041
+ modelProperties: {
1042
+ provisioningState: {
1043
+ serializedName: "provisioningState",
1044
+ type: {
1045
+ name: "String"
1046
+ }
1047
+ },
1048
+ accountId: {
1049
+ serializedName: "accountId",
1050
+ type: {
1051
+ name: "Number"
1052
+ }
1053
+ },
1054
+ repoName: {
1055
+ serializedName: "repoName",
1056
+ type: {
1057
+ name: "String"
1058
+ }
1059
+ },
1060
+ repoUrl: {
1061
+ serializedName: "repoUrl",
1062
+ type: {
1063
+ name: "String"
1064
+ }
1065
+ }
1066
+ }
1067
+ }
1068
+ };
1069
+ const TrackedResource = {
1070
+ type: {
1071
+ name: "Composite",
1072
+ className: "TrackedResource",
1073
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { tags: {
1074
+ serializedName: "tags",
1075
+ type: {
1076
+ name: "Dictionary",
1077
+ value: { type: { name: "String" } }
1078
+ }
1079
+ }, location: {
1080
+ serializedName: "location",
1081
+ required: true,
1082
+ type: {
1083
+ name: "String"
1084
+ }
1085
+ } })
1086
+ }
1087
+ };
1088
+ const ProxyResource = {
1089
+ type: {
1090
+ name: "Composite",
1091
+ className: "ProxyResource",
1092
+ modelProperties: Object.assign({}, Resource.type.modelProperties)
1093
+ }
1094
+ };
1095
+ const AzureDevOpsConnector = {
1096
+ type: {
1097
+ name: "Composite",
1098
+ className: "AzureDevOpsConnector",
1099
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { properties: {
1100
+ serializedName: "properties",
1101
+ type: {
1102
+ name: "Composite",
1103
+ className: "AzureDevOpsConnectorProperties"
1104
+ }
1105
+ } })
1106
+ }
1107
+ };
1108
+ const GitHubConnector = {
1109
+ type: {
1110
+ name: "Composite",
1111
+ className: "GitHubConnector",
1112
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { properties: {
1113
+ serializedName: "properties",
1114
+ type: {
1115
+ name: "Composite",
1116
+ className: "GitHubConnectorProperties"
1117
+ }
1118
+ } })
1119
+ }
1120
+ };
1121
+ const AzureDevOpsRepo = {
1122
+ type: {
1123
+ name: "Composite",
1124
+ className: "AzureDevOpsRepo",
1125
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { properties: {
1126
+ serializedName: "properties",
1127
+ type: {
1128
+ name: "Composite",
1129
+ className: "AzureDevOpsRepoProperties"
1130
+ }
1131
+ } })
1132
+ }
1133
+ };
1134
+ const AzureDevOpsConnectorStats = {
1135
+ type: {
1136
+ name: "Composite",
1137
+ className: "AzureDevOpsConnectorStats",
1138
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { properties: {
1139
+ serializedName: "properties",
1140
+ type: {
1141
+ name: "Composite",
1142
+ className: "AzureDevOpsConnectorStatsProperties"
1143
+ }
1144
+ } })
1145
+ }
1146
+ };
1147
+ const AzureDevOpsOrg = {
1148
+ type: {
1149
+ name: "Composite",
1150
+ className: "AzureDevOpsOrg",
1151
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { properties: {
1152
+ serializedName: "properties",
1153
+ type: {
1154
+ name: "Composite",
1155
+ className: "AzureDevOpsOrgProperties"
1156
+ }
1157
+ } })
1158
+ }
1159
+ };
1160
+ const AzureDevOpsProject = {
1161
+ type: {
1162
+ name: "Composite",
1163
+ className: "AzureDevOpsProject",
1164
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { properties: {
1165
+ serializedName: "properties",
1166
+ type: {
1167
+ name: "Composite",
1168
+ className: "AzureDevOpsProjectProperties"
1169
+ }
1170
+ } })
1171
+ }
1172
+ };
1173
+ const GitHubRepo = {
1174
+ type: {
1175
+ name: "Composite",
1176
+ className: "GitHubRepo",
1177
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { properties: {
1178
+ serializedName: "properties",
1179
+ type: {
1180
+ name: "Composite",
1181
+ className: "GitHubRepoProperties"
1182
+ }
1183
+ } })
1184
+ }
1185
+ };
1186
+ const GitHubConnectorStats = {
1187
+ type: {
1188
+ name: "Composite",
1189
+ className: "GitHubConnectorStats",
1190
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { properties: {
1191
+ serializedName: "properties",
1192
+ type: {
1193
+ name: "Composite",
1194
+ className: "GitHubConnectorStatsProperties"
1195
+ }
1196
+ } })
1197
+ }
1198
+ };
1199
+ const GitHubOwner = {
1200
+ type: {
1201
+ name: "Composite",
1202
+ className: "GitHubOwner",
1203
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { properties: {
1204
+ serializedName: "properties",
1205
+ type: {
1206
+ name: "Composite",
1207
+ className: "GitHubOwnerProperties"
1208
+ }
1209
+ } })
1210
+ }
1211
+ };
1212
+
1213
+ var Mappers = /*#__PURE__*/Object.freeze({
1214
+ __proto__: null,
1215
+ AzureDevOpsConnectorListResponse: AzureDevOpsConnectorListResponse,
1216
+ AzureDevOpsConnectorProperties: AzureDevOpsConnectorProperties,
1217
+ AuthorizationInfo: AuthorizationInfo,
1218
+ AzureDevOpsOrgMetadata: AzureDevOpsOrgMetadata,
1219
+ AzureDevOpsProjectMetadata: AzureDevOpsProjectMetadata,
1220
+ Resource: Resource,
1221
+ SystemData: SystemData,
1222
+ ErrorResponse: ErrorResponse,
1223
+ ErrorDetail: ErrorDetail,
1224
+ ErrorAdditionalInfo: ErrorAdditionalInfo,
1225
+ AzureDevOpsRepoListResponse: AzureDevOpsRepoListResponse,
1226
+ AzureDevOpsRepoProperties: AzureDevOpsRepoProperties,
1227
+ ActionableRemediation: ActionableRemediation,
1228
+ TargetBranchConfiguration: TargetBranchConfiguration,
1229
+ AzureDevOpsConnectorStatsListResponse: AzureDevOpsConnectorStatsListResponse,
1230
+ AzureDevOpsConnectorStatsProperties: AzureDevOpsConnectorStatsProperties,
1231
+ AzureDevOpsOrgListResponse: AzureDevOpsOrgListResponse,
1232
+ AzureDevOpsOrgProperties: AzureDevOpsOrgProperties,
1233
+ AzureDevOpsProjectListResponse: AzureDevOpsProjectListResponse,
1234
+ AzureDevOpsProjectProperties: AzureDevOpsProjectProperties,
1235
+ GitHubConnectorListResponse: GitHubConnectorListResponse,
1236
+ GitHubConnectorProperties: GitHubConnectorProperties,
1237
+ GitHubRepoListResponse: GitHubRepoListResponse,
1238
+ GitHubRepoProperties: GitHubRepoProperties,
1239
+ GitHubConnectorStatsListResponse: GitHubConnectorStatsListResponse,
1240
+ GitHubConnectorStatsProperties: GitHubConnectorStatsProperties,
1241
+ GitHubOwnerListResponse: GitHubOwnerListResponse,
1242
+ GitHubOwnerProperties: GitHubOwnerProperties,
1243
+ OperationListResult: OperationListResult,
1244
+ Operation: Operation,
1245
+ OperationDisplay: OperationDisplay,
1246
+ GitHubReposProperties: GitHubReposProperties,
1247
+ TrackedResource: TrackedResource,
1248
+ ProxyResource: ProxyResource,
1249
+ AzureDevOpsConnector: AzureDevOpsConnector,
1250
+ GitHubConnector: GitHubConnector,
1251
+ AzureDevOpsRepo: AzureDevOpsRepo,
1252
+ AzureDevOpsConnectorStats: AzureDevOpsConnectorStats,
1253
+ AzureDevOpsOrg: AzureDevOpsOrg,
1254
+ AzureDevOpsProject: AzureDevOpsProject,
1255
+ GitHubRepo: GitHubRepo,
1256
+ GitHubConnectorStats: GitHubConnectorStats,
1257
+ GitHubOwner: GitHubOwner
1258
+ });
1259
+
1260
+ /*
1261
+ * Copyright (c) Microsoft Corporation.
1262
+ * Licensed under the MIT License.
1263
+ *
1264
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1265
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1266
+ */
1267
+ const accept = {
1268
+ parameterPath: "accept",
1269
+ mapper: {
1270
+ defaultValue: "application/json",
1271
+ isConstant: true,
1272
+ serializedName: "Accept",
1273
+ type: {
1274
+ name: "String"
1275
+ }
1276
+ }
1277
+ };
1278
+ const $host = {
1279
+ parameterPath: "$host",
1280
+ mapper: {
1281
+ serializedName: "$host",
1282
+ required: true,
1283
+ type: {
1284
+ name: "String"
1285
+ }
1286
+ },
1287
+ skipEncoding: true
1288
+ };
1289
+ const subscriptionId = {
1290
+ parameterPath: "subscriptionId",
1291
+ mapper: {
1292
+ constraints: {
1293
+ MinLength: 1
1294
+ },
1295
+ serializedName: "subscriptionId",
1296
+ required: true,
1297
+ type: {
1298
+ name: "String"
1299
+ }
1300
+ }
1301
+ };
1302
+ const resourceGroupName = {
1303
+ parameterPath: "resourceGroupName",
1304
+ mapper: {
1305
+ constraints: {
1306
+ MaxLength: 90,
1307
+ MinLength: 1
1308
+ },
1309
+ serializedName: "resourceGroupName",
1310
+ required: true,
1311
+ type: {
1312
+ name: "String"
1313
+ }
1314
+ }
1315
+ };
1316
+ const apiVersion = {
1317
+ parameterPath: "apiVersion",
1318
+ mapper: {
1319
+ defaultValue: "2022-09-01-preview",
1320
+ isConstant: true,
1321
+ serializedName: "api-version",
1322
+ type: {
1323
+ name: "String"
1324
+ }
1325
+ }
1326
+ };
1327
+ const azureDevOpsConnectorName = {
1328
+ parameterPath: "azureDevOpsConnectorName",
1329
+ mapper: {
1330
+ serializedName: "azureDevOpsConnectorName",
1331
+ required: true,
1332
+ type: {
1333
+ name: "String"
1334
+ }
1335
+ }
1336
+ };
1337
+ const contentType = {
1338
+ parameterPath: ["options", "contentType"],
1339
+ mapper: {
1340
+ defaultValue: "application/json",
1341
+ isConstant: true,
1342
+ serializedName: "Content-Type",
1343
+ type: {
1344
+ name: "String"
1345
+ }
1346
+ }
1347
+ };
1348
+ const azureDevOpsConnector = {
1349
+ parameterPath: "azureDevOpsConnector",
1350
+ mapper: AzureDevOpsConnector
1351
+ };
1352
+ const azureDevOpsConnector1 = {
1353
+ parameterPath: ["options", "azureDevOpsConnector"],
1354
+ mapper: AzureDevOpsConnector
1355
+ };
1356
+ const nextLink = {
1357
+ parameterPath: "nextLink",
1358
+ mapper: {
1359
+ serializedName: "nextLink",
1360
+ required: true,
1361
+ type: {
1362
+ name: "String"
1363
+ }
1364
+ },
1365
+ skipEncoding: true
1366
+ };
1367
+ const azureDevOpsOrgName = {
1368
+ parameterPath: "azureDevOpsOrgName",
1369
+ mapper: {
1370
+ serializedName: "azureDevOpsOrgName",
1371
+ required: true,
1372
+ type: {
1373
+ name: "String"
1374
+ }
1375
+ }
1376
+ };
1377
+ const azureDevOpsProjectName = {
1378
+ parameterPath: "azureDevOpsProjectName",
1379
+ mapper: {
1380
+ serializedName: "azureDevOpsProjectName",
1381
+ required: true,
1382
+ type: {
1383
+ name: "String"
1384
+ }
1385
+ }
1386
+ };
1387
+ const azureDevOpsRepoName = {
1388
+ parameterPath: "azureDevOpsRepoName",
1389
+ mapper: {
1390
+ serializedName: "azureDevOpsRepoName",
1391
+ required: true,
1392
+ type: {
1393
+ name: "String"
1394
+ }
1395
+ }
1396
+ };
1397
+ const azureDevOpsRepo = {
1398
+ parameterPath: "azureDevOpsRepo",
1399
+ mapper: AzureDevOpsRepo
1400
+ };
1401
+ const azureDevOpsRepo1 = {
1402
+ parameterPath: ["options", "azureDevOpsRepo"],
1403
+ mapper: AzureDevOpsRepo
1404
+ };
1405
+ const azureDevOpsOrg = {
1406
+ parameterPath: "azureDevOpsOrg",
1407
+ mapper: AzureDevOpsOrg
1408
+ };
1409
+ const azureDevOpsOrg1 = {
1410
+ parameterPath: ["options", "azureDevOpsOrg"],
1411
+ mapper: AzureDevOpsOrg
1412
+ };
1413
+ const azureDevOpsProject = {
1414
+ parameterPath: "azureDevOpsProject",
1415
+ mapper: AzureDevOpsProject
1416
+ };
1417
+ const azureDevOpsProject1 = {
1418
+ parameterPath: ["options", "azureDevOpsProject"],
1419
+ mapper: AzureDevOpsProject
1420
+ };
1421
+ const gitHubConnectorName = {
1422
+ parameterPath: "gitHubConnectorName",
1423
+ mapper: {
1424
+ serializedName: "gitHubConnectorName",
1425
+ required: true,
1426
+ type: {
1427
+ name: "String"
1428
+ }
1429
+ }
1430
+ };
1431
+ const gitHubConnector = {
1432
+ parameterPath: "gitHubConnector",
1433
+ mapper: GitHubConnector
1434
+ };
1435
+ const gitHubConnector1 = {
1436
+ parameterPath: ["options", "gitHubConnector"],
1437
+ mapper: GitHubConnector
1438
+ };
1439
+ const gitHubOwnerName = {
1440
+ parameterPath: "gitHubOwnerName",
1441
+ mapper: {
1442
+ serializedName: "gitHubOwnerName",
1443
+ required: true,
1444
+ type: {
1445
+ name: "String"
1446
+ }
1447
+ }
1448
+ };
1449
+ const gitHubRepoName = {
1450
+ parameterPath: "gitHubRepoName",
1451
+ mapper: {
1452
+ serializedName: "gitHubRepoName",
1453
+ required: true,
1454
+ type: {
1455
+ name: "String"
1456
+ }
1457
+ }
1458
+ };
1459
+ const gitHubRepo = {
1460
+ parameterPath: "gitHubRepo",
1461
+ mapper: GitHubRepo
1462
+ };
1463
+ const gitHubRepo1 = {
1464
+ parameterPath: ["options", "gitHubRepo"],
1465
+ mapper: GitHubRepo
1466
+ };
1467
+ const gitHubOwner = {
1468
+ parameterPath: "gitHubOwner",
1469
+ mapper: GitHubOwner
1470
+ };
1471
+ const gitHubOwner1 = {
1472
+ parameterPath: ["options", "gitHubOwner"],
1473
+ mapper: GitHubOwner
1474
+ };
1475
+
1476
+ /*
1477
+ * Copyright (c) Microsoft Corporation.
1478
+ * Licensed under the MIT License.
1479
+ *
1480
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1481
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1482
+ */
1483
+ class LroImpl {
1484
+ constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
1485
+ this.sendOperationFn = sendOperationFn;
1486
+ this.args = args;
1487
+ this.spec = spec;
1488
+ this.requestPath = requestPath;
1489
+ this.requestMethod = requestMethod;
1490
+ }
1491
+ sendInitialRequest() {
1492
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1493
+ return this.sendOperationFn(this.args, this.spec);
1494
+ });
1495
+ }
1496
+ sendPollRequest(path) {
1497
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1498
+ const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
1499
+ return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
1500
+ });
1501
+ }
1502
+ }
1503
+
1504
+ /*
1505
+ * Copyright (c) Microsoft Corporation.
1506
+ * Licensed under the MIT License.
1507
+ *
1508
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1509
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1510
+ */
1511
+ /// <reference lib="esnext.asynciterable" />
1512
+ /** Class containing AzureDevOpsConnectorOperations operations. */
1513
+ class AzureDevOpsConnectorOperationsImpl {
1514
+ /**
1515
+ * Initialize a new instance of the class AzureDevOpsConnectorOperations class.
1516
+ * @param client Reference to the service client
1517
+ */
1518
+ constructor(client) {
1519
+ this.client = client;
1520
+ }
1521
+ /**
1522
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1523
+ * @param options The options parameters.
1524
+ */
1525
+ listByResourceGroup(resourceGroupName, options) {
1526
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
1527
+ return {
1528
+ next() {
1529
+ return iter.next();
1530
+ },
1531
+ [Symbol.asyncIterator]() {
1532
+ return this;
1533
+ },
1534
+ byPage: () => {
1535
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
1536
+ }
1537
+ };
1538
+ }
1539
+ listByResourceGroupPagingPage(resourceGroupName, options) {
1540
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
1541
+ let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
1542
+ yield yield tslib.__await(result.value || []);
1543
+ let continuationToken = result.nextLink;
1544
+ while (continuationToken) {
1545
+ result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
1546
+ continuationToken = result.nextLink;
1547
+ yield yield tslib.__await(result.value || []);
1548
+ }
1549
+ });
1550
+ }
1551
+ listByResourceGroupPagingAll(resourceGroupName, options) {
1552
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
1553
+ var e_1, _a;
1554
+ try {
1555
+ for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1556
+ const page = _c.value;
1557
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1558
+ }
1559
+ }
1560
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1561
+ finally {
1562
+ try {
1563
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1564
+ }
1565
+ finally { if (e_1) throw e_1.error; }
1566
+ }
1567
+ });
1568
+ }
1569
+ /**
1570
+ * Returns a list of monitored AzureDevOps Connectors.
1571
+ * @param options The options parameters.
1572
+ */
1573
+ listBySubscription(options) {
1574
+ const iter = this.listBySubscriptionPagingAll(options);
1575
+ return {
1576
+ next() {
1577
+ return iter.next();
1578
+ },
1579
+ [Symbol.asyncIterator]() {
1580
+ return this;
1581
+ },
1582
+ byPage: () => {
1583
+ return this.listBySubscriptionPagingPage(options);
1584
+ }
1585
+ };
1586
+ }
1587
+ listBySubscriptionPagingPage(options) {
1588
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
1589
+ let result = yield tslib.__await(this._listBySubscription(options));
1590
+ yield yield tslib.__await(result.value || []);
1591
+ let continuationToken = result.nextLink;
1592
+ while (continuationToken) {
1593
+ result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
1594
+ continuationToken = result.nextLink;
1595
+ yield yield tslib.__await(result.value || []);
1596
+ }
1597
+ });
1598
+ }
1599
+ listBySubscriptionPagingAll(options) {
1600
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
1601
+ var e_2, _a;
1602
+ try {
1603
+ for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1604
+ const page = _c.value;
1605
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1606
+ }
1607
+ }
1608
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
1609
+ finally {
1610
+ try {
1611
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1612
+ }
1613
+ finally { if (e_2) throw e_2.error; }
1614
+ }
1615
+ });
1616
+ }
1617
+ /**
1618
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1619
+ * @param options The options parameters.
1620
+ */
1621
+ _listByResourceGroup(resourceGroupName, options) {
1622
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$1);
1623
+ }
1624
+ /**
1625
+ * Returns a monitored AzureDevOps Connector resource for a given ID.
1626
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1627
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
1628
+ * @param options The options parameters.
1629
+ */
1630
+ get(resourceGroupName, azureDevOpsConnectorName, options) {
1631
+ return this.client.sendOperationRequest({ resourceGroupName, azureDevOpsConnectorName, options }, getOperationSpec$8);
1632
+ }
1633
+ /**
1634
+ * Creates or updates an Azure DevOps Connector.
1635
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1636
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
1637
+ * @param azureDevOpsConnector Connector resource payload.
1638
+ * @param options The options parameters.
1639
+ */
1640
+ beginCreateOrUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsConnector, options) {
1641
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1642
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1643
+ return this.client.sendOperationRequest(args, spec);
1644
+ });
1645
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1646
+ var _a;
1647
+ let currentRawResponse = undefined;
1648
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1649
+ const callback = (rawResponse, flatResponse) => {
1650
+ currentRawResponse = rawResponse;
1651
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1652
+ };
1653
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1654
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1655
+ return {
1656
+ flatResponse,
1657
+ rawResponse: {
1658
+ statusCode: currentRawResponse.status,
1659
+ body: currentRawResponse.parsedBody,
1660
+ headers: currentRawResponse.headers.toJSON()
1661
+ }
1662
+ };
1663
+ });
1664
+ const lro = new LroImpl(sendOperation, {
1665
+ resourceGroupName,
1666
+ azureDevOpsConnectorName,
1667
+ azureDevOpsConnector,
1668
+ options
1669
+ }, createOrUpdateOperationSpec$6);
1670
+ const poller = new coreLro.LroEngine(lro, {
1671
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1672
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1673
+ lroResourceLocationConfig: "azure-async-operation"
1674
+ });
1675
+ yield poller.poll();
1676
+ return poller;
1677
+ });
1678
+ }
1679
+ /**
1680
+ * Creates or updates an Azure DevOps Connector.
1681
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1682
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
1683
+ * @param azureDevOpsConnector Connector resource payload.
1684
+ * @param options The options parameters.
1685
+ */
1686
+ beginCreateOrUpdateAndWait(resourceGroupName, azureDevOpsConnectorName, azureDevOpsConnector, options) {
1687
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1688
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsConnector, options);
1689
+ return poller.pollUntilDone();
1690
+ });
1691
+ }
1692
+ /**
1693
+ * Update monitored AzureDevOps Connector details.
1694
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1695
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
1696
+ * @param options The options parameters.
1697
+ */
1698
+ beginUpdate(resourceGroupName, azureDevOpsConnectorName, options) {
1699
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1700
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1701
+ return this.client.sendOperationRequest(args, spec);
1702
+ });
1703
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1704
+ var _a;
1705
+ let currentRawResponse = undefined;
1706
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1707
+ const callback = (rawResponse, flatResponse) => {
1708
+ currentRawResponse = rawResponse;
1709
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1710
+ };
1711
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1712
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1713
+ return {
1714
+ flatResponse,
1715
+ rawResponse: {
1716
+ statusCode: currentRawResponse.status,
1717
+ body: currentRawResponse.parsedBody,
1718
+ headers: currentRawResponse.headers.toJSON()
1719
+ }
1720
+ };
1721
+ });
1722
+ const lro = new LroImpl(sendOperation, { resourceGroupName, azureDevOpsConnectorName, options }, updateOperationSpec$6);
1723
+ const poller = new coreLro.LroEngine(lro, {
1724
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1725
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1726
+ });
1727
+ yield poller.poll();
1728
+ return poller;
1729
+ });
1730
+ }
1731
+ /**
1732
+ * Update monitored AzureDevOps Connector details.
1733
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1734
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
1735
+ * @param options The options parameters.
1736
+ */
1737
+ beginUpdateAndWait(resourceGroupName, azureDevOpsConnectorName, options) {
1738
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1739
+ const poller = yield this.beginUpdate(resourceGroupName, azureDevOpsConnectorName, options);
1740
+ return poller.pollUntilDone();
1741
+ });
1742
+ }
1743
+ /**
1744
+ * Delete monitored AzureDevOps Connector details.
1745
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1746
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
1747
+ * @param options The options parameters.
1748
+ */
1749
+ beginDelete(resourceGroupName, azureDevOpsConnectorName, options) {
1750
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1751
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1752
+ return this.client.sendOperationRequest(args, spec);
1753
+ });
1754
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1755
+ var _a;
1756
+ let currentRawResponse = undefined;
1757
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1758
+ const callback = (rawResponse, flatResponse) => {
1759
+ currentRawResponse = rawResponse;
1760
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1761
+ };
1762
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1763
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1764
+ return {
1765
+ flatResponse,
1766
+ rawResponse: {
1767
+ statusCode: currentRawResponse.status,
1768
+ body: currentRawResponse.parsedBody,
1769
+ headers: currentRawResponse.headers.toJSON()
1770
+ }
1771
+ };
1772
+ });
1773
+ const lro = new LroImpl(sendOperation, { resourceGroupName, azureDevOpsConnectorName, options }, deleteOperationSpec$1);
1774
+ const poller = new coreLro.LroEngine(lro, {
1775
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1776
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1777
+ });
1778
+ yield poller.poll();
1779
+ return poller;
1780
+ });
1781
+ }
1782
+ /**
1783
+ * Delete monitored AzureDevOps Connector details.
1784
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1785
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
1786
+ * @param options The options parameters.
1787
+ */
1788
+ beginDeleteAndWait(resourceGroupName, azureDevOpsConnectorName, options) {
1789
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1790
+ const poller = yield this.beginDelete(resourceGroupName, azureDevOpsConnectorName, options);
1791
+ return poller.pollUntilDone();
1792
+ });
1793
+ }
1794
+ /**
1795
+ * Returns a list of monitored AzureDevOps Connectors.
1796
+ * @param options The options parameters.
1797
+ */
1798
+ _listBySubscription(options) {
1799
+ return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec$1);
1800
+ }
1801
+ /**
1802
+ * ListByResourceGroupNext
1803
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1804
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
1805
+ * @param options The options parameters.
1806
+ */
1807
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
1808
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec$1);
1809
+ }
1810
+ /**
1811
+ * ListBySubscriptionNext
1812
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
1813
+ * @param options The options parameters.
1814
+ */
1815
+ _listBySubscriptionNext(nextLink, options) {
1816
+ return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec$1);
1817
+ }
1818
+ }
1819
+ // Operation Specifications
1820
+ const serializer$9 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1821
+ const listByResourceGroupOperationSpec$1 = {
1822
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors",
1823
+ httpMethod: "GET",
1824
+ responses: {
1825
+ 200: {
1826
+ bodyMapper: AzureDevOpsConnectorListResponse
1827
+ },
1828
+ default: {
1829
+ bodyMapper: ErrorResponse
1830
+ }
1831
+ },
1832
+ queryParameters: [apiVersion],
1833
+ urlParameters: [
1834
+ $host,
1835
+ subscriptionId,
1836
+ resourceGroupName
1837
+ ],
1838
+ headerParameters: [accept],
1839
+ serializer: serializer$9
1840
+ };
1841
+ const getOperationSpec$8 = {
1842
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}",
1843
+ httpMethod: "GET",
1844
+ responses: {
1845
+ 200: {
1846
+ bodyMapper: AzureDevOpsConnector
1847
+ },
1848
+ default: {
1849
+ bodyMapper: ErrorResponse
1850
+ }
1851
+ },
1852
+ queryParameters: [apiVersion],
1853
+ urlParameters: [
1854
+ $host,
1855
+ subscriptionId,
1856
+ resourceGroupName,
1857
+ azureDevOpsConnectorName
1858
+ ],
1859
+ headerParameters: [accept],
1860
+ serializer: serializer$9
1861
+ };
1862
+ const createOrUpdateOperationSpec$6 = {
1863
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}",
1864
+ httpMethod: "PUT",
1865
+ responses: {
1866
+ 200: {
1867
+ bodyMapper: AzureDevOpsConnector
1868
+ },
1869
+ 201: {
1870
+ bodyMapper: AzureDevOpsConnector
1871
+ },
1872
+ 202: {
1873
+ bodyMapper: AzureDevOpsConnector
1874
+ },
1875
+ 204: {
1876
+ bodyMapper: AzureDevOpsConnector
1877
+ },
1878
+ default: {
1879
+ bodyMapper: ErrorResponse
1880
+ }
1881
+ },
1882
+ requestBody: azureDevOpsConnector,
1883
+ queryParameters: [apiVersion],
1884
+ urlParameters: [
1885
+ $host,
1886
+ subscriptionId,
1887
+ resourceGroupName,
1888
+ azureDevOpsConnectorName
1889
+ ],
1890
+ headerParameters: [accept, contentType],
1891
+ mediaType: "json",
1892
+ serializer: serializer$9
1893
+ };
1894
+ const updateOperationSpec$6 = {
1895
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}",
1896
+ httpMethod: "PATCH",
1897
+ responses: {
1898
+ 200: {
1899
+ bodyMapper: AzureDevOpsConnector
1900
+ },
1901
+ 201: {
1902
+ bodyMapper: AzureDevOpsConnector
1903
+ },
1904
+ 202: {
1905
+ bodyMapper: AzureDevOpsConnector
1906
+ },
1907
+ 204: {
1908
+ bodyMapper: AzureDevOpsConnector
1909
+ },
1910
+ default: {
1911
+ bodyMapper: ErrorResponse
1912
+ }
1913
+ },
1914
+ requestBody: azureDevOpsConnector1,
1915
+ queryParameters: [apiVersion],
1916
+ urlParameters: [
1917
+ $host,
1918
+ subscriptionId,
1919
+ resourceGroupName,
1920
+ azureDevOpsConnectorName
1921
+ ],
1922
+ headerParameters: [accept, contentType],
1923
+ mediaType: "json",
1924
+ serializer: serializer$9
1925
+ };
1926
+ const deleteOperationSpec$1 = {
1927
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}",
1928
+ httpMethod: "DELETE",
1929
+ responses: {
1930
+ 200: {},
1931
+ 201: {},
1932
+ 202: {},
1933
+ 204: {},
1934
+ default: {
1935
+ bodyMapper: ErrorResponse
1936
+ }
1937
+ },
1938
+ queryParameters: [apiVersion],
1939
+ urlParameters: [
1940
+ $host,
1941
+ subscriptionId,
1942
+ resourceGroupName,
1943
+ azureDevOpsConnectorName
1944
+ ],
1945
+ headerParameters: [accept],
1946
+ serializer: serializer$9
1947
+ };
1948
+ const listBySubscriptionOperationSpec$1 = {
1949
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors",
1950
+ httpMethod: "GET",
1951
+ responses: {
1952
+ 200: {
1953
+ bodyMapper: AzureDevOpsConnectorListResponse
1954
+ },
1955
+ default: {
1956
+ bodyMapper: ErrorResponse
1957
+ }
1958
+ },
1959
+ queryParameters: [apiVersion],
1960
+ urlParameters: [$host, subscriptionId],
1961
+ headerParameters: [accept],
1962
+ serializer: serializer$9
1963
+ };
1964
+ const listByResourceGroupNextOperationSpec$1 = {
1965
+ path: "{nextLink}",
1966
+ httpMethod: "GET",
1967
+ responses: {
1968
+ 200: {
1969
+ bodyMapper: AzureDevOpsConnectorListResponse
1970
+ },
1971
+ default: {
1972
+ bodyMapper: ErrorResponse
1973
+ }
1974
+ },
1975
+ queryParameters: [apiVersion],
1976
+ urlParameters: [
1977
+ $host,
1978
+ subscriptionId,
1979
+ resourceGroupName,
1980
+ nextLink
1981
+ ],
1982
+ headerParameters: [accept],
1983
+ serializer: serializer$9
1984
+ };
1985
+ const listBySubscriptionNextOperationSpec$1 = {
1986
+ path: "{nextLink}",
1987
+ httpMethod: "GET",
1988
+ responses: {
1989
+ 200: {
1990
+ bodyMapper: AzureDevOpsConnectorListResponse
1991
+ },
1992
+ default: {
1993
+ bodyMapper: ErrorResponse
1994
+ }
1995
+ },
1996
+ queryParameters: [apiVersion],
1997
+ urlParameters: [
1998
+ $host,
1999
+ subscriptionId,
2000
+ nextLink
2001
+ ],
2002
+ headerParameters: [accept],
2003
+ serializer: serializer$9
2004
+ };
2005
+
2006
+ /*
2007
+ * Copyright (c) Microsoft Corporation.
2008
+ * Licensed under the MIT License.
2009
+ *
2010
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2011
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2012
+ */
2013
+ /// <reference lib="esnext.asynciterable" />
2014
+ /** Class containing AzureDevOpsRepoOperations operations. */
2015
+ class AzureDevOpsRepoOperationsImpl {
2016
+ /**
2017
+ * Initialize a new instance of the class AzureDevOpsRepoOperations class.
2018
+ * @param client Reference to the service client
2019
+ */
2020
+ constructor(client) {
2021
+ this.client = client;
2022
+ }
2023
+ /**
2024
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2025
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2026
+ * @param options The options parameters.
2027
+ */
2028
+ listByConnector(resourceGroupName, azureDevOpsConnectorName, options) {
2029
+ const iter = this.listByConnectorPagingAll(resourceGroupName, azureDevOpsConnectorName, options);
2030
+ return {
2031
+ next() {
2032
+ return iter.next();
2033
+ },
2034
+ [Symbol.asyncIterator]() {
2035
+ return this;
2036
+ },
2037
+ byPage: () => {
2038
+ return this.listByConnectorPagingPage(resourceGroupName, azureDevOpsConnectorName, options);
2039
+ }
2040
+ };
2041
+ }
2042
+ listByConnectorPagingPage(resourceGroupName, azureDevOpsConnectorName, options) {
2043
+ return tslib.__asyncGenerator(this, arguments, function* listByConnectorPagingPage_1() {
2044
+ let result = yield tslib.__await(this._listByConnector(resourceGroupName, azureDevOpsConnectorName, options));
2045
+ yield yield tslib.__await(result.value || []);
2046
+ let continuationToken = result.nextLink;
2047
+ while (continuationToken) {
2048
+ result = yield tslib.__await(this._listByConnectorNext(resourceGroupName, azureDevOpsConnectorName, continuationToken, options));
2049
+ continuationToken = result.nextLink;
2050
+ yield yield tslib.__await(result.value || []);
2051
+ }
2052
+ });
2053
+ }
2054
+ listByConnectorPagingAll(resourceGroupName, azureDevOpsConnectorName, options) {
2055
+ return tslib.__asyncGenerator(this, arguments, function* listByConnectorPagingAll_1() {
2056
+ var e_1, _a;
2057
+ try {
2058
+ for (var _b = tslib.__asyncValues(this.listByConnectorPagingPage(resourceGroupName, azureDevOpsConnectorName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2059
+ const page = _c.value;
2060
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2061
+ }
2062
+ }
2063
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2064
+ finally {
2065
+ try {
2066
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2067
+ }
2068
+ finally { if (e_1) throw e_1.error; }
2069
+ }
2070
+ });
2071
+ }
2072
+ /**
2073
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2074
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2075
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2076
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
2077
+ * @param options The options parameters.
2078
+ */
2079
+ list(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options) {
2080
+ const iter = this.listPagingAll(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options);
2081
+ return {
2082
+ next() {
2083
+ return iter.next();
2084
+ },
2085
+ [Symbol.asyncIterator]() {
2086
+ return this;
2087
+ },
2088
+ byPage: () => {
2089
+ return this.listPagingPage(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options);
2090
+ }
2091
+ };
2092
+ }
2093
+ listPagingPage(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options) {
2094
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2095
+ let result = yield tslib.__await(this._list(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options));
2096
+ yield yield tslib.__await(result.value || []);
2097
+ let continuationToken = result.nextLink;
2098
+ while (continuationToken) {
2099
+ result = yield tslib.__await(this._listNext(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, continuationToken, options));
2100
+ continuationToken = result.nextLink;
2101
+ yield yield tslib.__await(result.value || []);
2102
+ }
2103
+ });
2104
+ }
2105
+ listPagingAll(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options) {
2106
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
2107
+ var e_2, _a;
2108
+ try {
2109
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2110
+ const page = _c.value;
2111
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2112
+ }
2113
+ }
2114
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
2115
+ finally {
2116
+ try {
2117
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2118
+ }
2119
+ finally { if (e_2) throw e_2.error; }
2120
+ }
2121
+ });
2122
+ }
2123
+ /**
2124
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2125
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2126
+ * @param options The options parameters.
2127
+ */
2128
+ _listByConnector(resourceGroupName, azureDevOpsConnectorName, options) {
2129
+ return this.client.sendOperationRequest({ resourceGroupName, azureDevOpsConnectorName, options }, listByConnectorOperationSpec$1);
2130
+ }
2131
+ /**
2132
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2133
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2134
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2135
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
2136
+ * @param options The options parameters.
2137
+ */
2138
+ _list(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options) {
2139
+ return this.client.sendOperationRequest({
2140
+ resourceGroupName,
2141
+ azureDevOpsConnectorName,
2142
+ azureDevOpsOrgName,
2143
+ azureDevOpsProjectName,
2144
+ options
2145
+ }, listOperationSpec$5);
2146
+ }
2147
+ /**
2148
+ * Returns a monitored AzureDevOps Project resource for a given ID.
2149
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2150
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2151
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2152
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
2153
+ * @param azureDevOpsRepoName Name of the AzureDevOps Repo.
2154
+ * @param options The options parameters.
2155
+ */
2156
+ get(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, azureDevOpsRepoName, options) {
2157
+ return this.client.sendOperationRequest({
2158
+ resourceGroupName,
2159
+ azureDevOpsConnectorName,
2160
+ azureDevOpsOrgName,
2161
+ azureDevOpsProjectName,
2162
+ azureDevOpsRepoName,
2163
+ options
2164
+ }, getOperationSpec$7);
2165
+ }
2166
+ /**
2167
+ * Updates an Azure DevOps Repo.
2168
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2169
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2170
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2171
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
2172
+ * @param azureDevOpsRepoName Name of the AzureDevOps Repo.
2173
+ * @param azureDevOpsRepo Azure DevOps Repo resource payload.
2174
+ * @param options The options parameters.
2175
+ */
2176
+ beginCreateOrUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, azureDevOpsRepoName, azureDevOpsRepo, options) {
2177
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2178
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2179
+ return this.client.sendOperationRequest(args, spec);
2180
+ });
2181
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2182
+ var _a;
2183
+ let currentRawResponse = undefined;
2184
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2185
+ const callback = (rawResponse, flatResponse) => {
2186
+ currentRawResponse = rawResponse;
2187
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2188
+ };
2189
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2190
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2191
+ return {
2192
+ flatResponse,
2193
+ rawResponse: {
2194
+ statusCode: currentRawResponse.status,
2195
+ body: currentRawResponse.parsedBody,
2196
+ headers: currentRawResponse.headers.toJSON()
2197
+ }
2198
+ };
2199
+ });
2200
+ const lro = new LroImpl(sendOperation, {
2201
+ resourceGroupName,
2202
+ azureDevOpsConnectorName,
2203
+ azureDevOpsOrgName,
2204
+ azureDevOpsProjectName,
2205
+ azureDevOpsRepoName,
2206
+ azureDevOpsRepo,
2207
+ options
2208
+ }, createOrUpdateOperationSpec$5);
2209
+ const poller = new coreLro.LroEngine(lro, {
2210
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2211
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2212
+ lroResourceLocationConfig: "azure-async-operation"
2213
+ });
2214
+ yield poller.poll();
2215
+ return poller;
2216
+ });
2217
+ }
2218
+ /**
2219
+ * Updates an Azure DevOps Repo.
2220
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2221
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2222
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2223
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
2224
+ * @param azureDevOpsRepoName Name of the AzureDevOps Repo.
2225
+ * @param azureDevOpsRepo Azure DevOps Repo resource payload.
2226
+ * @param options The options parameters.
2227
+ */
2228
+ beginCreateOrUpdateAndWait(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, azureDevOpsRepoName, azureDevOpsRepo, options) {
2229
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2230
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, azureDevOpsRepoName, azureDevOpsRepo, options);
2231
+ return poller.pollUntilDone();
2232
+ });
2233
+ }
2234
+ /**
2235
+ * Update monitored AzureDevOps Project details.
2236
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2237
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2238
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2239
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
2240
+ * @param azureDevOpsRepoName Name of the AzureDevOps Repo.
2241
+ * @param options The options parameters.
2242
+ */
2243
+ beginUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, azureDevOpsRepoName, options) {
2244
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2245
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2246
+ return this.client.sendOperationRequest(args, spec);
2247
+ });
2248
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2249
+ var _a;
2250
+ let currentRawResponse = undefined;
2251
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2252
+ const callback = (rawResponse, flatResponse) => {
2253
+ currentRawResponse = rawResponse;
2254
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2255
+ };
2256
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2257
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2258
+ return {
2259
+ flatResponse,
2260
+ rawResponse: {
2261
+ statusCode: currentRawResponse.status,
2262
+ body: currentRawResponse.parsedBody,
2263
+ headers: currentRawResponse.headers.toJSON()
2264
+ }
2265
+ };
2266
+ });
2267
+ const lro = new LroImpl(sendOperation, {
2268
+ resourceGroupName,
2269
+ azureDevOpsConnectorName,
2270
+ azureDevOpsOrgName,
2271
+ azureDevOpsProjectName,
2272
+ azureDevOpsRepoName,
2273
+ options
2274
+ }, updateOperationSpec$5);
2275
+ const poller = new coreLro.LroEngine(lro, {
2276
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2277
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2278
+ });
2279
+ yield poller.poll();
2280
+ return poller;
2281
+ });
2282
+ }
2283
+ /**
2284
+ * Update monitored AzureDevOps Project details.
2285
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2286
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2287
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2288
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
2289
+ * @param azureDevOpsRepoName Name of the AzureDevOps Repo.
2290
+ * @param options The options parameters.
2291
+ */
2292
+ beginUpdateAndWait(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, azureDevOpsRepoName, options) {
2293
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2294
+ const poller = yield this.beginUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, azureDevOpsRepoName, options);
2295
+ return poller.pollUntilDone();
2296
+ });
2297
+ }
2298
+ /**
2299
+ * ListByConnectorNext
2300
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2301
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2302
+ * @param nextLink The nextLink from the previous successful call to the ListByConnector method.
2303
+ * @param options The options parameters.
2304
+ */
2305
+ _listByConnectorNext(resourceGroupName, azureDevOpsConnectorName, nextLink, options) {
2306
+ return this.client.sendOperationRequest({ resourceGroupName, azureDevOpsConnectorName, nextLink, options }, listByConnectorNextOperationSpec$1);
2307
+ }
2308
+ /**
2309
+ * ListNext
2310
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2311
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2312
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2313
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
2314
+ * @param nextLink The nextLink from the previous successful call to the List method.
2315
+ * @param options The options parameters.
2316
+ */
2317
+ _listNext(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, nextLink, options) {
2318
+ return this.client.sendOperationRequest({
2319
+ resourceGroupName,
2320
+ azureDevOpsConnectorName,
2321
+ azureDevOpsOrgName,
2322
+ azureDevOpsProjectName,
2323
+ nextLink,
2324
+ options
2325
+ }, listNextOperationSpec$5);
2326
+ }
2327
+ }
2328
+ // Operation Specifications
2329
+ const serializer$8 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2330
+ const listByConnectorOperationSpec$1 = {
2331
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/repos",
2332
+ httpMethod: "GET",
2333
+ responses: {
2334
+ 200: {
2335
+ bodyMapper: AzureDevOpsRepoListResponse
2336
+ },
2337
+ default: {
2338
+ bodyMapper: ErrorResponse
2339
+ }
2340
+ },
2341
+ queryParameters: [apiVersion],
2342
+ urlParameters: [
2343
+ $host,
2344
+ subscriptionId,
2345
+ resourceGroupName,
2346
+ azureDevOpsConnectorName
2347
+ ],
2348
+ headerParameters: [accept],
2349
+ serializer: serializer$8
2350
+ };
2351
+ const listOperationSpec$5 = {
2352
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs/{azureDevOpsOrgName}/projects/{azureDevOpsProjectName}/repos",
2353
+ httpMethod: "GET",
2354
+ responses: {
2355
+ 200: {
2356
+ bodyMapper: AzureDevOpsRepoListResponse
2357
+ },
2358
+ default: {
2359
+ bodyMapper: ErrorResponse
2360
+ }
2361
+ },
2362
+ queryParameters: [apiVersion],
2363
+ urlParameters: [
2364
+ $host,
2365
+ subscriptionId,
2366
+ resourceGroupName,
2367
+ azureDevOpsConnectorName,
2368
+ azureDevOpsOrgName,
2369
+ azureDevOpsProjectName
2370
+ ],
2371
+ headerParameters: [accept],
2372
+ serializer: serializer$8
2373
+ };
2374
+ const getOperationSpec$7 = {
2375
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs/{azureDevOpsOrgName}/projects/{azureDevOpsProjectName}/repos/{azureDevOpsRepoName}",
2376
+ httpMethod: "GET",
2377
+ responses: {
2378
+ 200: {
2379
+ bodyMapper: AzureDevOpsRepo
2380
+ },
2381
+ default: {
2382
+ bodyMapper: ErrorResponse
2383
+ }
2384
+ },
2385
+ queryParameters: [apiVersion],
2386
+ urlParameters: [
2387
+ $host,
2388
+ subscriptionId,
2389
+ resourceGroupName,
2390
+ azureDevOpsConnectorName,
2391
+ azureDevOpsOrgName,
2392
+ azureDevOpsProjectName,
2393
+ azureDevOpsRepoName
2394
+ ],
2395
+ headerParameters: [accept],
2396
+ serializer: serializer$8
2397
+ };
2398
+ const createOrUpdateOperationSpec$5 = {
2399
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs/{azureDevOpsOrgName}/projects/{azureDevOpsProjectName}/repos/{azureDevOpsRepoName}",
2400
+ httpMethod: "PUT",
2401
+ responses: {
2402
+ 200: {
2403
+ bodyMapper: AzureDevOpsRepo
2404
+ },
2405
+ 201: {
2406
+ bodyMapper: AzureDevOpsRepo
2407
+ },
2408
+ 202: {
2409
+ bodyMapper: AzureDevOpsRepo
2410
+ },
2411
+ 204: {
2412
+ bodyMapper: AzureDevOpsRepo
2413
+ },
2414
+ default: {
2415
+ bodyMapper: ErrorResponse
2416
+ }
2417
+ },
2418
+ requestBody: azureDevOpsRepo,
2419
+ queryParameters: [apiVersion],
2420
+ urlParameters: [
2421
+ $host,
2422
+ subscriptionId,
2423
+ resourceGroupName,
2424
+ azureDevOpsConnectorName,
2425
+ azureDevOpsOrgName,
2426
+ azureDevOpsProjectName,
2427
+ azureDevOpsRepoName
2428
+ ],
2429
+ headerParameters: [accept, contentType],
2430
+ mediaType: "json",
2431
+ serializer: serializer$8
2432
+ };
2433
+ const updateOperationSpec$5 = {
2434
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs/{azureDevOpsOrgName}/projects/{azureDevOpsProjectName}/repos/{azureDevOpsRepoName}",
2435
+ httpMethod: "PATCH",
2436
+ responses: {
2437
+ 200: {
2438
+ bodyMapper: AzureDevOpsRepo
2439
+ },
2440
+ 201: {
2441
+ bodyMapper: AzureDevOpsRepo
2442
+ },
2443
+ 202: {
2444
+ bodyMapper: AzureDevOpsRepo
2445
+ },
2446
+ 204: {
2447
+ bodyMapper: AzureDevOpsRepo
2448
+ },
2449
+ default: {
2450
+ bodyMapper: ErrorResponse
2451
+ }
2452
+ },
2453
+ requestBody: azureDevOpsRepo1,
2454
+ queryParameters: [apiVersion],
2455
+ urlParameters: [
2456
+ $host,
2457
+ subscriptionId,
2458
+ resourceGroupName,
2459
+ azureDevOpsConnectorName,
2460
+ azureDevOpsOrgName,
2461
+ azureDevOpsProjectName,
2462
+ azureDevOpsRepoName
2463
+ ],
2464
+ headerParameters: [accept, contentType],
2465
+ mediaType: "json",
2466
+ serializer: serializer$8
2467
+ };
2468
+ const listByConnectorNextOperationSpec$1 = {
2469
+ path: "{nextLink}",
2470
+ httpMethod: "GET",
2471
+ responses: {
2472
+ 200: {
2473
+ bodyMapper: AzureDevOpsRepoListResponse
2474
+ },
2475
+ default: {
2476
+ bodyMapper: ErrorResponse
2477
+ }
2478
+ },
2479
+ queryParameters: [apiVersion],
2480
+ urlParameters: [
2481
+ $host,
2482
+ subscriptionId,
2483
+ resourceGroupName,
2484
+ azureDevOpsConnectorName,
2485
+ nextLink
2486
+ ],
2487
+ headerParameters: [accept],
2488
+ serializer: serializer$8
2489
+ };
2490
+ const listNextOperationSpec$5 = {
2491
+ path: "{nextLink}",
2492
+ httpMethod: "GET",
2493
+ responses: {
2494
+ 200: {
2495
+ bodyMapper: AzureDevOpsRepoListResponse
2496
+ },
2497
+ default: {
2498
+ bodyMapper: ErrorResponse
2499
+ }
2500
+ },
2501
+ queryParameters: [apiVersion],
2502
+ urlParameters: [
2503
+ $host,
2504
+ subscriptionId,
2505
+ resourceGroupName,
2506
+ azureDevOpsConnectorName,
2507
+ nextLink,
2508
+ azureDevOpsOrgName,
2509
+ azureDevOpsProjectName
2510
+ ],
2511
+ headerParameters: [accept],
2512
+ serializer: serializer$8
2513
+ };
2514
+
2515
+ /*
2516
+ * Copyright (c) Microsoft Corporation.
2517
+ * Licensed under the MIT License.
2518
+ *
2519
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2520
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2521
+ */
2522
+ /** Class containing AzureDevOpsConnectorStatsOperations operations. */
2523
+ class AzureDevOpsConnectorStatsOperationsImpl {
2524
+ /**
2525
+ * Initialize a new instance of the class AzureDevOpsConnectorStatsOperations class.
2526
+ * @param client Reference to the service client
2527
+ */
2528
+ constructor(client) {
2529
+ this.client = client;
2530
+ }
2531
+ /**
2532
+ * Returns the summary of the AzureDevOps Connector Stats.
2533
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2534
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2535
+ * @param options The options parameters.
2536
+ */
2537
+ get(resourceGroupName, azureDevOpsConnectorName, options) {
2538
+ return this.client.sendOperationRequest({ resourceGroupName, azureDevOpsConnectorName, options }, getOperationSpec$6);
2539
+ }
2540
+ }
2541
+ // Operation Specifications
2542
+ const serializer$7 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2543
+ const getOperationSpec$6 = {
2544
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/stats",
2545
+ httpMethod: "GET",
2546
+ responses: {
2547
+ 200: {
2548
+ bodyMapper: AzureDevOpsConnectorStatsListResponse
2549
+ },
2550
+ default: {
2551
+ bodyMapper: ErrorResponse
2552
+ }
2553
+ },
2554
+ queryParameters: [apiVersion],
2555
+ urlParameters: [
2556
+ $host,
2557
+ subscriptionId,
2558
+ resourceGroupName,
2559
+ azureDevOpsConnectorName
2560
+ ],
2561
+ headerParameters: [accept],
2562
+ serializer: serializer$7
2563
+ };
2564
+
2565
+ /*
2566
+ * Copyright (c) Microsoft Corporation.
2567
+ * Licensed under the MIT License.
2568
+ *
2569
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2570
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2571
+ */
2572
+ /// <reference lib="esnext.asynciterable" />
2573
+ /** Class containing AzureDevOpsOrgOperations operations. */
2574
+ class AzureDevOpsOrgOperationsImpl {
2575
+ /**
2576
+ * Initialize a new instance of the class AzureDevOpsOrgOperations class.
2577
+ * @param client Reference to the service client
2578
+ */
2579
+ constructor(client) {
2580
+ this.client = client;
2581
+ }
2582
+ /**
2583
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2584
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2585
+ * @param options The options parameters.
2586
+ */
2587
+ list(resourceGroupName, azureDevOpsConnectorName, options) {
2588
+ const iter = this.listPagingAll(resourceGroupName, azureDevOpsConnectorName, options);
2589
+ return {
2590
+ next() {
2591
+ return iter.next();
2592
+ },
2593
+ [Symbol.asyncIterator]() {
2594
+ return this;
2595
+ },
2596
+ byPage: () => {
2597
+ return this.listPagingPage(resourceGroupName, azureDevOpsConnectorName, options);
2598
+ }
2599
+ };
2600
+ }
2601
+ listPagingPage(resourceGroupName, azureDevOpsConnectorName, options) {
2602
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2603
+ let result = yield tslib.__await(this._list(resourceGroupName, azureDevOpsConnectorName, options));
2604
+ yield yield tslib.__await(result.value || []);
2605
+ let continuationToken = result.nextLink;
2606
+ while (continuationToken) {
2607
+ result = yield tslib.__await(this._listNext(resourceGroupName, azureDevOpsConnectorName, continuationToken, options));
2608
+ continuationToken = result.nextLink;
2609
+ yield yield tslib.__await(result.value || []);
2610
+ }
2611
+ });
2612
+ }
2613
+ listPagingAll(resourceGroupName, azureDevOpsConnectorName, options) {
2614
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
2615
+ var e_1, _a;
2616
+ try {
2617
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, azureDevOpsConnectorName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2618
+ const page = _c.value;
2619
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2620
+ }
2621
+ }
2622
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2623
+ finally {
2624
+ try {
2625
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2626
+ }
2627
+ finally { if (e_1) throw e_1.error; }
2628
+ }
2629
+ });
2630
+ }
2631
+ /**
2632
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2633
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2634
+ * @param options The options parameters.
2635
+ */
2636
+ _list(resourceGroupName, azureDevOpsConnectorName, options) {
2637
+ return this.client.sendOperationRequest({ resourceGroupName, azureDevOpsConnectorName, options }, listOperationSpec$4);
2638
+ }
2639
+ /**
2640
+ * Returns a monitored AzureDevOps Org resource for a given ID.
2641
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2642
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2643
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2644
+ * @param options The options parameters.
2645
+ */
2646
+ get(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options) {
2647
+ return this.client.sendOperationRequest({
2648
+ resourceGroupName,
2649
+ azureDevOpsConnectorName,
2650
+ azureDevOpsOrgName,
2651
+ options
2652
+ }, getOperationSpec$5);
2653
+ }
2654
+ /**
2655
+ * Creates or updates an Azure DevOps Org.
2656
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2657
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2658
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2659
+ * @param azureDevOpsOrg Azure DevOps Org resource payload.
2660
+ * @param options The options parameters.
2661
+ */
2662
+ beginCreateOrUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsOrg, options) {
2663
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2664
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2665
+ return this.client.sendOperationRequest(args, spec);
2666
+ });
2667
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2668
+ var _a;
2669
+ let currentRawResponse = undefined;
2670
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2671
+ const callback = (rawResponse, flatResponse) => {
2672
+ currentRawResponse = rawResponse;
2673
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2674
+ };
2675
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2676
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2677
+ return {
2678
+ flatResponse,
2679
+ rawResponse: {
2680
+ statusCode: currentRawResponse.status,
2681
+ body: currentRawResponse.parsedBody,
2682
+ headers: currentRawResponse.headers.toJSON()
2683
+ }
2684
+ };
2685
+ });
2686
+ const lro = new LroImpl(sendOperation, {
2687
+ resourceGroupName,
2688
+ azureDevOpsConnectorName,
2689
+ azureDevOpsOrgName,
2690
+ azureDevOpsOrg,
2691
+ options
2692
+ }, createOrUpdateOperationSpec$4);
2693
+ const poller = new coreLro.LroEngine(lro, {
2694
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2695
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2696
+ lroResourceLocationConfig: "azure-async-operation"
2697
+ });
2698
+ yield poller.poll();
2699
+ return poller;
2700
+ });
2701
+ }
2702
+ /**
2703
+ * Creates or updates an Azure DevOps Org.
2704
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2705
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2706
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2707
+ * @param azureDevOpsOrg Azure DevOps Org resource payload.
2708
+ * @param options The options parameters.
2709
+ */
2710
+ beginCreateOrUpdateAndWait(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsOrg, options) {
2711
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2712
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsOrg, options);
2713
+ return poller.pollUntilDone();
2714
+ });
2715
+ }
2716
+ /**
2717
+ * Update monitored AzureDevOps Org details.
2718
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2719
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2720
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2721
+ * @param options The options parameters.
2722
+ */
2723
+ beginUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options) {
2724
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2725
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2726
+ return this.client.sendOperationRequest(args, spec);
2727
+ });
2728
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2729
+ var _a;
2730
+ let currentRawResponse = undefined;
2731
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2732
+ const callback = (rawResponse, flatResponse) => {
2733
+ currentRawResponse = rawResponse;
2734
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2735
+ };
2736
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2737
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2738
+ return {
2739
+ flatResponse,
2740
+ rawResponse: {
2741
+ statusCode: currentRawResponse.status,
2742
+ body: currentRawResponse.parsedBody,
2743
+ headers: currentRawResponse.headers.toJSON()
2744
+ }
2745
+ };
2746
+ });
2747
+ const lro = new LroImpl(sendOperation, {
2748
+ resourceGroupName,
2749
+ azureDevOpsConnectorName,
2750
+ azureDevOpsOrgName,
2751
+ options
2752
+ }, updateOperationSpec$4);
2753
+ const poller = new coreLro.LroEngine(lro, {
2754
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2755
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2756
+ });
2757
+ yield poller.poll();
2758
+ return poller;
2759
+ });
2760
+ }
2761
+ /**
2762
+ * Update monitored AzureDevOps Org details.
2763
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2764
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2765
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2766
+ * @param options The options parameters.
2767
+ */
2768
+ beginUpdateAndWait(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options) {
2769
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2770
+ const poller = yield this.beginUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options);
2771
+ return poller.pollUntilDone();
2772
+ });
2773
+ }
2774
+ /**
2775
+ * ListNext
2776
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2777
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2778
+ * @param nextLink The nextLink from the previous successful call to the List method.
2779
+ * @param options The options parameters.
2780
+ */
2781
+ _listNext(resourceGroupName, azureDevOpsConnectorName, nextLink, options) {
2782
+ return this.client.sendOperationRequest({ resourceGroupName, azureDevOpsConnectorName, nextLink, options }, listNextOperationSpec$4);
2783
+ }
2784
+ }
2785
+ // Operation Specifications
2786
+ const serializer$6 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2787
+ const listOperationSpec$4 = {
2788
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs",
2789
+ httpMethod: "GET",
2790
+ responses: {
2791
+ 200: {
2792
+ bodyMapper: AzureDevOpsOrgListResponse
2793
+ },
2794
+ default: {
2795
+ bodyMapper: ErrorResponse
2796
+ }
2797
+ },
2798
+ queryParameters: [apiVersion],
2799
+ urlParameters: [
2800
+ $host,
2801
+ subscriptionId,
2802
+ resourceGroupName,
2803
+ azureDevOpsConnectorName
2804
+ ],
2805
+ headerParameters: [accept],
2806
+ serializer: serializer$6
2807
+ };
2808
+ const getOperationSpec$5 = {
2809
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs/{azureDevOpsOrgName}",
2810
+ httpMethod: "GET",
2811
+ responses: {
2812
+ 200: {
2813
+ bodyMapper: AzureDevOpsOrg
2814
+ },
2815
+ default: {
2816
+ bodyMapper: ErrorResponse
2817
+ }
2818
+ },
2819
+ queryParameters: [apiVersion],
2820
+ urlParameters: [
2821
+ $host,
2822
+ subscriptionId,
2823
+ resourceGroupName,
2824
+ azureDevOpsConnectorName,
2825
+ azureDevOpsOrgName
2826
+ ],
2827
+ headerParameters: [accept],
2828
+ serializer: serializer$6
2829
+ };
2830
+ const createOrUpdateOperationSpec$4 = {
2831
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs/{azureDevOpsOrgName}",
2832
+ httpMethod: "PUT",
2833
+ responses: {
2834
+ 200: {
2835
+ bodyMapper: AzureDevOpsOrg
2836
+ },
2837
+ 201: {
2838
+ bodyMapper: AzureDevOpsOrg
2839
+ },
2840
+ 202: {
2841
+ bodyMapper: AzureDevOpsOrg
2842
+ },
2843
+ 204: {
2844
+ bodyMapper: AzureDevOpsOrg
2845
+ },
2846
+ default: {
2847
+ bodyMapper: ErrorResponse
2848
+ }
2849
+ },
2850
+ requestBody: azureDevOpsOrg,
2851
+ queryParameters: [apiVersion],
2852
+ urlParameters: [
2853
+ $host,
2854
+ subscriptionId,
2855
+ resourceGroupName,
2856
+ azureDevOpsConnectorName,
2857
+ azureDevOpsOrgName
2858
+ ],
2859
+ headerParameters: [accept, contentType],
2860
+ mediaType: "json",
2861
+ serializer: serializer$6
2862
+ };
2863
+ const updateOperationSpec$4 = {
2864
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs/{azureDevOpsOrgName}",
2865
+ httpMethod: "PATCH",
2866
+ responses: {
2867
+ 200: {
2868
+ bodyMapper: AzureDevOpsOrg
2869
+ },
2870
+ 201: {
2871
+ bodyMapper: AzureDevOpsOrg
2872
+ },
2873
+ 202: {
2874
+ bodyMapper: AzureDevOpsOrg
2875
+ },
2876
+ 204: {
2877
+ bodyMapper: AzureDevOpsOrg
2878
+ },
2879
+ default: {
2880
+ bodyMapper: ErrorResponse
2881
+ }
2882
+ },
2883
+ requestBody: azureDevOpsOrg1,
2884
+ queryParameters: [apiVersion],
2885
+ urlParameters: [
2886
+ $host,
2887
+ subscriptionId,
2888
+ resourceGroupName,
2889
+ azureDevOpsConnectorName,
2890
+ azureDevOpsOrgName
2891
+ ],
2892
+ headerParameters: [accept, contentType],
2893
+ mediaType: "json",
2894
+ serializer: serializer$6
2895
+ };
2896
+ const listNextOperationSpec$4 = {
2897
+ path: "{nextLink}",
2898
+ httpMethod: "GET",
2899
+ responses: {
2900
+ 200: {
2901
+ bodyMapper: AzureDevOpsOrgListResponse
2902
+ },
2903
+ default: {
2904
+ bodyMapper: ErrorResponse
2905
+ }
2906
+ },
2907
+ queryParameters: [apiVersion],
2908
+ urlParameters: [
2909
+ $host,
2910
+ subscriptionId,
2911
+ resourceGroupName,
2912
+ azureDevOpsConnectorName,
2913
+ nextLink
2914
+ ],
2915
+ headerParameters: [accept],
2916
+ serializer: serializer$6
2917
+ };
2918
+
2919
+ /*
2920
+ * Copyright (c) Microsoft Corporation.
2921
+ * Licensed under the MIT License.
2922
+ *
2923
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2924
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2925
+ */
2926
+ /// <reference lib="esnext.asynciterable" />
2927
+ /** Class containing AzureDevOpsProjectOperations operations. */
2928
+ class AzureDevOpsProjectOperationsImpl {
2929
+ /**
2930
+ * Initialize a new instance of the class AzureDevOpsProjectOperations class.
2931
+ * @param client Reference to the service client
2932
+ */
2933
+ constructor(client) {
2934
+ this.client = client;
2935
+ }
2936
+ /**
2937
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2938
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2939
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2940
+ * @param options The options parameters.
2941
+ */
2942
+ list(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options) {
2943
+ const iter = this.listPagingAll(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options);
2944
+ return {
2945
+ next() {
2946
+ return iter.next();
2947
+ },
2948
+ [Symbol.asyncIterator]() {
2949
+ return this;
2950
+ },
2951
+ byPage: () => {
2952
+ return this.listPagingPage(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options);
2953
+ }
2954
+ };
2955
+ }
2956
+ listPagingPage(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options) {
2957
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2958
+ let result = yield tslib.__await(this._list(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options));
2959
+ yield yield tslib.__await(result.value || []);
2960
+ let continuationToken = result.nextLink;
2961
+ while (continuationToken) {
2962
+ result = yield tslib.__await(this._listNext(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, continuationToken, options));
2963
+ continuationToken = result.nextLink;
2964
+ yield yield tslib.__await(result.value || []);
2965
+ }
2966
+ });
2967
+ }
2968
+ listPagingAll(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options) {
2969
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
2970
+ var e_1, _a;
2971
+ try {
2972
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2973
+ const page = _c.value;
2974
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2975
+ }
2976
+ }
2977
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2978
+ finally {
2979
+ try {
2980
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2981
+ }
2982
+ finally { if (e_1) throw e_1.error; }
2983
+ }
2984
+ });
2985
+ }
2986
+ /**
2987
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2988
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
2989
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
2990
+ * @param options The options parameters.
2991
+ */
2992
+ _list(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, options) {
2993
+ return this.client.sendOperationRequest({
2994
+ resourceGroupName,
2995
+ azureDevOpsConnectorName,
2996
+ azureDevOpsOrgName,
2997
+ options
2998
+ }, listOperationSpec$3);
2999
+ }
3000
+ /**
3001
+ * Returns a monitored AzureDevOps Project resource for a given ID.
3002
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3003
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
3004
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
3005
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
3006
+ * @param options The options parameters.
3007
+ */
3008
+ get(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options) {
3009
+ return this.client.sendOperationRequest({
3010
+ resourceGroupName,
3011
+ azureDevOpsConnectorName,
3012
+ azureDevOpsOrgName,
3013
+ azureDevOpsProjectName,
3014
+ options
3015
+ }, getOperationSpec$4);
3016
+ }
3017
+ /**
3018
+ * Creates or updates an Azure DevOps Project.
3019
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3020
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
3021
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
3022
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
3023
+ * @param azureDevOpsProject Azure DevOps Org resource payload.
3024
+ * @param options The options parameters.
3025
+ */
3026
+ beginCreateOrUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, azureDevOpsProject, options) {
3027
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3028
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3029
+ return this.client.sendOperationRequest(args, spec);
3030
+ });
3031
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3032
+ var _a;
3033
+ let currentRawResponse = undefined;
3034
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3035
+ const callback = (rawResponse, flatResponse) => {
3036
+ currentRawResponse = rawResponse;
3037
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3038
+ };
3039
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3040
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3041
+ return {
3042
+ flatResponse,
3043
+ rawResponse: {
3044
+ statusCode: currentRawResponse.status,
3045
+ body: currentRawResponse.parsedBody,
3046
+ headers: currentRawResponse.headers.toJSON()
3047
+ }
3048
+ };
3049
+ });
3050
+ const lro = new LroImpl(sendOperation, {
3051
+ resourceGroupName,
3052
+ azureDevOpsConnectorName,
3053
+ azureDevOpsOrgName,
3054
+ azureDevOpsProjectName,
3055
+ azureDevOpsProject,
3056
+ options
3057
+ }, createOrUpdateOperationSpec$3);
3058
+ const poller = new coreLro.LroEngine(lro, {
3059
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3060
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3061
+ lroResourceLocationConfig: "azure-async-operation"
3062
+ });
3063
+ yield poller.poll();
3064
+ return poller;
3065
+ });
3066
+ }
3067
+ /**
3068
+ * Creates or updates an Azure DevOps Project.
3069
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3070
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
3071
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
3072
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
3073
+ * @param azureDevOpsProject Azure DevOps Org resource payload.
3074
+ * @param options The options parameters.
3075
+ */
3076
+ beginCreateOrUpdateAndWait(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, azureDevOpsProject, options) {
3077
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3078
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, azureDevOpsProject, options);
3079
+ return poller.pollUntilDone();
3080
+ });
3081
+ }
3082
+ /**
3083
+ * Update monitored AzureDevOps Project details.
3084
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3085
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
3086
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
3087
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
3088
+ * @param options The options parameters.
3089
+ */
3090
+ beginUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options) {
3091
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3092
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3093
+ return this.client.sendOperationRequest(args, spec);
3094
+ });
3095
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3096
+ var _a;
3097
+ let currentRawResponse = undefined;
3098
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3099
+ const callback = (rawResponse, flatResponse) => {
3100
+ currentRawResponse = rawResponse;
3101
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3102
+ };
3103
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3104
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3105
+ return {
3106
+ flatResponse,
3107
+ rawResponse: {
3108
+ statusCode: currentRawResponse.status,
3109
+ body: currentRawResponse.parsedBody,
3110
+ headers: currentRawResponse.headers.toJSON()
3111
+ }
3112
+ };
3113
+ });
3114
+ const lro = new LroImpl(sendOperation, {
3115
+ resourceGroupName,
3116
+ azureDevOpsConnectorName,
3117
+ azureDevOpsOrgName,
3118
+ azureDevOpsProjectName,
3119
+ options
3120
+ }, updateOperationSpec$3);
3121
+ const poller = new coreLro.LroEngine(lro, {
3122
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3123
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3124
+ });
3125
+ yield poller.poll();
3126
+ return poller;
3127
+ });
3128
+ }
3129
+ /**
3130
+ * Update monitored AzureDevOps Project details.
3131
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3132
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
3133
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
3134
+ * @param azureDevOpsProjectName Name of the AzureDevOps Project.
3135
+ * @param options The options parameters.
3136
+ */
3137
+ beginUpdateAndWait(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options) {
3138
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3139
+ const poller = yield this.beginUpdate(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, azureDevOpsProjectName, options);
3140
+ return poller.pollUntilDone();
3141
+ });
3142
+ }
3143
+ /**
3144
+ * ListNext
3145
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3146
+ * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
3147
+ * @param azureDevOpsOrgName Name of the AzureDevOps Org.
3148
+ * @param nextLink The nextLink from the previous successful call to the List method.
3149
+ * @param options The options parameters.
3150
+ */
3151
+ _listNext(resourceGroupName, azureDevOpsConnectorName, azureDevOpsOrgName, nextLink, options) {
3152
+ return this.client.sendOperationRequest({
3153
+ resourceGroupName,
3154
+ azureDevOpsConnectorName,
3155
+ azureDevOpsOrgName,
3156
+ nextLink,
3157
+ options
3158
+ }, listNextOperationSpec$3);
3159
+ }
3160
+ }
3161
+ // Operation Specifications
3162
+ const serializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3163
+ const listOperationSpec$3 = {
3164
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs/{azureDevOpsOrgName}/projects",
3165
+ httpMethod: "GET",
3166
+ responses: {
3167
+ 200: {
3168
+ bodyMapper: AzureDevOpsProjectListResponse
3169
+ },
3170
+ default: {
3171
+ bodyMapper: ErrorResponse
3172
+ }
3173
+ },
3174
+ queryParameters: [apiVersion],
3175
+ urlParameters: [
3176
+ $host,
3177
+ subscriptionId,
3178
+ resourceGroupName,
3179
+ azureDevOpsConnectorName,
3180
+ azureDevOpsOrgName
3181
+ ],
3182
+ headerParameters: [accept],
3183
+ serializer: serializer$5
3184
+ };
3185
+ const getOperationSpec$4 = {
3186
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs/{azureDevOpsOrgName}/projects/{azureDevOpsProjectName}",
3187
+ httpMethod: "GET",
3188
+ responses: {
3189
+ 200: {
3190
+ bodyMapper: AzureDevOpsProject
3191
+ },
3192
+ default: {
3193
+ bodyMapper: ErrorResponse
3194
+ }
3195
+ },
3196
+ queryParameters: [apiVersion],
3197
+ urlParameters: [
3198
+ $host,
3199
+ subscriptionId,
3200
+ resourceGroupName,
3201
+ azureDevOpsConnectorName,
3202
+ azureDevOpsOrgName,
3203
+ azureDevOpsProjectName
3204
+ ],
3205
+ headerParameters: [accept],
3206
+ serializer: serializer$5
3207
+ };
3208
+ const createOrUpdateOperationSpec$3 = {
3209
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs/{azureDevOpsOrgName}/projects/{azureDevOpsProjectName}",
3210
+ httpMethod: "PUT",
3211
+ responses: {
3212
+ 200: {
3213
+ bodyMapper: AzureDevOpsProject
3214
+ },
3215
+ 201: {
3216
+ bodyMapper: AzureDevOpsProject
3217
+ },
3218
+ 202: {
3219
+ bodyMapper: AzureDevOpsProject
3220
+ },
3221
+ 204: {
3222
+ bodyMapper: AzureDevOpsProject
3223
+ },
3224
+ default: {
3225
+ bodyMapper: ErrorResponse
3226
+ }
3227
+ },
3228
+ requestBody: azureDevOpsProject,
3229
+ queryParameters: [apiVersion],
3230
+ urlParameters: [
3231
+ $host,
3232
+ subscriptionId,
3233
+ resourceGroupName,
3234
+ azureDevOpsConnectorName,
3235
+ azureDevOpsOrgName,
3236
+ azureDevOpsProjectName
3237
+ ],
3238
+ headerParameters: [accept, contentType],
3239
+ mediaType: "json",
3240
+ serializer: serializer$5
3241
+ };
3242
+ const updateOperationSpec$3 = {
3243
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/{azureDevOpsConnectorName}/orgs/{azureDevOpsOrgName}/projects/{azureDevOpsProjectName}",
3244
+ httpMethod: "PATCH",
3245
+ responses: {
3246
+ 200: {
3247
+ bodyMapper: AzureDevOpsProject
3248
+ },
3249
+ 201: {
3250
+ bodyMapper: AzureDevOpsProject
3251
+ },
3252
+ 202: {
3253
+ bodyMapper: AzureDevOpsProject
3254
+ },
3255
+ 204: {
3256
+ bodyMapper: AzureDevOpsProject
3257
+ },
3258
+ default: {
3259
+ bodyMapper: ErrorResponse
3260
+ }
3261
+ },
3262
+ requestBody: azureDevOpsProject1,
3263
+ queryParameters: [apiVersion],
3264
+ urlParameters: [
3265
+ $host,
3266
+ subscriptionId,
3267
+ resourceGroupName,
3268
+ azureDevOpsConnectorName,
3269
+ azureDevOpsOrgName,
3270
+ azureDevOpsProjectName
3271
+ ],
3272
+ headerParameters: [accept, contentType],
3273
+ mediaType: "json",
3274
+ serializer: serializer$5
3275
+ };
3276
+ const listNextOperationSpec$3 = {
3277
+ path: "{nextLink}",
3278
+ httpMethod: "GET",
3279
+ responses: {
3280
+ 200: {
3281
+ bodyMapper: AzureDevOpsProjectListResponse
3282
+ },
3283
+ default: {
3284
+ bodyMapper: ErrorResponse
3285
+ }
3286
+ },
3287
+ queryParameters: [apiVersion],
3288
+ urlParameters: [
3289
+ $host,
3290
+ subscriptionId,
3291
+ resourceGroupName,
3292
+ azureDevOpsConnectorName,
3293
+ nextLink,
3294
+ azureDevOpsOrgName
3295
+ ],
3296
+ headerParameters: [accept],
3297
+ serializer: serializer$5
3298
+ };
3299
+
3300
+ /*
3301
+ * Copyright (c) Microsoft Corporation.
3302
+ * Licensed under the MIT License.
3303
+ *
3304
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3305
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3306
+ */
3307
+ /// <reference lib="esnext.asynciterable" />
3308
+ /** Class containing GitHubConnectorOperations operations. */
3309
+ class GitHubConnectorOperationsImpl {
3310
+ /**
3311
+ * Initialize a new instance of the class GitHubConnectorOperations class.
3312
+ * @param client Reference to the service client
3313
+ */
3314
+ constructor(client) {
3315
+ this.client = client;
3316
+ }
3317
+ /**
3318
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3319
+ * @param options The options parameters.
3320
+ */
3321
+ listByResourceGroup(resourceGroupName, options) {
3322
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
3323
+ return {
3324
+ next() {
3325
+ return iter.next();
3326
+ },
3327
+ [Symbol.asyncIterator]() {
3328
+ return this;
3329
+ },
3330
+ byPage: () => {
3331
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
3332
+ }
3333
+ };
3334
+ }
3335
+ listByResourceGroupPagingPage(resourceGroupName, options) {
3336
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
3337
+ let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
3338
+ yield yield tslib.__await(result.value || []);
3339
+ let continuationToken = result.nextLink;
3340
+ while (continuationToken) {
3341
+ result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
3342
+ continuationToken = result.nextLink;
3343
+ yield yield tslib.__await(result.value || []);
3344
+ }
3345
+ });
3346
+ }
3347
+ listByResourceGroupPagingAll(resourceGroupName, options) {
3348
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
3349
+ var e_1, _a;
3350
+ try {
3351
+ for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3352
+ const page = _c.value;
3353
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3354
+ }
3355
+ }
3356
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3357
+ finally {
3358
+ try {
3359
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3360
+ }
3361
+ finally { if (e_1) throw e_1.error; }
3362
+ }
3363
+ });
3364
+ }
3365
+ /**
3366
+ * Returns a list of monitored GitHub Connectors.
3367
+ * @param options The options parameters.
3368
+ */
3369
+ listBySubscription(options) {
3370
+ const iter = this.listBySubscriptionPagingAll(options);
3371
+ return {
3372
+ next() {
3373
+ return iter.next();
3374
+ },
3375
+ [Symbol.asyncIterator]() {
3376
+ return this;
3377
+ },
3378
+ byPage: () => {
3379
+ return this.listBySubscriptionPagingPage(options);
3380
+ }
3381
+ };
3382
+ }
3383
+ listBySubscriptionPagingPage(options) {
3384
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
3385
+ let result = yield tslib.__await(this._listBySubscription(options));
3386
+ yield yield tslib.__await(result.value || []);
3387
+ let continuationToken = result.nextLink;
3388
+ while (continuationToken) {
3389
+ result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
3390
+ continuationToken = result.nextLink;
3391
+ yield yield tslib.__await(result.value || []);
3392
+ }
3393
+ });
3394
+ }
3395
+ listBySubscriptionPagingAll(options) {
3396
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
3397
+ var e_2, _a;
3398
+ try {
3399
+ for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3400
+ const page = _c.value;
3401
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3402
+ }
3403
+ }
3404
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
3405
+ finally {
3406
+ try {
3407
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3408
+ }
3409
+ finally { if (e_2) throw e_2.error; }
3410
+ }
3411
+ });
3412
+ }
3413
+ /**
3414
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3415
+ * @param options The options parameters.
3416
+ */
3417
+ _listByResourceGroup(resourceGroupName, options) {
3418
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
3419
+ }
3420
+ /**
3421
+ * Returns a monitored GitHub Connector resource for a given ID.
3422
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3423
+ * @param gitHubConnectorName Name of the GitHub Connector.
3424
+ * @param options The options parameters.
3425
+ */
3426
+ get(resourceGroupName, gitHubConnectorName, options) {
3427
+ return this.client.sendOperationRequest({ resourceGroupName, gitHubConnectorName, options }, getOperationSpec$3);
3428
+ }
3429
+ /**
3430
+ * Create or update a monitored GitHub Connector resource.
3431
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3432
+ * @param gitHubConnectorName Name of the GitHub Connector.
3433
+ * @param gitHubConnector Connector resource payload.
3434
+ * @param options The options parameters.
3435
+ */
3436
+ beginCreateOrUpdate(resourceGroupName, gitHubConnectorName, gitHubConnector, options) {
3437
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3438
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3439
+ return this.client.sendOperationRequest(args, spec);
3440
+ });
3441
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3442
+ var _a;
3443
+ let currentRawResponse = undefined;
3444
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3445
+ const callback = (rawResponse, flatResponse) => {
3446
+ currentRawResponse = rawResponse;
3447
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3448
+ };
3449
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3450
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3451
+ return {
3452
+ flatResponse,
3453
+ rawResponse: {
3454
+ statusCode: currentRawResponse.status,
3455
+ body: currentRawResponse.parsedBody,
3456
+ headers: currentRawResponse.headers.toJSON()
3457
+ }
3458
+ };
3459
+ });
3460
+ const lro = new LroImpl(sendOperation, { resourceGroupName, gitHubConnectorName, gitHubConnector, options }, createOrUpdateOperationSpec$2);
3461
+ const poller = new coreLro.LroEngine(lro, {
3462
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3463
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3464
+ lroResourceLocationConfig: "azure-async-operation"
3465
+ });
3466
+ yield poller.poll();
3467
+ return poller;
3468
+ });
3469
+ }
3470
+ /**
3471
+ * Create or update a monitored GitHub Connector resource.
3472
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3473
+ * @param gitHubConnectorName Name of the GitHub Connector.
3474
+ * @param gitHubConnector Connector resource payload.
3475
+ * @param options The options parameters.
3476
+ */
3477
+ beginCreateOrUpdateAndWait(resourceGroupName, gitHubConnectorName, gitHubConnector, options) {
3478
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3479
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, gitHubConnectorName, gitHubConnector, options);
3480
+ return poller.pollUntilDone();
3481
+ });
3482
+ }
3483
+ /**
3484
+ * Update monitored GitHub Connector details.
3485
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3486
+ * @param gitHubConnectorName Name of the GitHub Connector.
3487
+ * @param options The options parameters.
3488
+ */
3489
+ beginUpdate(resourceGroupName, gitHubConnectorName, options) {
3490
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3491
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3492
+ return this.client.sendOperationRequest(args, spec);
3493
+ });
3494
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3495
+ var _a;
3496
+ let currentRawResponse = undefined;
3497
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3498
+ const callback = (rawResponse, flatResponse) => {
3499
+ currentRawResponse = rawResponse;
3500
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3501
+ };
3502
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3503
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3504
+ return {
3505
+ flatResponse,
3506
+ rawResponse: {
3507
+ statusCode: currentRawResponse.status,
3508
+ body: currentRawResponse.parsedBody,
3509
+ headers: currentRawResponse.headers.toJSON()
3510
+ }
3511
+ };
3512
+ });
3513
+ const lro = new LroImpl(sendOperation, { resourceGroupName, gitHubConnectorName, options }, updateOperationSpec$2);
3514
+ const poller = new coreLro.LroEngine(lro, {
3515
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3516
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3517
+ });
3518
+ yield poller.poll();
3519
+ return poller;
3520
+ });
3521
+ }
3522
+ /**
3523
+ * Update monitored GitHub Connector details.
3524
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3525
+ * @param gitHubConnectorName Name of the GitHub Connector.
3526
+ * @param options The options parameters.
3527
+ */
3528
+ beginUpdateAndWait(resourceGroupName, gitHubConnectorName, options) {
3529
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3530
+ const poller = yield this.beginUpdate(resourceGroupName, gitHubConnectorName, options);
3531
+ return poller.pollUntilDone();
3532
+ });
3533
+ }
3534
+ /**
3535
+ * Delete monitored GitHub Connector details.
3536
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3537
+ * @param gitHubConnectorName Name of the GitHub Connector.
3538
+ * @param options The options parameters.
3539
+ */
3540
+ beginDelete(resourceGroupName, gitHubConnectorName, options) {
3541
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3542
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3543
+ return this.client.sendOperationRequest(args, spec);
3544
+ });
3545
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3546
+ var _a;
3547
+ let currentRawResponse = undefined;
3548
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3549
+ const callback = (rawResponse, flatResponse) => {
3550
+ currentRawResponse = rawResponse;
3551
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3552
+ };
3553
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3554
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3555
+ return {
3556
+ flatResponse,
3557
+ rawResponse: {
3558
+ statusCode: currentRawResponse.status,
3559
+ body: currentRawResponse.parsedBody,
3560
+ headers: currentRawResponse.headers.toJSON()
3561
+ }
3562
+ };
3563
+ });
3564
+ const lro = new LroImpl(sendOperation, { resourceGroupName, gitHubConnectorName, options }, deleteOperationSpec);
3565
+ const poller = new coreLro.LroEngine(lro, {
3566
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3567
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3568
+ });
3569
+ yield poller.poll();
3570
+ return poller;
3571
+ });
3572
+ }
3573
+ /**
3574
+ * Delete monitored GitHub Connector details.
3575
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3576
+ * @param gitHubConnectorName Name of the GitHub Connector.
3577
+ * @param options The options parameters.
3578
+ */
3579
+ beginDeleteAndWait(resourceGroupName, gitHubConnectorName, options) {
3580
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3581
+ const poller = yield this.beginDelete(resourceGroupName, gitHubConnectorName, options);
3582
+ return poller.pollUntilDone();
3583
+ });
3584
+ }
3585
+ /**
3586
+ * Returns a list of monitored GitHub Connectors.
3587
+ * @param options The options parameters.
3588
+ */
3589
+ _listBySubscription(options) {
3590
+ return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
3591
+ }
3592
+ /**
3593
+ * ListByResourceGroupNext
3594
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3595
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
3596
+ * @param options The options parameters.
3597
+ */
3598
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
3599
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
3600
+ }
3601
+ /**
3602
+ * ListBySubscriptionNext
3603
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
3604
+ * @param options The options parameters.
3605
+ */
3606
+ _listBySubscriptionNext(nextLink, options) {
3607
+ return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
3608
+ }
3609
+ }
3610
+ // Operation Specifications
3611
+ const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3612
+ const listByResourceGroupOperationSpec = {
3613
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors",
3614
+ httpMethod: "GET",
3615
+ responses: {
3616
+ 200: {
3617
+ bodyMapper: GitHubConnectorListResponse
3618
+ },
3619
+ default: {
3620
+ bodyMapper: ErrorResponse
3621
+ }
3622
+ },
3623
+ queryParameters: [apiVersion],
3624
+ urlParameters: [
3625
+ $host,
3626
+ subscriptionId,
3627
+ resourceGroupName
3628
+ ],
3629
+ headerParameters: [accept],
3630
+ serializer: serializer$4
3631
+ };
3632
+ const getOperationSpec$3 = {
3633
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}",
3634
+ httpMethod: "GET",
3635
+ responses: {
3636
+ 200: {
3637
+ bodyMapper: GitHubConnector
3638
+ },
3639
+ default: {
3640
+ bodyMapper: ErrorResponse
3641
+ }
3642
+ },
3643
+ queryParameters: [apiVersion],
3644
+ urlParameters: [
3645
+ $host,
3646
+ subscriptionId,
3647
+ resourceGroupName,
3648
+ gitHubConnectorName
3649
+ ],
3650
+ headerParameters: [accept],
3651
+ serializer: serializer$4
3652
+ };
3653
+ const createOrUpdateOperationSpec$2 = {
3654
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}",
3655
+ httpMethod: "PUT",
3656
+ responses: {
3657
+ 200: {
3658
+ bodyMapper: GitHubConnector
3659
+ },
3660
+ 201: {
3661
+ bodyMapper: GitHubConnector
3662
+ },
3663
+ 202: {
3664
+ bodyMapper: GitHubConnector
3665
+ },
3666
+ 204: {
3667
+ bodyMapper: GitHubConnector
3668
+ },
3669
+ default: {
3670
+ bodyMapper: ErrorResponse
3671
+ }
3672
+ },
3673
+ requestBody: gitHubConnector,
3674
+ queryParameters: [apiVersion],
3675
+ urlParameters: [
3676
+ $host,
3677
+ subscriptionId,
3678
+ resourceGroupName,
3679
+ gitHubConnectorName
3680
+ ],
3681
+ headerParameters: [accept, contentType],
3682
+ mediaType: "json",
3683
+ serializer: serializer$4
3684
+ };
3685
+ const updateOperationSpec$2 = {
3686
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}",
3687
+ httpMethod: "PATCH",
3688
+ responses: {
3689
+ 200: {
3690
+ bodyMapper: GitHubConnector
3691
+ },
3692
+ 201: {
3693
+ bodyMapper: GitHubConnector
3694
+ },
3695
+ 202: {
3696
+ bodyMapper: GitHubConnector
3697
+ },
3698
+ 204: {
3699
+ bodyMapper: GitHubConnector
3700
+ },
3701
+ default: {
3702
+ bodyMapper: ErrorResponse
3703
+ }
3704
+ },
3705
+ requestBody: gitHubConnector1,
3706
+ queryParameters: [apiVersion],
3707
+ urlParameters: [
3708
+ $host,
3709
+ subscriptionId,
3710
+ resourceGroupName,
3711
+ gitHubConnectorName
3712
+ ],
3713
+ headerParameters: [accept, contentType],
3714
+ mediaType: "json",
3715
+ serializer: serializer$4
3716
+ };
3717
+ const deleteOperationSpec = {
3718
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}",
3719
+ httpMethod: "DELETE",
3720
+ responses: {
3721
+ 200: {},
3722
+ 201: {},
3723
+ 202: {},
3724
+ 204: {},
3725
+ default: {
3726
+ bodyMapper: ErrorResponse
3727
+ }
3728
+ },
3729
+ queryParameters: [apiVersion],
3730
+ urlParameters: [
3731
+ $host,
3732
+ subscriptionId,
3733
+ resourceGroupName,
3734
+ gitHubConnectorName
3735
+ ],
3736
+ headerParameters: [accept],
3737
+ serializer: serializer$4
3738
+ };
3739
+ const listBySubscriptionOperationSpec = {
3740
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.SecurityDevOps/gitHubConnectors",
3741
+ httpMethod: "GET",
3742
+ responses: {
3743
+ 200: {
3744
+ bodyMapper: GitHubConnectorListResponse
3745
+ },
3746
+ default: {
3747
+ bodyMapper: ErrorResponse
3748
+ }
3749
+ },
3750
+ queryParameters: [apiVersion],
3751
+ urlParameters: [$host, subscriptionId],
3752
+ headerParameters: [accept],
3753
+ serializer: serializer$4
3754
+ };
3755
+ const listByResourceGroupNextOperationSpec = {
3756
+ path: "{nextLink}",
3757
+ httpMethod: "GET",
3758
+ responses: {
3759
+ 200: {
3760
+ bodyMapper: GitHubConnectorListResponse
3761
+ },
3762
+ default: {
3763
+ bodyMapper: ErrorResponse
3764
+ }
3765
+ },
3766
+ queryParameters: [apiVersion],
3767
+ urlParameters: [
3768
+ $host,
3769
+ subscriptionId,
3770
+ resourceGroupName,
3771
+ nextLink
3772
+ ],
3773
+ headerParameters: [accept],
3774
+ serializer: serializer$4
3775
+ };
3776
+ const listBySubscriptionNextOperationSpec = {
3777
+ path: "{nextLink}",
3778
+ httpMethod: "GET",
3779
+ responses: {
3780
+ 200: {
3781
+ bodyMapper: GitHubConnectorListResponse
3782
+ },
3783
+ default: {
3784
+ bodyMapper: ErrorResponse
3785
+ }
3786
+ },
3787
+ queryParameters: [apiVersion],
3788
+ urlParameters: [
3789
+ $host,
3790
+ subscriptionId,
3791
+ nextLink
3792
+ ],
3793
+ headerParameters: [accept],
3794
+ serializer: serializer$4
3795
+ };
3796
+
3797
+ /*
3798
+ * Copyright (c) Microsoft Corporation.
3799
+ * Licensed under the MIT License.
3800
+ *
3801
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3802
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3803
+ */
3804
+ /// <reference lib="esnext.asynciterable" />
3805
+ /** Class containing GitHubRepoOperations operations. */
3806
+ class GitHubRepoOperationsImpl {
3807
+ /**
3808
+ * Initialize a new instance of the class GitHubRepoOperations class.
3809
+ * @param client Reference to the service client
3810
+ */
3811
+ constructor(client) {
3812
+ this.client = client;
3813
+ }
3814
+ /**
3815
+ * Returns a list of monitored GitHub repositories.
3816
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3817
+ * @param gitHubConnectorName Name of the GitHub Connector.
3818
+ * @param options The options parameters.
3819
+ */
3820
+ listByConnector(resourceGroupName, gitHubConnectorName, options) {
3821
+ const iter = this.listByConnectorPagingAll(resourceGroupName, gitHubConnectorName, options);
3822
+ return {
3823
+ next() {
3824
+ return iter.next();
3825
+ },
3826
+ [Symbol.asyncIterator]() {
3827
+ return this;
3828
+ },
3829
+ byPage: () => {
3830
+ return this.listByConnectorPagingPage(resourceGroupName, gitHubConnectorName, options);
3831
+ }
3832
+ };
3833
+ }
3834
+ listByConnectorPagingPage(resourceGroupName, gitHubConnectorName, options) {
3835
+ return tslib.__asyncGenerator(this, arguments, function* listByConnectorPagingPage_1() {
3836
+ let result = yield tslib.__await(this._listByConnector(resourceGroupName, gitHubConnectorName, options));
3837
+ yield yield tslib.__await(result.value || []);
3838
+ let continuationToken = result.nextLink;
3839
+ while (continuationToken) {
3840
+ result = yield tslib.__await(this._listByConnectorNext(resourceGroupName, gitHubConnectorName, continuationToken, options));
3841
+ continuationToken = result.nextLink;
3842
+ yield yield tslib.__await(result.value || []);
3843
+ }
3844
+ });
3845
+ }
3846
+ listByConnectorPagingAll(resourceGroupName, gitHubConnectorName, options) {
3847
+ return tslib.__asyncGenerator(this, arguments, function* listByConnectorPagingAll_1() {
3848
+ var e_1, _a;
3849
+ try {
3850
+ for (var _b = tslib.__asyncValues(this.listByConnectorPagingPage(resourceGroupName, gitHubConnectorName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3851
+ const page = _c.value;
3852
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3853
+ }
3854
+ }
3855
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3856
+ finally {
3857
+ try {
3858
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3859
+ }
3860
+ finally { if (e_1) throw e_1.error; }
3861
+ }
3862
+ });
3863
+ }
3864
+ /**
3865
+ * Returns a list of monitored GitHub repositories.
3866
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3867
+ * @param gitHubConnectorName Name of the GitHub Connector.
3868
+ * @param gitHubOwnerName Name of the GitHub Owner.
3869
+ * @param options The options parameters.
3870
+ */
3871
+ list(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options) {
3872
+ const iter = this.listPagingAll(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options);
3873
+ return {
3874
+ next() {
3875
+ return iter.next();
3876
+ },
3877
+ [Symbol.asyncIterator]() {
3878
+ return this;
3879
+ },
3880
+ byPage: () => {
3881
+ return this.listPagingPage(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options);
3882
+ }
3883
+ };
3884
+ }
3885
+ listPagingPage(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options) {
3886
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3887
+ let result = yield tslib.__await(this._list(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options));
3888
+ yield yield tslib.__await(result.value || []);
3889
+ let continuationToken = result.nextLink;
3890
+ while (continuationToken) {
3891
+ result = yield tslib.__await(this._listNext(resourceGroupName, gitHubConnectorName, gitHubOwnerName, continuationToken, options));
3892
+ continuationToken = result.nextLink;
3893
+ yield yield tslib.__await(result.value || []);
3894
+ }
3895
+ });
3896
+ }
3897
+ listPagingAll(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options) {
3898
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3899
+ var e_2, _a;
3900
+ try {
3901
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3902
+ const page = _c.value;
3903
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3904
+ }
3905
+ }
3906
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
3907
+ finally {
3908
+ try {
3909
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3910
+ }
3911
+ finally { if (e_2) throw e_2.error; }
3912
+ }
3913
+ });
3914
+ }
3915
+ /**
3916
+ * Returns a list of monitored GitHub repositories.
3917
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3918
+ * @param gitHubConnectorName Name of the GitHub Connector.
3919
+ * @param options The options parameters.
3920
+ */
3921
+ _listByConnector(resourceGroupName, gitHubConnectorName, options) {
3922
+ return this.client.sendOperationRequest({ resourceGroupName, gitHubConnectorName, options }, listByConnectorOperationSpec);
3923
+ }
3924
+ /**
3925
+ * Returns a list of monitored GitHub repositories.
3926
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3927
+ * @param gitHubConnectorName Name of the GitHub Connector.
3928
+ * @param gitHubOwnerName Name of the GitHub Owner.
3929
+ * @param options The options parameters.
3930
+ */
3931
+ _list(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options) {
3932
+ return this.client.sendOperationRequest({ resourceGroupName, gitHubConnectorName, gitHubOwnerName, options }, listOperationSpec$2);
3933
+ }
3934
+ /**
3935
+ * Returns a monitored GitHub repository.
3936
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3937
+ * @param gitHubConnectorName Name of the GitHub Connector.
3938
+ * @param gitHubOwnerName Name of the GitHub Owner.
3939
+ * @param gitHubRepoName Name of the GitHub Repo.
3940
+ * @param options The options parameters.
3941
+ */
3942
+ get(resourceGroupName, gitHubConnectorName, gitHubOwnerName, gitHubRepoName, options) {
3943
+ return this.client.sendOperationRequest({
3944
+ resourceGroupName,
3945
+ gitHubConnectorName,
3946
+ gitHubOwnerName,
3947
+ gitHubRepoName,
3948
+ options
3949
+ }, getOperationSpec$2);
3950
+ }
3951
+ /**
3952
+ * Create or update a monitored GitHub repository.
3953
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3954
+ * @param gitHubConnectorName Name of the GitHub Connector.
3955
+ * @param gitHubOwnerName Name of the GitHub Owner.
3956
+ * @param gitHubRepoName Name of the GitHub Repo.
3957
+ * @param gitHubRepo Github repo.
3958
+ * @param options The options parameters.
3959
+ */
3960
+ beginCreateOrUpdate(resourceGroupName, gitHubConnectorName, gitHubOwnerName, gitHubRepoName, gitHubRepo, options) {
3961
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3962
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3963
+ return this.client.sendOperationRequest(args, spec);
3964
+ });
3965
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3966
+ var _a;
3967
+ let currentRawResponse = undefined;
3968
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3969
+ const callback = (rawResponse, flatResponse) => {
3970
+ currentRawResponse = rawResponse;
3971
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3972
+ };
3973
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3974
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3975
+ return {
3976
+ flatResponse,
3977
+ rawResponse: {
3978
+ statusCode: currentRawResponse.status,
3979
+ body: currentRawResponse.parsedBody,
3980
+ headers: currentRawResponse.headers.toJSON()
3981
+ }
3982
+ };
3983
+ });
3984
+ const lro = new LroImpl(sendOperation, {
3985
+ resourceGroupName,
3986
+ gitHubConnectorName,
3987
+ gitHubOwnerName,
3988
+ gitHubRepoName,
3989
+ gitHubRepo,
3990
+ options
3991
+ }, createOrUpdateOperationSpec$1);
3992
+ const poller = new coreLro.LroEngine(lro, {
3993
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3994
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3995
+ lroResourceLocationConfig: "azure-async-operation"
3996
+ });
3997
+ yield poller.poll();
3998
+ return poller;
3999
+ });
4000
+ }
4001
+ /**
4002
+ * Create or update a monitored GitHub repository.
4003
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4004
+ * @param gitHubConnectorName Name of the GitHub Connector.
4005
+ * @param gitHubOwnerName Name of the GitHub Owner.
4006
+ * @param gitHubRepoName Name of the GitHub Repo.
4007
+ * @param gitHubRepo Github repo.
4008
+ * @param options The options parameters.
4009
+ */
4010
+ beginCreateOrUpdateAndWait(resourceGroupName, gitHubConnectorName, gitHubOwnerName, gitHubRepoName, gitHubRepo, options) {
4011
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4012
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, gitHubConnectorName, gitHubOwnerName, gitHubRepoName, gitHubRepo, options);
4013
+ return poller.pollUntilDone();
4014
+ });
4015
+ }
4016
+ /**
4017
+ * Patch a monitored GitHub repository.
4018
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4019
+ * @param gitHubConnectorName Name of the GitHub Connector.
4020
+ * @param gitHubOwnerName Name of the GitHub Owner.
4021
+ * @param gitHubRepoName Name of the GitHub Repo.
4022
+ * @param options The options parameters.
4023
+ */
4024
+ beginUpdate(resourceGroupName, gitHubConnectorName, gitHubOwnerName, gitHubRepoName, options) {
4025
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4026
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4027
+ return this.client.sendOperationRequest(args, spec);
4028
+ });
4029
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4030
+ var _a;
4031
+ let currentRawResponse = undefined;
4032
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
4033
+ const callback = (rawResponse, flatResponse) => {
4034
+ currentRawResponse = rawResponse;
4035
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
4036
+ };
4037
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
4038
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
4039
+ return {
4040
+ flatResponse,
4041
+ rawResponse: {
4042
+ statusCode: currentRawResponse.status,
4043
+ body: currentRawResponse.parsedBody,
4044
+ headers: currentRawResponse.headers.toJSON()
4045
+ }
4046
+ };
4047
+ });
4048
+ const lro = new LroImpl(sendOperation, {
4049
+ resourceGroupName,
4050
+ gitHubConnectorName,
4051
+ gitHubOwnerName,
4052
+ gitHubRepoName,
4053
+ options
4054
+ }, updateOperationSpec$1);
4055
+ const poller = new coreLro.LroEngine(lro, {
4056
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4057
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4058
+ });
4059
+ yield poller.poll();
4060
+ return poller;
4061
+ });
4062
+ }
4063
+ /**
4064
+ * Patch a monitored GitHub repository.
4065
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4066
+ * @param gitHubConnectorName Name of the GitHub Connector.
4067
+ * @param gitHubOwnerName Name of the GitHub Owner.
4068
+ * @param gitHubRepoName Name of the GitHub Repo.
4069
+ * @param options The options parameters.
4070
+ */
4071
+ beginUpdateAndWait(resourceGroupName, gitHubConnectorName, gitHubOwnerName, gitHubRepoName, options) {
4072
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4073
+ const poller = yield this.beginUpdate(resourceGroupName, gitHubConnectorName, gitHubOwnerName, gitHubRepoName, options);
4074
+ return poller.pollUntilDone();
4075
+ });
4076
+ }
4077
+ /**
4078
+ * ListByConnectorNext
4079
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4080
+ * @param gitHubConnectorName Name of the GitHub Connector.
4081
+ * @param nextLink The nextLink from the previous successful call to the ListByConnector method.
4082
+ * @param options The options parameters.
4083
+ */
4084
+ _listByConnectorNext(resourceGroupName, gitHubConnectorName, nextLink, options) {
4085
+ return this.client.sendOperationRequest({ resourceGroupName, gitHubConnectorName, nextLink, options }, listByConnectorNextOperationSpec);
4086
+ }
4087
+ /**
4088
+ * ListNext
4089
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4090
+ * @param gitHubConnectorName Name of the GitHub Connector.
4091
+ * @param gitHubOwnerName Name of the GitHub Owner.
4092
+ * @param nextLink The nextLink from the previous successful call to the List method.
4093
+ * @param options The options parameters.
4094
+ */
4095
+ _listNext(resourceGroupName, gitHubConnectorName, gitHubOwnerName, nextLink, options) {
4096
+ return this.client.sendOperationRequest({
4097
+ resourceGroupName,
4098
+ gitHubConnectorName,
4099
+ gitHubOwnerName,
4100
+ nextLink,
4101
+ options
4102
+ }, listNextOperationSpec$2);
4103
+ }
4104
+ }
4105
+ // Operation Specifications
4106
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
4107
+ const listByConnectorOperationSpec = {
4108
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}/repos",
4109
+ httpMethod: "GET",
4110
+ responses: {
4111
+ 200: {
4112
+ bodyMapper: GitHubRepoListResponse
4113
+ },
4114
+ default: {
4115
+ bodyMapper: ErrorResponse
4116
+ }
4117
+ },
4118
+ queryParameters: [apiVersion],
4119
+ urlParameters: [
4120
+ $host,
4121
+ subscriptionId,
4122
+ resourceGroupName,
4123
+ gitHubConnectorName
4124
+ ],
4125
+ headerParameters: [accept],
4126
+ serializer: serializer$3
4127
+ };
4128
+ const listOperationSpec$2 = {
4129
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}/owners/{gitHubOwnerName}/repos",
4130
+ httpMethod: "GET",
4131
+ responses: {
4132
+ 200: {
4133
+ bodyMapper: GitHubRepoListResponse
4134
+ },
4135
+ default: {
4136
+ bodyMapper: ErrorResponse
4137
+ }
4138
+ },
4139
+ queryParameters: [apiVersion],
4140
+ urlParameters: [
4141
+ $host,
4142
+ subscriptionId,
4143
+ resourceGroupName,
4144
+ gitHubConnectorName,
4145
+ gitHubOwnerName
4146
+ ],
4147
+ headerParameters: [accept],
4148
+ serializer: serializer$3
4149
+ };
4150
+ const getOperationSpec$2 = {
4151
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}/owners/{gitHubOwnerName}/repos/{gitHubRepoName}",
4152
+ httpMethod: "GET",
4153
+ responses: {
4154
+ 200: {
4155
+ bodyMapper: GitHubRepo
4156
+ },
4157
+ default: {
4158
+ bodyMapper: ErrorResponse
4159
+ }
4160
+ },
4161
+ queryParameters: [apiVersion],
4162
+ urlParameters: [
4163
+ $host,
4164
+ subscriptionId,
4165
+ resourceGroupName,
4166
+ gitHubConnectorName,
4167
+ gitHubOwnerName,
4168
+ gitHubRepoName
4169
+ ],
4170
+ headerParameters: [accept],
4171
+ serializer: serializer$3
4172
+ };
4173
+ const createOrUpdateOperationSpec$1 = {
4174
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}/owners/{gitHubOwnerName}/repos/{gitHubRepoName}",
4175
+ httpMethod: "PUT",
4176
+ responses: {
4177
+ 200: {
4178
+ bodyMapper: GitHubRepo
4179
+ },
4180
+ 201: {
4181
+ bodyMapper: GitHubRepo
4182
+ },
4183
+ 202: {
4184
+ bodyMapper: GitHubRepo
4185
+ },
4186
+ 204: {
4187
+ bodyMapper: GitHubRepo
4188
+ },
4189
+ default: {
4190
+ bodyMapper: ErrorResponse
4191
+ }
4192
+ },
4193
+ requestBody: gitHubRepo,
4194
+ queryParameters: [apiVersion],
4195
+ urlParameters: [
4196
+ $host,
4197
+ subscriptionId,
4198
+ resourceGroupName,
4199
+ gitHubConnectorName,
4200
+ gitHubOwnerName,
4201
+ gitHubRepoName
4202
+ ],
4203
+ headerParameters: [accept, contentType],
4204
+ mediaType: "json",
4205
+ serializer: serializer$3
4206
+ };
4207
+ const updateOperationSpec$1 = {
4208
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}/owners/{gitHubOwnerName}/repos/{gitHubRepoName}",
4209
+ httpMethod: "PATCH",
4210
+ responses: {
4211
+ 200: {
4212
+ bodyMapper: GitHubRepo
4213
+ },
4214
+ 201: {
4215
+ bodyMapper: GitHubRepo
4216
+ },
4217
+ 202: {
4218
+ bodyMapper: GitHubRepo
4219
+ },
4220
+ 204: {
4221
+ bodyMapper: GitHubRepo
4222
+ },
4223
+ default: {
4224
+ bodyMapper: ErrorResponse
4225
+ }
4226
+ },
4227
+ requestBody: gitHubRepo1,
4228
+ queryParameters: [apiVersion],
4229
+ urlParameters: [
4230
+ $host,
4231
+ subscriptionId,
4232
+ resourceGroupName,
4233
+ gitHubConnectorName,
4234
+ gitHubOwnerName,
4235
+ gitHubRepoName
4236
+ ],
4237
+ headerParameters: [accept, contentType],
4238
+ mediaType: "json",
4239
+ serializer: serializer$3
4240
+ };
4241
+ const listByConnectorNextOperationSpec = {
4242
+ path: "{nextLink}",
4243
+ httpMethod: "GET",
4244
+ responses: {
4245
+ 200: {
4246
+ bodyMapper: GitHubRepoListResponse
4247
+ },
4248
+ default: {
4249
+ bodyMapper: ErrorResponse
4250
+ }
4251
+ },
4252
+ queryParameters: [apiVersion],
4253
+ urlParameters: [
4254
+ $host,
4255
+ subscriptionId,
4256
+ resourceGroupName,
4257
+ nextLink,
4258
+ gitHubConnectorName
4259
+ ],
4260
+ headerParameters: [accept],
4261
+ serializer: serializer$3
4262
+ };
4263
+ const listNextOperationSpec$2 = {
4264
+ path: "{nextLink}",
4265
+ httpMethod: "GET",
4266
+ responses: {
4267
+ 200: {
4268
+ bodyMapper: GitHubRepoListResponse
4269
+ },
4270
+ default: {
4271
+ bodyMapper: ErrorResponse
4272
+ }
4273
+ },
4274
+ queryParameters: [apiVersion],
4275
+ urlParameters: [
4276
+ $host,
4277
+ subscriptionId,
4278
+ resourceGroupName,
4279
+ nextLink,
4280
+ gitHubConnectorName,
4281
+ gitHubOwnerName
4282
+ ],
4283
+ headerParameters: [accept],
4284
+ serializer: serializer$3
4285
+ };
4286
+
4287
+ /*
4288
+ * Copyright (c) Microsoft Corporation.
4289
+ * Licensed under the MIT License.
4290
+ *
4291
+ * Code generated by Microsoft (R) AutoRest Code Generator.
4292
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4293
+ */
4294
+ /** Class containing GitHubConnectorStatsOperations operations. */
4295
+ class GitHubConnectorStatsOperationsImpl {
4296
+ /**
4297
+ * Initialize a new instance of the class GitHubConnectorStatsOperations class.
4298
+ * @param client Reference to the service client
4299
+ */
4300
+ constructor(client) {
4301
+ this.client = client;
4302
+ }
4303
+ /**
4304
+ * Returns the summary of the GitHub Connector Stats.
4305
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4306
+ * @param gitHubConnectorName Name of the GitHub Connector.
4307
+ * @param options The options parameters.
4308
+ */
4309
+ get(resourceGroupName, gitHubConnectorName, options) {
4310
+ return this.client.sendOperationRequest({ resourceGroupName, gitHubConnectorName, options }, getOperationSpec$1);
4311
+ }
4312
+ }
4313
+ // Operation Specifications
4314
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
4315
+ const getOperationSpec$1 = {
4316
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}/stats",
4317
+ httpMethod: "GET",
4318
+ responses: {
4319
+ 200: {
4320
+ bodyMapper: GitHubConnectorStatsListResponse
4321
+ },
4322
+ default: {
4323
+ bodyMapper: ErrorResponse
4324
+ }
4325
+ },
4326
+ queryParameters: [apiVersion],
4327
+ urlParameters: [
4328
+ $host,
4329
+ subscriptionId,
4330
+ resourceGroupName,
4331
+ gitHubConnectorName
4332
+ ],
4333
+ headerParameters: [accept],
4334
+ serializer: serializer$2
4335
+ };
4336
+
4337
+ /*
4338
+ * Copyright (c) Microsoft Corporation.
4339
+ * Licensed under the MIT License.
4340
+ *
4341
+ * Code generated by Microsoft (R) AutoRest Code Generator.
4342
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4343
+ */
4344
+ /// <reference lib="esnext.asynciterable" />
4345
+ /** Class containing GitHubOwnerOperations operations. */
4346
+ class GitHubOwnerOperationsImpl {
4347
+ /**
4348
+ * Initialize a new instance of the class GitHubOwnerOperations class.
4349
+ * @param client Reference to the service client
4350
+ */
4351
+ constructor(client) {
4352
+ this.client = client;
4353
+ }
4354
+ /**
4355
+ * Returns a list of monitored GitHub owners.
4356
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4357
+ * @param gitHubConnectorName Name of the GitHub Connector.
4358
+ * @param options The options parameters.
4359
+ */
4360
+ list(resourceGroupName, gitHubConnectorName, options) {
4361
+ const iter = this.listPagingAll(resourceGroupName, gitHubConnectorName, options);
4362
+ return {
4363
+ next() {
4364
+ return iter.next();
4365
+ },
4366
+ [Symbol.asyncIterator]() {
4367
+ return this;
4368
+ },
4369
+ byPage: () => {
4370
+ return this.listPagingPage(resourceGroupName, gitHubConnectorName, options);
4371
+ }
4372
+ };
4373
+ }
4374
+ listPagingPage(resourceGroupName, gitHubConnectorName, options) {
4375
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
4376
+ let result = yield tslib.__await(this._list(resourceGroupName, gitHubConnectorName, options));
4377
+ yield yield tslib.__await(result.value || []);
4378
+ let continuationToken = result.nextLink;
4379
+ while (continuationToken) {
4380
+ result = yield tslib.__await(this._listNext(resourceGroupName, gitHubConnectorName, continuationToken, options));
4381
+ continuationToken = result.nextLink;
4382
+ yield yield tslib.__await(result.value || []);
4383
+ }
4384
+ });
4385
+ }
4386
+ listPagingAll(resourceGroupName, gitHubConnectorName, options) {
4387
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
4388
+ var e_1, _a;
4389
+ try {
4390
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, gitHubConnectorName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
4391
+ const page = _c.value;
4392
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
4393
+ }
4394
+ }
4395
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
4396
+ finally {
4397
+ try {
4398
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
4399
+ }
4400
+ finally { if (e_1) throw e_1.error; }
4401
+ }
4402
+ });
4403
+ }
4404
+ /**
4405
+ * Returns a list of monitored GitHub owners.
4406
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4407
+ * @param gitHubConnectorName Name of the GitHub Connector.
4408
+ * @param options The options parameters.
4409
+ */
4410
+ _list(resourceGroupName, gitHubConnectorName, options) {
4411
+ return this.client.sendOperationRequest({ resourceGroupName, gitHubConnectorName, options }, listOperationSpec$1);
4412
+ }
4413
+ /**
4414
+ * Returns a monitored GitHub repository.
4415
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4416
+ * @param gitHubConnectorName Name of the GitHub Connector.
4417
+ * @param gitHubOwnerName Name of the GitHub Owner.
4418
+ * @param options The options parameters.
4419
+ */
4420
+ get(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options) {
4421
+ return this.client.sendOperationRequest({ resourceGroupName, gitHubConnectorName, gitHubOwnerName, options }, getOperationSpec);
4422
+ }
4423
+ /**
4424
+ * Create or update a monitored GitHub owner.
4425
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4426
+ * @param gitHubConnectorName Name of the GitHub Connector.
4427
+ * @param gitHubOwnerName Name of the GitHub Owner.
4428
+ * @param gitHubOwner Github owner.
4429
+ * @param options The options parameters.
4430
+ */
4431
+ beginCreateOrUpdate(resourceGroupName, gitHubConnectorName, gitHubOwnerName, gitHubOwner, options) {
4432
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4433
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4434
+ return this.client.sendOperationRequest(args, spec);
4435
+ });
4436
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4437
+ var _a;
4438
+ let currentRawResponse = undefined;
4439
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
4440
+ const callback = (rawResponse, flatResponse) => {
4441
+ currentRawResponse = rawResponse;
4442
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
4443
+ };
4444
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
4445
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
4446
+ return {
4447
+ flatResponse,
4448
+ rawResponse: {
4449
+ statusCode: currentRawResponse.status,
4450
+ body: currentRawResponse.parsedBody,
4451
+ headers: currentRawResponse.headers.toJSON()
4452
+ }
4453
+ };
4454
+ });
4455
+ const lro = new LroImpl(sendOperation, {
4456
+ resourceGroupName,
4457
+ gitHubConnectorName,
4458
+ gitHubOwnerName,
4459
+ gitHubOwner,
4460
+ options
4461
+ }, createOrUpdateOperationSpec);
4462
+ const poller = new coreLro.LroEngine(lro, {
4463
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4464
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
4465
+ lroResourceLocationConfig: "azure-async-operation"
4466
+ });
4467
+ yield poller.poll();
4468
+ return poller;
4469
+ });
4470
+ }
4471
+ /**
4472
+ * Create or update a monitored GitHub owner.
4473
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4474
+ * @param gitHubConnectorName Name of the GitHub Connector.
4475
+ * @param gitHubOwnerName Name of the GitHub Owner.
4476
+ * @param gitHubOwner Github owner.
4477
+ * @param options The options parameters.
4478
+ */
4479
+ beginCreateOrUpdateAndWait(resourceGroupName, gitHubConnectorName, gitHubOwnerName, gitHubOwner, options) {
4480
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4481
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, gitHubConnectorName, gitHubOwnerName, gitHubOwner, options);
4482
+ return poller.pollUntilDone();
4483
+ });
4484
+ }
4485
+ /**
4486
+ * Patch a monitored GitHub repository.
4487
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4488
+ * @param gitHubConnectorName Name of the GitHub Connector.
4489
+ * @param gitHubOwnerName Name of the GitHub Owner.
4490
+ * @param options The options parameters.
4491
+ */
4492
+ beginUpdate(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options) {
4493
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4494
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4495
+ return this.client.sendOperationRequest(args, spec);
4496
+ });
4497
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4498
+ var _a;
4499
+ let currentRawResponse = undefined;
4500
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
4501
+ const callback = (rawResponse, flatResponse) => {
4502
+ currentRawResponse = rawResponse;
4503
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
4504
+ };
4505
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
4506
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
4507
+ return {
4508
+ flatResponse,
4509
+ rawResponse: {
4510
+ statusCode: currentRawResponse.status,
4511
+ body: currentRawResponse.parsedBody,
4512
+ headers: currentRawResponse.headers.toJSON()
4513
+ }
4514
+ };
4515
+ });
4516
+ const lro = new LroImpl(sendOperation, { resourceGroupName, gitHubConnectorName, gitHubOwnerName, options }, updateOperationSpec);
4517
+ const poller = new coreLro.LroEngine(lro, {
4518
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4519
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4520
+ });
4521
+ yield poller.poll();
4522
+ return poller;
4523
+ });
4524
+ }
4525
+ /**
4526
+ * Patch a monitored GitHub repository.
4527
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4528
+ * @param gitHubConnectorName Name of the GitHub Connector.
4529
+ * @param gitHubOwnerName Name of the GitHub Owner.
4530
+ * @param options The options parameters.
4531
+ */
4532
+ beginUpdateAndWait(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options) {
4533
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4534
+ const poller = yield this.beginUpdate(resourceGroupName, gitHubConnectorName, gitHubOwnerName, options);
4535
+ return poller.pollUntilDone();
4536
+ });
4537
+ }
4538
+ /**
4539
+ * ListNext
4540
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4541
+ * @param gitHubConnectorName Name of the GitHub Connector.
4542
+ * @param nextLink The nextLink from the previous successful call to the List method.
4543
+ * @param options The options parameters.
4544
+ */
4545
+ _listNext(resourceGroupName, gitHubConnectorName, nextLink, options) {
4546
+ return this.client.sendOperationRequest({ resourceGroupName, gitHubConnectorName, nextLink, options }, listNextOperationSpec$1);
4547
+ }
4548
+ }
4549
+ // Operation Specifications
4550
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
4551
+ const listOperationSpec$1 = {
4552
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}/owners",
4553
+ httpMethod: "GET",
4554
+ responses: {
4555
+ 200: {
4556
+ bodyMapper: GitHubOwnerListResponse
4557
+ },
4558
+ default: {
4559
+ bodyMapper: ErrorResponse
4560
+ }
4561
+ },
4562
+ queryParameters: [apiVersion],
4563
+ urlParameters: [
4564
+ $host,
4565
+ subscriptionId,
4566
+ resourceGroupName,
4567
+ gitHubConnectorName
4568
+ ],
4569
+ headerParameters: [accept],
4570
+ serializer: serializer$1
4571
+ };
4572
+ const getOperationSpec = {
4573
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}/owners/{gitHubOwnerName}",
4574
+ httpMethod: "GET",
4575
+ responses: {
4576
+ 200: {
4577
+ bodyMapper: GitHubOwner
4578
+ },
4579
+ default: {
4580
+ bodyMapper: ErrorResponse
4581
+ }
4582
+ },
4583
+ queryParameters: [apiVersion],
4584
+ urlParameters: [
4585
+ $host,
4586
+ subscriptionId,
4587
+ resourceGroupName,
4588
+ gitHubConnectorName,
4589
+ gitHubOwnerName
4590
+ ],
4591
+ headerParameters: [accept],
4592
+ serializer: serializer$1
4593
+ };
4594
+ const createOrUpdateOperationSpec = {
4595
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}/owners/{gitHubOwnerName}",
4596
+ httpMethod: "PUT",
4597
+ responses: {
4598
+ 200: {
4599
+ bodyMapper: GitHubOwner
4600
+ },
4601
+ 201: {
4602
+ bodyMapper: GitHubOwner
4603
+ },
4604
+ 202: {
4605
+ bodyMapper: GitHubOwner
4606
+ },
4607
+ 204: {
4608
+ bodyMapper: GitHubOwner
4609
+ },
4610
+ default: {
4611
+ bodyMapper: ErrorResponse
4612
+ }
4613
+ },
4614
+ requestBody: gitHubOwner,
4615
+ queryParameters: [apiVersion],
4616
+ urlParameters: [
4617
+ $host,
4618
+ subscriptionId,
4619
+ resourceGroupName,
4620
+ gitHubConnectorName,
4621
+ gitHubOwnerName
4622
+ ],
4623
+ headerParameters: [accept, contentType],
4624
+ mediaType: "json",
4625
+ serializer: serializer$1
4626
+ };
4627
+ const updateOperationSpec = {
4628
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityDevOps/gitHubConnectors/{gitHubConnectorName}/owners/{gitHubOwnerName}",
4629
+ httpMethod: "PATCH",
4630
+ responses: {
4631
+ 200: {
4632
+ bodyMapper: GitHubOwner
4633
+ },
4634
+ 201: {
4635
+ bodyMapper: GitHubOwner
4636
+ },
4637
+ 202: {
4638
+ bodyMapper: GitHubOwner
4639
+ },
4640
+ 204: {
4641
+ bodyMapper: GitHubOwner
4642
+ },
4643
+ default: {
4644
+ bodyMapper: ErrorResponse
4645
+ }
4646
+ },
4647
+ requestBody: gitHubOwner1,
4648
+ queryParameters: [apiVersion],
4649
+ urlParameters: [
4650
+ $host,
4651
+ subscriptionId,
4652
+ resourceGroupName,
4653
+ gitHubConnectorName,
4654
+ gitHubOwnerName
4655
+ ],
4656
+ headerParameters: [accept, contentType],
4657
+ mediaType: "json",
4658
+ serializer: serializer$1
4659
+ };
4660
+ const listNextOperationSpec$1 = {
4661
+ path: "{nextLink}",
4662
+ httpMethod: "GET",
4663
+ responses: {
4664
+ 200: {
4665
+ bodyMapper: GitHubOwnerListResponse
4666
+ },
4667
+ default: {
4668
+ bodyMapper: ErrorResponse
4669
+ }
4670
+ },
4671
+ queryParameters: [apiVersion],
4672
+ urlParameters: [
4673
+ $host,
4674
+ subscriptionId,
4675
+ resourceGroupName,
4676
+ nextLink,
4677
+ gitHubConnectorName
4678
+ ],
4679
+ headerParameters: [accept],
4680
+ serializer: serializer$1
4681
+ };
4682
+
4683
+ /*
4684
+ * Copyright (c) Microsoft Corporation.
4685
+ * Licensed under the MIT License.
4686
+ *
4687
+ * Code generated by Microsoft (R) AutoRest Code Generator.
4688
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4689
+ */
4690
+ /// <reference lib="esnext.asynciterable" />
4691
+ /** Class containing Operations operations. */
4692
+ class OperationsImpl {
4693
+ /**
4694
+ * Initialize a new instance of the class Operations class.
4695
+ * @param client Reference to the service client
4696
+ */
4697
+ constructor(client) {
4698
+ this.client = client;
4699
+ }
4700
+ /**
4701
+ * Returns list of operations supported by the Microsoft.SecurityDevOps provider.
4702
+ * @param options The options parameters.
4703
+ */
4704
+ list(options) {
4705
+ const iter = this.listPagingAll(options);
4706
+ return {
4707
+ next() {
4708
+ return iter.next();
4709
+ },
4710
+ [Symbol.asyncIterator]() {
4711
+ return this;
4712
+ },
4713
+ byPage: () => {
4714
+ return this.listPagingPage(options);
4715
+ }
4716
+ };
4717
+ }
4718
+ listPagingPage(options) {
4719
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
4720
+ let result = yield tslib.__await(this._list(options));
4721
+ yield yield tslib.__await(result.value || []);
4722
+ let continuationToken = result.nextLink;
4723
+ while (continuationToken) {
4724
+ result = yield tslib.__await(this._listNext(continuationToken, options));
4725
+ continuationToken = result.nextLink;
4726
+ yield yield tslib.__await(result.value || []);
4727
+ }
4728
+ });
4729
+ }
4730
+ listPagingAll(options) {
4731
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
4732
+ var e_1, _a;
4733
+ try {
4734
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
4735
+ const page = _c.value;
4736
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
4737
+ }
4738
+ }
4739
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
4740
+ finally {
4741
+ try {
4742
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
4743
+ }
4744
+ finally { if (e_1) throw e_1.error; }
4745
+ }
4746
+ });
4747
+ }
4748
+ /**
4749
+ * Returns list of operations supported by the Microsoft.SecurityDevOps provider.
4750
+ * @param options The options parameters.
4751
+ */
4752
+ _list(options) {
4753
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
4754
+ }
4755
+ /**
4756
+ * ListNext
4757
+ * @param nextLink The nextLink from the previous successful call to the List method.
4758
+ * @param options The options parameters.
4759
+ */
4760
+ _listNext(nextLink, options) {
4761
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
4762
+ }
4763
+ }
4764
+ // Operation Specifications
4765
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
4766
+ const listOperationSpec = {
4767
+ path: "/providers/Microsoft.SecurityDevOps/operations",
4768
+ httpMethod: "GET",
4769
+ responses: {
4770
+ 200: {
4771
+ bodyMapper: OperationListResult
4772
+ },
4773
+ default: {
4774
+ bodyMapper: ErrorResponse
4775
+ }
4776
+ },
4777
+ queryParameters: [apiVersion],
4778
+ urlParameters: [$host],
4779
+ headerParameters: [accept],
4780
+ serializer
4781
+ };
4782
+ const listNextOperationSpec = {
4783
+ path: "{nextLink}",
4784
+ httpMethod: "GET",
4785
+ responses: {
4786
+ 200: {
4787
+ bodyMapper: OperationListResult
4788
+ },
4789
+ default: {
4790
+ bodyMapper: ErrorResponse
4791
+ }
4792
+ },
4793
+ queryParameters: [apiVersion],
4794
+ urlParameters: [$host, nextLink],
4795
+ headerParameters: [accept],
4796
+ serializer
4797
+ };
4798
+
4799
+ /*
4800
+ * Copyright (c) Microsoft Corporation.
4801
+ * Licensed under the MIT License.
4802
+ *
4803
+ * Code generated by Microsoft (R) AutoRest Code Generator.
4804
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4805
+ */
4806
+ class MicrosoftSecurityDevOps extends coreClient__namespace.ServiceClient {
4807
+ /**
4808
+ * Initializes a new instance of the MicrosoftSecurityDevOps class.
4809
+ * @param credentials Subscription credentials which uniquely identify client subscription.
4810
+ * @param subscriptionId The ID of the target subscription.
4811
+ * @param options The parameter options
4812
+ */
4813
+ constructor(credentials, subscriptionId, options) {
4814
+ var _a, _b;
4815
+ if (credentials === undefined) {
4816
+ throw new Error("'credentials' cannot be null");
4817
+ }
4818
+ if (subscriptionId === undefined) {
4819
+ throw new Error("'subscriptionId' cannot be null");
4820
+ }
4821
+ // Initializing default values for options
4822
+ if (!options) {
4823
+ options = {};
4824
+ }
4825
+ const defaults = {
4826
+ requestContentType: "application/json; charset=utf-8",
4827
+ credential: credentials
4828
+ };
4829
+ const packageDetails = `azsdk-js-arm-securitydevops/1.0.0-beta.1`;
4830
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
4831
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
4832
+ : `${packageDetails}`;
4833
+ if (!options.credentialScopes) {
4834
+ options.credentialScopes = ["https://management.azure.com/.default"];
4835
+ }
4836
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
4837
+ userAgentPrefix
4838
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
4839
+ super(optionsWithDefaults);
4840
+ let bearerTokenAuthenticationPolicyFound = false;
4841
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
4842
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
4843
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
4844
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
4845
+ }
4846
+ if (!options ||
4847
+ !options.pipeline ||
4848
+ options.pipeline.getOrderedPolicies().length == 0 ||
4849
+ !bearerTokenAuthenticationPolicyFound) {
4850
+ this.pipeline.removePolicy({
4851
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
4852
+ });
4853
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
4854
+ credential: credentials,
4855
+ scopes: `${optionsWithDefaults.credentialScopes}`,
4856
+ challengeCallbacks: {
4857
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
4858
+ }
4859
+ }));
4860
+ }
4861
+ // Parameter assignments
4862
+ this.subscriptionId = subscriptionId;
4863
+ // Assigning values to Constant parameters
4864
+ this.$host = options.$host || "https://management.azure.com";
4865
+ this.apiVersion = options.apiVersion || "2022-09-01-preview";
4866
+ this.azureDevOpsConnectorOperations = new AzureDevOpsConnectorOperationsImpl(this);
4867
+ this.azureDevOpsRepoOperations = new AzureDevOpsRepoOperationsImpl(this);
4868
+ this.azureDevOpsConnectorStatsOperations = new AzureDevOpsConnectorStatsOperationsImpl(this);
4869
+ this.azureDevOpsOrgOperations = new AzureDevOpsOrgOperationsImpl(this);
4870
+ this.azureDevOpsProjectOperations = new AzureDevOpsProjectOperationsImpl(this);
4871
+ this.gitHubConnectorOperations = new GitHubConnectorOperationsImpl(this);
4872
+ this.gitHubRepoOperations = new GitHubRepoOperationsImpl(this);
4873
+ this.gitHubConnectorStatsOperations = new GitHubConnectorStatsOperationsImpl(this);
4874
+ this.gitHubOwnerOperations = new GitHubOwnerOperationsImpl(this);
4875
+ this.operations = new OperationsImpl(this);
4876
+ this.addCustomApiVersionPolicy(options.apiVersion);
4877
+ }
4878
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
4879
+ addCustomApiVersionPolicy(apiVersion) {
4880
+ if (!apiVersion) {
4881
+ return;
4882
+ }
4883
+ const apiVersionPolicy = {
4884
+ name: "CustomApiVersionPolicy",
4885
+ sendRequest(request, next) {
4886
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4887
+ const param = request.url.split("?");
4888
+ if (param.length > 1) {
4889
+ const newParams = param[1].split("&").map((item) => {
4890
+ if (item.indexOf("api-version") > -1) {
4891
+ return "api-version=" + apiVersion;
4892
+ }
4893
+ else {
4894
+ return item;
4895
+ }
4896
+ });
4897
+ request.url = param[0] + "?" + newParams.join("&");
4898
+ }
4899
+ return next(request);
4900
+ });
4901
+ }
4902
+ };
4903
+ this.pipeline.addPolicy(apiVersionPolicy);
4904
+ }
4905
+ }
4906
+
4907
+ exports.MicrosoftSecurityDevOps = MicrosoftSecurityDevOps;
4908
+ //# sourceMappingURL=index.js.map