@azure/arm-communication 3.0.1 → 4.0.0-alpha.20220608.3

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 (208) hide show
  1. package/CHANGELOG.md +123 -0
  2. package/README.md +1 -1
  3. package/dist/index.js +2392 -473
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/communicationServicesCheckNameAvailabilitySample.d.ts +2 -0
  8. package/dist-esm/samples-dev/communicationServicesCheckNameAvailabilitySample.d.ts.map +1 -0
  9. package/dist-esm/samples-dev/{communicationServiceCheckNameAvailabilitySample.js → communicationServicesCheckNameAvailabilitySample.js} +5 -11
  10. package/dist-esm/samples-dev/communicationServicesCheckNameAvailabilitySample.js.map +1 -0
  11. package/dist-esm/samples-dev/communicationServicesCreateOrUpdateSample.d.ts +2 -0
  12. package/dist-esm/samples-dev/communicationServicesCreateOrUpdateSample.d.ts.map +1 -0
  13. package/dist-esm/samples-dev/{communicationServiceCreateOrUpdateSample.js → communicationServicesCreateOrUpdateSample.js} +3 -6
  14. package/dist-esm/samples-dev/communicationServicesCreateOrUpdateSample.js.map +1 -0
  15. package/dist-esm/samples-dev/communicationServicesDeleteSample.d.ts +2 -0
  16. package/dist-esm/samples-dev/communicationServicesDeleteSample.d.ts.map +1 -0
  17. package/dist-esm/samples-dev/{communicationServiceDeleteSample.js → communicationServicesDeleteSample.js} +3 -3
  18. package/dist-esm/samples-dev/communicationServicesDeleteSample.js.map +1 -0
  19. package/dist-esm/samples-dev/communicationServicesGetSample.d.ts +2 -0
  20. package/dist-esm/samples-dev/communicationServicesGetSample.d.ts.map +1 -0
  21. package/dist-esm/samples-dev/{communicationServiceGetSample.js → communicationServicesGetSample.js} +3 -3
  22. package/dist-esm/samples-dev/communicationServicesGetSample.js.map +1 -0
  23. package/dist-esm/samples-dev/communicationServicesLinkNotificationHubSample.d.ts +2 -0
  24. package/dist-esm/samples-dev/communicationServicesLinkNotificationHubSample.d.ts.map +1 -0
  25. package/dist-esm/samples-dev/{communicationServiceLinkNotificationHubSample.js → communicationServicesLinkNotificationHubSample.js} +3 -3
  26. package/dist-esm/samples-dev/communicationServicesLinkNotificationHubSample.js.map +1 -0
  27. package/dist-esm/samples-dev/communicationServicesListByResourceGroupSample.d.ts +2 -0
  28. package/dist-esm/samples-dev/communicationServicesListByResourceGroupSample.d.ts.map +1 -0
  29. package/dist-esm/samples-dev/{communicationServiceListByResourceGroupSample.js → communicationServicesListByResourceGroupSample.js} +3 -3
  30. package/dist-esm/samples-dev/communicationServicesListByResourceGroupSample.js.map +1 -0
  31. package/dist-esm/samples-dev/communicationServicesListBySubscriptionSample.d.ts +2 -0
  32. package/dist-esm/samples-dev/communicationServicesListBySubscriptionSample.d.ts.map +1 -0
  33. package/dist-esm/samples-dev/{communicationServiceListBySubscriptionSample.js → communicationServicesListBySubscriptionSample.js} +3 -3
  34. package/dist-esm/samples-dev/communicationServicesListBySubscriptionSample.js.map +1 -0
  35. package/dist-esm/samples-dev/communicationServicesListKeysSample.d.ts +2 -0
  36. package/dist-esm/samples-dev/communicationServicesListKeysSample.d.ts.map +1 -0
  37. package/dist-esm/samples-dev/{communicationServiceListKeysSample.js → communicationServicesListKeysSample.js} +3 -3
  38. package/dist-esm/samples-dev/communicationServicesListKeysSample.js.map +1 -0
  39. package/dist-esm/samples-dev/communicationServicesRegenerateKeySample.d.ts +2 -0
  40. package/dist-esm/samples-dev/communicationServicesRegenerateKeySample.d.ts.map +1 -0
  41. package/dist-esm/samples-dev/{communicationServiceRegenerateKeySample.js → communicationServicesRegenerateKeySample.js} +3 -3
  42. package/dist-esm/samples-dev/communicationServicesRegenerateKeySample.js.map +1 -0
  43. package/dist-esm/samples-dev/communicationServicesUpdateSample.d.ts +2 -0
  44. package/dist-esm/samples-dev/communicationServicesUpdateSample.d.ts.map +1 -0
  45. package/dist-esm/samples-dev/{communicationServiceUpdateSample.js → communicationServicesUpdateSample.js} +3 -4
  46. package/dist-esm/samples-dev/communicationServicesUpdateSample.js.map +1 -0
  47. package/dist-esm/samples-dev/domainsCancelVerificationSample.d.ts +2 -0
  48. package/dist-esm/samples-dev/domainsCancelVerificationSample.d.ts.map +1 -0
  49. package/dist-esm/samples-dev/domainsCancelVerificationSample.js +33 -0
  50. package/dist-esm/samples-dev/domainsCancelVerificationSample.js.map +1 -0
  51. package/dist-esm/samples-dev/domainsCreateOrUpdateSample.d.ts +2 -0
  52. package/dist-esm/samples-dev/domainsCreateOrUpdateSample.d.ts.map +1 -0
  53. package/dist-esm/samples-dev/domainsCreateOrUpdateSample.js +36 -0
  54. package/dist-esm/samples-dev/domainsCreateOrUpdateSample.js.map +1 -0
  55. package/dist-esm/samples-dev/domainsDeleteSample.d.ts +2 -0
  56. package/dist-esm/samples-dev/domainsDeleteSample.d.ts.map +1 -0
  57. package/dist-esm/samples-dev/domainsDeleteSample.js +32 -0
  58. package/dist-esm/samples-dev/domainsDeleteSample.js.map +1 -0
  59. package/dist-esm/samples-dev/domainsGetSample.d.ts +2 -0
  60. package/dist-esm/samples-dev/domainsGetSample.d.ts.map +1 -0
  61. package/dist-esm/samples-dev/domainsGetSample.js +32 -0
  62. package/dist-esm/samples-dev/domainsGetSample.js.map +1 -0
  63. package/dist-esm/samples-dev/domainsInitiateVerificationSample.d.ts +2 -0
  64. package/dist-esm/samples-dev/domainsInitiateVerificationSample.d.ts.map +1 -0
  65. package/dist-esm/samples-dev/domainsInitiateVerificationSample.js +33 -0
  66. package/dist-esm/samples-dev/domainsInitiateVerificationSample.js.map +1 -0
  67. package/dist-esm/samples-dev/domainsListByEmailServiceResourceSample.d.ts +2 -0
  68. package/dist-esm/samples-dev/domainsListByEmailServiceResourceSample.d.ts.map +1 -0
  69. package/dist-esm/samples-dev/domainsListByEmailServiceResourceSample.js +45 -0
  70. package/dist-esm/samples-dev/domainsListByEmailServiceResourceSample.js.map +1 -0
  71. package/dist-esm/samples-dev/domainsUpdateSample.d.ts +2 -0
  72. package/dist-esm/samples-dev/domainsUpdateSample.d.ts.map +1 -0
  73. package/dist-esm/samples-dev/domainsUpdateSample.js +36 -0
  74. package/dist-esm/samples-dev/domainsUpdateSample.js.map +1 -0
  75. package/dist-esm/samples-dev/emailServicesCreateOrUpdateSample.d.ts +2 -0
  76. package/dist-esm/samples-dev/emailServicesCreateOrUpdateSample.d.ts.map +1 -0
  77. package/dist-esm/samples-dev/emailServicesCreateOrUpdateSample.js +35 -0
  78. package/dist-esm/samples-dev/emailServicesCreateOrUpdateSample.js.map +1 -0
  79. package/dist-esm/samples-dev/emailServicesDeleteSample.d.ts +2 -0
  80. package/dist-esm/samples-dev/emailServicesDeleteSample.d.ts.map +1 -0
  81. package/dist-esm/samples-dev/emailServicesDeleteSample.js +31 -0
  82. package/dist-esm/samples-dev/emailServicesDeleteSample.js.map +1 -0
  83. package/dist-esm/samples-dev/emailServicesGetSample.d.ts +2 -0
  84. package/dist-esm/samples-dev/emailServicesGetSample.d.ts.map +1 -0
  85. package/dist-esm/samples-dev/emailServicesGetSample.js +31 -0
  86. package/dist-esm/samples-dev/emailServicesGetSample.js.map +1 -0
  87. package/dist-esm/samples-dev/emailServicesListByResourceGroupSample.d.ts +2 -0
  88. package/dist-esm/samples-dev/emailServicesListByResourceGroupSample.d.ts.map +1 -0
  89. package/dist-esm/samples-dev/emailServicesListByResourceGroupSample.js +44 -0
  90. package/dist-esm/samples-dev/emailServicesListByResourceGroupSample.js.map +1 -0
  91. package/dist-esm/samples-dev/emailServicesListBySubscriptionSample.d.ts +2 -0
  92. package/dist-esm/samples-dev/emailServicesListBySubscriptionSample.d.ts.map +1 -0
  93. package/dist-esm/samples-dev/emailServicesListBySubscriptionSample.js +43 -0
  94. package/dist-esm/samples-dev/emailServicesListBySubscriptionSample.js.map +1 -0
  95. package/dist-esm/samples-dev/emailServicesListVerifiedExchangeOnlineDomainsSample.d.ts +2 -0
  96. package/dist-esm/samples-dev/emailServicesListVerifiedExchangeOnlineDomainsSample.d.ts.map +1 -0
  97. package/dist-esm/samples-dev/emailServicesListVerifiedExchangeOnlineDomainsSample.js +29 -0
  98. package/dist-esm/samples-dev/emailServicesListVerifiedExchangeOnlineDomainsSample.js.map +1 -0
  99. package/dist-esm/samples-dev/emailServicesUpdateSample.d.ts +2 -0
  100. package/dist-esm/samples-dev/emailServicesUpdateSample.d.ts.map +1 -0
  101. package/dist-esm/samples-dev/emailServicesUpdateSample.js +32 -0
  102. package/dist-esm/samples-dev/emailServicesUpdateSample.js.map +1 -0
  103. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  104. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  105. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  106. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  107. package/dist-esm/src/communicationServiceManagementClient.d.ts +6 -2
  108. package/dist-esm/src/communicationServiceManagementClient.d.ts.map +1 -1
  109. package/dist-esm/src/communicationServiceManagementClient.js +52 -4
  110. package/dist-esm/src/communicationServiceManagementClient.js.map +1 -1
  111. package/dist-esm/src/models/index.d.ts +547 -75
  112. package/dist-esm/src/models/index.d.ts.map +1 -1
  113. package/dist-esm/src/models/index.js +77 -13
  114. package/dist-esm/src/models/index.js.map +1 -1
  115. package/dist-esm/src/models/mappers.d.ts +29 -6
  116. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  117. package/dist-esm/src/models/mappers.js +549 -58
  118. package/dist-esm/src/models/mappers.js.map +1 -1
  119. package/dist-esm/src/models/parameters.d.ts +8 -0
  120. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  121. package/dist-esm/src/models/parameters.js +59 -6
  122. package/dist-esm/src/models/parameters.js.map +1 -1
  123. package/dist-esm/src/operations/{communicationService.d.ts → communicationServices.d.ts} +39 -18
  124. package/dist-esm/src/operations/communicationServices.d.ts.map +1 -0
  125. package/dist-esm/src/operations/{communicationService.js → communicationServices.js} +128 -17
  126. package/dist-esm/src/operations/communicationServices.js.map +1 -0
  127. package/dist-esm/src/operations/domains.d.ts +138 -0
  128. package/dist-esm/src/operations/domains.d.ts.map +1 -0
  129. package/dist-esm/src/operations/domains.js +607 -0
  130. package/dist-esm/src/operations/domains.js.map +1 -0
  131. package/dist-esm/src/operations/emailServices.d.ts +112 -0
  132. package/dist-esm/src/operations/emailServices.d.ts.map +1 -0
  133. package/dist-esm/src/operations/emailServices.js +534 -0
  134. package/dist-esm/src/operations/emailServices.js.map +1 -0
  135. package/dist-esm/src/operations/index.d.ts +3 -1
  136. package/dist-esm/src/operations/index.d.ts.map +1 -1
  137. package/dist-esm/src/operations/index.js +3 -1
  138. package/dist-esm/src/operations/index.js.map +1 -1
  139. package/dist-esm/src/operationsInterfaces/communicationServices.d.ts +109 -0
  140. package/dist-esm/src/operationsInterfaces/communicationServices.d.ts.map +1 -0
  141. package/dist-esm/src/operationsInterfaces/communicationServices.js +9 -0
  142. package/dist-esm/src/operationsInterfaces/communicationServices.js.map +1 -0
  143. package/dist-esm/src/operationsInterfaces/domains.d.ts +112 -0
  144. package/dist-esm/src/operationsInterfaces/domains.d.ts.map +1 -0
  145. package/dist-esm/src/operationsInterfaces/{communicationService.js → domains.js} +1 -1
  146. package/dist-esm/src/operationsInterfaces/domains.js.map +1 -0
  147. package/dist-esm/src/operationsInterfaces/emailServices.d.ts +76 -0
  148. package/dist-esm/src/operationsInterfaces/emailServices.d.ts.map +1 -0
  149. package/dist-esm/src/operationsInterfaces/emailServices.js +9 -0
  150. package/dist-esm/src/operationsInterfaces/emailServices.js.map +1 -0
  151. package/dist-esm/src/operationsInterfaces/index.d.ts +3 -1
  152. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  153. package/dist-esm/src/operationsInterfaces/index.js +3 -1
  154. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  155. package/dist-esm/test/communication_examples.d.ts.map +1 -1
  156. package/dist-esm/test/communication_examples.js +21 -23
  157. package/dist-esm/test/communication_examples.js.map +1 -1
  158. package/package.json +11 -7
  159. package/review/arm-communication.api.md +528 -96
  160. package/src/communicationServiceManagementClient.ts +78 -6
  161. package/src/models/index.ts +650 -110
  162. package/src/models/mappers.ts +623 -81
  163. package/src/models/parameters.ts +73 -6
  164. package/src/operations/{communicationService.ts → communicationServices.ts} +249 -71
  165. package/src/operations/domains.ts +886 -0
  166. package/src/operations/emailServices.ts +717 -0
  167. package/src/operations/index.ts +3 -1
  168. package/src/operationsInterfaces/{communicationService.ts → communicationServices.ts} +89 -42
  169. package/src/operationsInterfaces/domains.ts +221 -0
  170. package/src/operationsInterfaces/emailServices.ts +148 -0
  171. package/src/operationsInterfaces/index.ts +3 -1
  172. package/types/arm-communication.d.ts +974 -226
  173. package/types/tsdoc-metadata.json +1 -1
  174. package/dist-esm/samples-dev/communicationServiceCheckNameAvailabilitySample.d.ts +0 -2
  175. package/dist-esm/samples-dev/communicationServiceCheckNameAvailabilitySample.d.ts.map +0 -1
  176. package/dist-esm/samples-dev/communicationServiceCheckNameAvailabilitySample.js.map +0 -1
  177. package/dist-esm/samples-dev/communicationServiceCreateOrUpdateSample.d.ts +0 -2
  178. package/dist-esm/samples-dev/communicationServiceCreateOrUpdateSample.d.ts.map +0 -1
  179. package/dist-esm/samples-dev/communicationServiceCreateOrUpdateSample.js.map +0 -1
  180. package/dist-esm/samples-dev/communicationServiceDeleteSample.d.ts +0 -2
  181. package/dist-esm/samples-dev/communicationServiceDeleteSample.d.ts.map +0 -1
  182. package/dist-esm/samples-dev/communicationServiceDeleteSample.js.map +0 -1
  183. package/dist-esm/samples-dev/communicationServiceGetSample.d.ts +0 -2
  184. package/dist-esm/samples-dev/communicationServiceGetSample.d.ts.map +0 -1
  185. package/dist-esm/samples-dev/communicationServiceGetSample.js.map +0 -1
  186. package/dist-esm/samples-dev/communicationServiceLinkNotificationHubSample.d.ts +0 -2
  187. package/dist-esm/samples-dev/communicationServiceLinkNotificationHubSample.d.ts.map +0 -1
  188. package/dist-esm/samples-dev/communicationServiceLinkNotificationHubSample.js.map +0 -1
  189. package/dist-esm/samples-dev/communicationServiceListByResourceGroupSample.d.ts +0 -2
  190. package/dist-esm/samples-dev/communicationServiceListByResourceGroupSample.d.ts.map +0 -1
  191. package/dist-esm/samples-dev/communicationServiceListByResourceGroupSample.js.map +0 -1
  192. package/dist-esm/samples-dev/communicationServiceListBySubscriptionSample.d.ts +0 -2
  193. package/dist-esm/samples-dev/communicationServiceListBySubscriptionSample.d.ts.map +0 -1
  194. package/dist-esm/samples-dev/communicationServiceListBySubscriptionSample.js.map +0 -1
  195. package/dist-esm/samples-dev/communicationServiceListKeysSample.d.ts +0 -2
  196. package/dist-esm/samples-dev/communicationServiceListKeysSample.d.ts.map +0 -1
  197. package/dist-esm/samples-dev/communicationServiceListKeysSample.js.map +0 -1
  198. package/dist-esm/samples-dev/communicationServiceRegenerateKeySample.d.ts +0 -2
  199. package/dist-esm/samples-dev/communicationServiceRegenerateKeySample.d.ts.map +0 -1
  200. package/dist-esm/samples-dev/communicationServiceRegenerateKeySample.js.map +0 -1
  201. package/dist-esm/samples-dev/communicationServiceUpdateSample.d.ts +0 -2
  202. package/dist-esm/samples-dev/communicationServiceUpdateSample.d.ts.map +0 -1
  203. package/dist-esm/samples-dev/communicationServiceUpdateSample.js.map +0 -1
  204. package/dist-esm/src/operations/communicationService.d.ts.map +0 -1
  205. package/dist-esm/src/operations/communicationService.js.map +0 -1
  206. package/dist-esm/src/operationsInterfaces/communicationService.d.ts +0 -88
  207. package/dist-esm/src/operationsInterfaces/communicationService.d.ts.map +0 -1
  208. package/dist-esm/src/operationsInterfaces/communicationService.js.map +0 -1
package/dist/index.js CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var coreClient = require('@azure/core-client');
6
5
  var tslib = require('tslib');
6
+ var coreClient = require('@azure/core-client');
7
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
7
8
  var coreLro = require('@azure/core-lro');
8
9
 
9
10
  function _interopNamespace(e) {
@@ -25,6 +26,7 @@ function _interopNamespace(e) {
25
26
  }
26
27
 
27
28
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
28
30
 
29
31
  /*
30
32
  * Copyright (c) Microsoft Corporation.
@@ -45,19 +47,25 @@ exports.KnownActionType = void 0;
45
47
  (function (KnownActionType) {
46
48
  KnownActionType["Internal"] = "Internal";
47
49
  })(exports.KnownActionType || (exports.KnownActionType = {}));
48
- /** Known values of {@link ProvisioningState} that the service accepts. */
49
- exports.KnownProvisioningState = void 0;
50
- (function (KnownProvisioningState) {
51
- KnownProvisioningState["Unknown"] = "Unknown";
52
- KnownProvisioningState["Succeeded"] = "Succeeded";
53
- KnownProvisioningState["Failed"] = "Failed";
54
- KnownProvisioningState["Canceled"] = "Canceled";
55
- KnownProvisioningState["Running"] = "Running";
56
- KnownProvisioningState["Creating"] = "Creating";
57
- KnownProvisioningState["Updating"] = "Updating";
58
- KnownProvisioningState["Deleting"] = "Deleting";
59
- KnownProvisioningState["Moving"] = "Moving";
60
- })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
50
+ /** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */
51
+ exports.KnownCheckNameAvailabilityReason = void 0;
52
+ (function (KnownCheckNameAvailabilityReason) {
53
+ KnownCheckNameAvailabilityReason["Invalid"] = "Invalid";
54
+ KnownCheckNameAvailabilityReason["AlreadyExists"] = "AlreadyExists";
55
+ })(exports.KnownCheckNameAvailabilityReason || (exports.KnownCheckNameAvailabilityReason = {}));
56
+ /** Known values of {@link CommunicationServicesProvisioningState} that the service accepts. */
57
+ exports.KnownCommunicationServicesProvisioningState = void 0;
58
+ (function (KnownCommunicationServicesProvisioningState) {
59
+ KnownCommunicationServicesProvisioningState["Unknown"] = "Unknown";
60
+ KnownCommunicationServicesProvisioningState["Succeeded"] = "Succeeded";
61
+ KnownCommunicationServicesProvisioningState["Failed"] = "Failed";
62
+ KnownCommunicationServicesProvisioningState["Canceled"] = "Canceled";
63
+ KnownCommunicationServicesProvisioningState["Running"] = "Running";
64
+ KnownCommunicationServicesProvisioningState["Creating"] = "Creating";
65
+ KnownCommunicationServicesProvisioningState["Updating"] = "Updating";
66
+ KnownCommunicationServicesProvisioningState["Deleting"] = "Deleting";
67
+ KnownCommunicationServicesProvisioningState["Moving"] = "Moving";
68
+ })(exports.KnownCommunicationServicesProvisioningState || (exports.KnownCommunicationServicesProvisioningState = {}));
61
69
  /** Known values of {@link CreatedByType} that the service accepts. */
62
70
  exports.KnownCreatedByType = void 0;
63
71
  (function (KnownCreatedByType) {
@@ -66,6 +74,64 @@ exports.KnownCreatedByType = void 0;
66
74
  KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
67
75
  KnownCreatedByType["Key"] = "Key";
68
76
  })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
77
+ /** Known values of {@link DomainsProvisioningState} that the service accepts. */
78
+ exports.KnownDomainsProvisioningState = void 0;
79
+ (function (KnownDomainsProvisioningState) {
80
+ KnownDomainsProvisioningState["Unknown"] = "Unknown";
81
+ KnownDomainsProvisioningState["Succeeded"] = "Succeeded";
82
+ KnownDomainsProvisioningState["Failed"] = "Failed";
83
+ KnownDomainsProvisioningState["Canceled"] = "Canceled";
84
+ KnownDomainsProvisioningState["Running"] = "Running";
85
+ KnownDomainsProvisioningState["Creating"] = "Creating";
86
+ KnownDomainsProvisioningState["Updating"] = "Updating";
87
+ KnownDomainsProvisioningState["Deleting"] = "Deleting";
88
+ KnownDomainsProvisioningState["Moving"] = "Moving";
89
+ })(exports.KnownDomainsProvisioningState || (exports.KnownDomainsProvisioningState = {}));
90
+ /** Known values of {@link DomainManagement} that the service accepts. */
91
+ exports.KnownDomainManagement = void 0;
92
+ (function (KnownDomainManagement) {
93
+ KnownDomainManagement["AzureManaged"] = "AzureManaged";
94
+ KnownDomainManagement["CustomerManaged"] = "CustomerManaged";
95
+ KnownDomainManagement["CustomerManagedInExchangeOnline"] = "CustomerManagedInExchangeOnline";
96
+ })(exports.KnownDomainManagement || (exports.KnownDomainManagement = {}));
97
+ /** Known values of {@link VerificationStatus} that the service accepts. */
98
+ exports.KnownVerificationStatus = void 0;
99
+ (function (KnownVerificationStatus) {
100
+ KnownVerificationStatus["NotStarted"] = "NotStarted";
101
+ KnownVerificationStatus["VerificationRequested"] = "VerificationRequested";
102
+ KnownVerificationStatus["VerificationInProgress"] = "VerificationInProgress";
103
+ KnownVerificationStatus["VerificationFailed"] = "VerificationFailed";
104
+ KnownVerificationStatus["Verified"] = "Verified";
105
+ KnownVerificationStatus["CancellationRequested"] = "CancellationRequested";
106
+ })(exports.KnownVerificationStatus || (exports.KnownVerificationStatus = {}));
107
+ /** Known values of {@link UserEngagementTracking} that the service accepts. */
108
+ exports.KnownUserEngagementTracking = void 0;
109
+ (function (KnownUserEngagementTracking) {
110
+ KnownUserEngagementTracking["Disabled"] = "Disabled";
111
+ KnownUserEngagementTracking["Enabled"] = "Enabled";
112
+ })(exports.KnownUserEngagementTracking || (exports.KnownUserEngagementTracking = {}));
113
+ /** Known values of {@link VerificationType} that the service accepts. */
114
+ exports.KnownVerificationType = void 0;
115
+ (function (KnownVerificationType) {
116
+ KnownVerificationType["Domain"] = "Domain";
117
+ KnownVerificationType["SPF"] = "SPF";
118
+ KnownVerificationType["Dkim"] = "DKIM";
119
+ KnownVerificationType["Dkim2"] = "DKIM2";
120
+ KnownVerificationType["Dmarc"] = "DMARC";
121
+ })(exports.KnownVerificationType || (exports.KnownVerificationType = {}));
122
+ /** Known values of {@link EmailServicesProvisioningState} that the service accepts. */
123
+ exports.KnownEmailServicesProvisioningState = void 0;
124
+ (function (KnownEmailServicesProvisioningState) {
125
+ KnownEmailServicesProvisioningState["Unknown"] = "Unknown";
126
+ KnownEmailServicesProvisioningState["Succeeded"] = "Succeeded";
127
+ KnownEmailServicesProvisioningState["Failed"] = "Failed";
128
+ KnownEmailServicesProvisioningState["Canceled"] = "Canceled";
129
+ KnownEmailServicesProvisioningState["Running"] = "Running";
130
+ KnownEmailServicesProvisioningState["Creating"] = "Creating";
131
+ KnownEmailServicesProvisioningState["Updating"] = "Updating";
132
+ KnownEmailServicesProvisioningState["Deleting"] = "Deleting";
133
+ KnownEmailServicesProvisioningState["Moving"] = "Moving";
134
+ })(exports.KnownEmailServicesProvisioningState || (exports.KnownEmailServicesProvisioningState = {}));
69
135
 
70
136
  /*
71
137
  * Copyright (c) Microsoft Corporation.
@@ -274,21 +340,19 @@ const ErrorAdditionalInfo = {
274
340
  }
275
341
  }
276
342
  };
277
- const NameAvailabilityParameters = {
343
+ const CheckNameAvailabilityRequest = {
278
344
  type: {
279
345
  name: "Composite",
280
- className: "NameAvailabilityParameters",
346
+ className: "CheckNameAvailabilityRequest",
281
347
  modelProperties: {
282
- type: {
283
- serializedName: "type",
284
- required: true,
348
+ name: {
349
+ serializedName: "name",
285
350
  type: {
286
351
  name: "String"
287
352
  }
288
353
  },
289
- name: {
290
- serializedName: "name",
291
- required: true,
354
+ type: {
355
+ serializedName: "type",
292
356
  type: {
293
357
  name: "String"
294
358
  }
@@ -296,10 +360,10 @@ const NameAvailabilityParameters = {
296
360
  }
297
361
  }
298
362
  };
299
- const NameAvailability = {
363
+ const CheckNameAvailabilityResponse = {
300
364
  type: {
301
365
  name: "Composite",
302
- className: "NameAvailability",
366
+ className: "CheckNameAvailabilityResponse",
303
367
  modelProperties: {
304
368
  nameAvailable: {
305
369
  serializedName: "nameAvailable",
@@ -384,6 +448,42 @@ const CommunicationServiceResourceList = {
384
448
  }
385
449
  }
386
450
  };
451
+ const Resource = {
452
+ type: {
453
+ name: "Composite",
454
+ className: "Resource",
455
+ modelProperties: {
456
+ id: {
457
+ serializedName: "id",
458
+ readOnly: true,
459
+ type: {
460
+ name: "String"
461
+ }
462
+ },
463
+ name: {
464
+ serializedName: "name",
465
+ readOnly: true,
466
+ type: {
467
+ name: "String"
468
+ }
469
+ },
470
+ type: {
471
+ serializedName: "type",
472
+ readOnly: true,
473
+ type: {
474
+ name: "String"
475
+ }
476
+ },
477
+ systemData: {
478
+ serializedName: "systemData",
479
+ type: {
480
+ name: "Composite",
481
+ className: "SystemData"
482
+ }
483
+ }
484
+ }
485
+ }
486
+ };
387
487
  const SystemData = {
388
488
  type: {
389
489
  name: "Composite",
@@ -428,49 +528,6 @@ const SystemData = {
428
528
  }
429
529
  }
430
530
  };
431
- const Resource = {
432
- type: {
433
- name: "Composite",
434
- className: "Resource",
435
- modelProperties: {
436
- id: {
437
- serializedName: "id",
438
- readOnly: true,
439
- type: {
440
- name: "String"
441
- }
442
- },
443
- name: {
444
- serializedName: "name",
445
- readOnly: true,
446
- type: {
447
- name: "String"
448
- }
449
- },
450
- type: {
451
- serializedName: "type",
452
- readOnly: true,
453
- type: {
454
- name: "String"
455
- }
456
- }
457
- }
458
- }
459
- };
460
- const LocationResource = {
461
- type: {
462
- name: "Composite",
463
- className: "LocationResource",
464
- modelProperties: {
465
- location: {
466
- serializedName: "location",
467
- type: {
468
- name: "String"
469
- }
470
- }
471
- }
472
- }
473
- };
474
531
  const TaggedResource = {
475
532
  type: {
476
533
  name: "Composite",
@@ -533,61 +590,169 @@ const RegenerateKeyParameters = {
533
590
  }
534
591
  }
535
592
  };
536
- const CommunicationServiceResource = {
593
+ const DomainPropertiesVerificationStates = {
537
594
  type: {
538
595
  name: "Composite",
539
- className: "CommunicationServiceResource",
540
- modelProperties: Object.assign(Object.assign(Object.assign(Object.assign({}, Resource.type.modelProperties), LocationResource.type.modelProperties), TaggedResource.type.modelProperties), { systemData: {
541
- serializedName: "systemData",
596
+ className: "DomainPropertiesVerificationStates",
597
+ modelProperties: {
598
+ domain: {
599
+ serializedName: "Domain",
542
600
  type: {
543
601
  name: "Composite",
544
- className: "SystemData"
602
+ className: "VerificationStatusRecord"
545
603
  }
546
- }, provisioningState: {
547
- serializedName: "properties.provisioningState",
604
+ },
605
+ spf: {
606
+ serializedName: "SPF",
607
+ type: {
608
+ name: "Composite",
609
+ className: "VerificationStatusRecord"
610
+ }
611
+ },
612
+ dkim: {
613
+ serializedName: "DKIM",
614
+ type: {
615
+ name: "Composite",
616
+ className: "VerificationStatusRecord"
617
+ }
618
+ },
619
+ dkim2: {
620
+ serializedName: "DKIM2",
621
+ type: {
622
+ name: "Composite",
623
+ className: "VerificationStatusRecord"
624
+ }
625
+ },
626
+ dmarc: {
627
+ serializedName: "DMARC",
628
+ type: {
629
+ name: "Composite",
630
+ className: "VerificationStatusRecord"
631
+ }
632
+ }
633
+ }
634
+ }
635
+ };
636
+ const VerificationStatusRecord = {
637
+ type: {
638
+ name: "Composite",
639
+ className: "VerificationStatusRecord",
640
+ modelProperties: {
641
+ status: {
642
+ serializedName: "status",
548
643
  readOnly: true,
549
644
  type: {
550
645
  name: "String"
551
646
  }
552
- }, hostName: {
553
- serializedName: "properties.hostName",
647
+ },
648
+ errorCode: {
649
+ serializedName: "errorCode",
554
650
  readOnly: true,
555
651
  type: {
556
652
  name: "String"
557
653
  }
558
- }, dataLocation: {
559
- serializedName: "properties.dataLocation",
654
+ }
655
+ }
656
+ }
657
+ };
658
+ const DomainPropertiesVerificationRecords = {
659
+ type: {
660
+ name: "Composite",
661
+ className: "DomainPropertiesVerificationRecords",
662
+ modelProperties: {
663
+ domain: {
664
+ serializedName: "Domain",
560
665
  type: {
561
- name: "String"
666
+ name: "Composite",
667
+ className: "DnsRecord"
562
668
  }
563
- }, notificationHubId: {
564
- serializedName: "properties.notificationHubId",
669
+ },
670
+ spf: {
671
+ serializedName: "SPF",
672
+ type: {
673
+ name: "Composite",
674
+ className: "DnsRecord"
675
+ }
676
+ },
677
+ dkim: {
678
+ serializedName: "DKIM",
679
+ type: {
680
+ name: "Composite",
681
+ className: "DnsRecord"
682
+ }
683
+ },
684
+ dkim2: {
685
+ serializedName: "DKIM2",
686
+ type: {
687
+ name: "Composite",
688
+ className: "DnsRecord"
689
+ }
690
+ },
691
+ dmarc: {
692
+ serializedName: "DMARC",
693
+ type: {
694
+ name: "Composite",
695
+ className: "DnsRecord"
696
+ }
697
+ }
698
+ }
699
+ }
700
+ };
701
+ const DnsRecord = {
702
+ type: {
703
+ name: "Composite",
704
+ className: "DnsRecord",
705
+ modelProperties: {
706
+ type: {
707
+ serializedName: "type",
565
708
  readOnly: true,
566
709
  type: {
567
710
  name: "String"
568
711
  }
569
- }, version: {
570
- serializedName: "properties.version",
712
+ },
713
+ name: {
714
+ serializedName: "name",
571
715
  readOnly: true,
572
716
  type: {
573
717
  name: "String"
574
718
  }
575
- }, immutableResourceId: {
576
- serializedName: "properties.immutableResourceId",
719
+ },
720
+ value: {
721
+ serializedName: "value",
577
722
  readOnly: true,
578
723
  type: {
579
724
  name: "String"
580
725
  }
581
- } })
726
+ },
727
+ ttl: {
728
+ serializedName: "ttl",
729
+ readOnly: true,
730
+ type: {
731
+ name: "Number"
732
+ }
733
+ }
734
+ }
582
735
  }
583
736
  };
584
- const CommunicationServiceCreateOrUpdateHeaders = {
737
+ const DomainResourceList = {
585
738
  type: {
586
739
  name: "Composite",
587
- className: "CommunicationServiceCreateOrUpdateHeaders",
740
+ className: "DomainResourceList",
588
741
  modelProperties: {
589
- azureAsyncOperation: {
590
- serializedName: "azure-asyncoperation",
742
+ value: {
743
+ serializedName: "value",
744
+ type: {
745
+ name: "Sequence",
746
+ element: {
747
+ type: {
748
+ name: "Composite",
749
+ className: "DomainResource"
750
+ }
751
+ }
752
+ }
753
+ },
754
+ nextLink: {
755
+ serializedName: "nextLink",
591
756
  type: {
592
757
  name: "String"
593
758
  }
@@ -595,13 +760,14 @@ const CommunicationServiceCreateOrUpdateHeaders = {
595
760
  }
596
761
  }
597
762
  };
598
- const CommunicationServiceDeleteHeaders = {
763
+ const VerificationParameter = {
599
764
  type: {
600
765
  name: "Composite",
601
- className: "CommunicationServiceDeleteHeaders",
766
+ className: "VerificationParameter",
602
767
  modelProperties: {
603
- location: {
604
- serializedName: "location",
768
+ verificationType: {
769
+ serializedName: "verificationType",
770
+ required: true,
605
771
  type: {
606
772
  name: "String"
607
773
  }
@@ -609,150 +775,1440 @@ const CommunicationServiceDeleteHeaders = {
609
775
  }
610
776
  }
611
777
  };
612
-
613
- var Mappers = /*#__PURE__*/Object.freeze({
614
- __proto__: null,
615
- OperationListResult: OperationListResult,
616
- Operation: Operation,
617
- OperationDisplay: OperationDisplay,
618
- ErrorResponse: ErrorResponse,
619
- ErrorDetail: ErrorDetail,
620
- ErrorAdditionalInfo: ErrorAdditionalInfo,
621
- NameAvailabilityParameters: NameAvailabilityParameters,
622
- NameAvailability: NameAvailability,
623
- LinkNotificationHubParameters: LinkNotificationHubParameters,
624
- LinkedNotificationHub: LinkedNotificationHub,
625
- CommunicationServiceResourceList: CommunicationServiceResourceList,
626
- SystemData: SystemData,
627
- Resource: Resource,
628
- LocationResource: LocationResource,
629
- TaggedResource: TaggedResource,
630
- CommunicationServiceKeys: CommunicationServiceKeys,
631
- RegenerateKeyParameters: RegenerateKeyParameters,
632
- CommunicationServiceResource: CommunicationServiceResource,
633
- CommunicationServiceCreateOrUpdateHeaders: CommunicationServiceCreateOrUpdateHeaders,
634
- CommunicationServiceDeleteHeaders: CommunicationServiceDeleteHeaders
635
- });
636
-
637
- /*
638
- * Copyright (c) Microsoft Corporation.
639
- * Licensed under the MIT License.
640
- *
641
- * Code generated by Microsoft (R) AutoRest Code Generator.
642
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
643
- */
644
- const accept = {
645
- parameterPath: "accept",
646
- mapper: {
647
- defaultValue: "application/json",
648
- isConstant: true,
649
- serializedName: "Accept",
650
- type: {
651
- name: "String"
778
+ const EmailServiceResourceList = {
779
+ type: {
780
+ name: "Composite",
781
+ className: "EmailServiceResourceList",
782
+ modelProperties: {
783
+ value: {
784
+ serializedName: "value",
785
+ type: {
786
+ name: "Sequence",
787
+ element: {
788
+ type: {
789
+ name: "Composite",
790
+ className: "EmailServiceResource"
791
+ }
792
+ }
793
+ }
794
+ },
795
+ nextLink: {
796
+ serializedName: "nextLink",
797
+ type: {
798
+ name: "String"
799
+ }
800
+ }
652
801
  }
653
802
  }
654
803
  };
655
- const $host = {
656
- parameterPath: "$host",
657
- mapper: {
658
- serializedName: "$host",
659
- required: true,
804
+ const NameAvailabilityParameters = {
805
+ type: {
806
+ name: "Composite",
807
+ className: "NameAvailabilityParameters",
808
+ modelProperties: Object.assign({}, CheckNameAvailabilityRequest.type.modelProperties)
809
+ }
810
+ };
811
+ const TrackedResource = {
812
+ type: {
813
+ name: "Composite",
814
+ className: "TrackedResource",
815
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { tags: {
816
+ serializedName: "tags",
817
+ type: {
818
+ name: "Dictionary",
819
+ value: { type: { name: "String" } }
820
+ }
821
+ }, location: {
822
+ serializedName: "location",
823
+ required: true,
824
+ type: {
825
+ name: "String"
826
+ }
827
+ } })
828
+ }
829
+ };
830
+ const CommunicationServiceResourceUpdate = {
831
+ type: {
832
+ name: "Composite",
833
+ className: "CommunicationServiceResourceUpdate",
834
+ modelProperties: Object.assign(Object.assign({}, TaggedResource.type.modelProperties), { linkedDomains: {
835
+ serializedName: "properties.linkedDomains",
836
+ type: {
837
+ name: "Sequence",
838
+ element: {
839
+ type: {
840
+ name: "String"
841
+ }
842
+ }
843
+ }
844
+ } })
845
+ }
846
+ };
847
+ const UpdateDomainRequestParameters = {
848
+ type: {
849
+ name: "Composite",
850
+ className: "UpdateDomainRequestParameters",
851
+ modelProperties: Object.assign(Object.assign({}, TaggedResource.type.modelProperties), { validSenderUsernames: {
852
+ serializedName: "properties.validSenderUsernames",
853
+ type: {
854
+ name: "Dictionary",
855
+ value: { type: { name: "String" } }
856
+ }
857
+ }, userEngagementTracking: {
858
+ serializedName: "properties.userEngagementTracking",
859
+ type: {
860
+ name: "String"
861
+ }
862
+ } })
863
+ }
864
+ };
865
+ const EmailServiceResourceUpdate = {
866
+ type: {
867
+ name: "Composite",
868
+ className: "EmailServiceResourceUpdate",
869
+ modelProperties: Object.assign({}, TaggedResource.type.modelProperties)
870
+ }
871
+ };
872
+ const CommunicationServiceResource = {
873
+ type: {
874
+ name: "Composite",
875
+ className: "CommunicationServiceResource",
876
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { provisioningState: {
877
+ serializedName: "properties.provisioningState",
878
+ readOnly: true,
879
+ type: {
880
+ name: "String"
881
+ }
882
+ }, hostName: {
883
+ serializedName: "properties.hostName",
884
+ readOnly: true,
885
+ type: {
886
+ name: "String"
887
+ }
888
+ }, dataLocation: {
889
+ serializedName: "properties.dataLocation",
890
+ type: {
891
+ name: "String"
892
+ }
893
+ }, notificationHubId: {
894
+ serializedName: "properties.notificationHubId",
895
+ readOnly: true,
896
+ type: {
897
+ name: "String"
898
+ }
899
+ }, version: {
900
+ serializedName: "properties.version",
901
+ readOnly: true,
902
+ type: {
903
+ name: "String"
904
+ }
905
+ }, immutableResourceId: {
906
+ serializedName: "properties.immutableResourceId",
907
+ readOnly: true,
908
+ type: {
909
+ name: "String"
910
+ }
911
+ }, linkedDomains: {
912
+ serializedName: "properties.linkedDomains",
913
+ type: {
914
+ name: "Sequence",
915
+ element: {
916
+ type: {
917
+ name: "String"
918
+ }
919
+ }
920
+ }
921
+ } })
922
+ }
923
+ };
924
+ const DomainResource = {
925
+ type: {
926
+ name: "Composite",
927
+ className: "DomainResource",
928
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { provisioningState: {
929
+ serializedName: "properties.provisioningState",
930
+ readOnly: true,
931
+ type: {
932
+ name: "String"
933
+ }
934
+ }, dataLocation: {
935
+ serializedName: "properties.dataLocation",
936
+ readOnly: true,
937
+ type: {
938
+ name: "String"
939
+ }
940
+ }, fromSenderDomain: {
941
+ serializedName: "properties.fromSenderDomain",
942
+ readOnly: true,
943
+ type: {
944
+ name: "String"
945
+ }
946
+ }, mailFromSenderDomain: {
947
+ serializedName: "properties.mailFromSenderDomain",
948
+ readOnly: true,
949
+ type: {
950
+ name: "String"
951
+ }
952
+ }, domainManagement: {
953
+ serializedName: "properties.domainManagement",
954
+ type: {
955
+ name: "String"
956
+ }
957
+ }, verificationStates: {
958
+ serializedName: "properties.verificationStates",
959
+ type: {
960
+ name: "Composite",
961
+ className: "DomainPropertiesVerificationStates"
962
+ }
963
+ }, verificationRecords: {
964
+ serializedName: "properties.verificationRecords",
965
+ type: {
966
+ name: "Composite",
967
+ className: "DomainPropertiesVerificationRecords"
968
+ }
969
+ }, validSenderUsernames: {
970
+ serializedName: "properties.validSenderUsernames",
971
+ type: {
972
+ name: "Dictionary",
973
+ value: { type: { name: "String" } }
974
+ }
975
+ }, userEngagementTracking: {
976
+ serializedName: "properties.userEngagementTracking",
977
+ type: {
978
+ name: "String"
979
+ }
980
+ } })
981
+ }
982
+ };
983
+ const EmailServiceResource = {
984
+ type: {
985
+ name: "Composite",
986
+ className: "EmailServiceResource",
987
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { provisioningState: {
988
+ serializedName: "properties.provisioningState",
989
+ readOnly: true,
990
+ type: {
991
+ name: "String"
992
+ }
993
+ }, dataLocation: {
994
+ serializedName: "properties.dataLocation",
995
+ type: {
996
+ name: "String"
997
+ }
998
+ } })
999
+ }
1000
+ };
1001
+ const CommunicationServicesUpdateHeaders = {
1002
+ type: {
1003
+ name: "Composite",
1004
+ className: "CommunicationServicesUpdateHeaders",
1005
+ modelProperties: {
1006
+ azureAsyncOperation: {
1007
+ serializedName: "azure-asyncoperation",
1008
+ type: {
1009
+ name: "String"
1010
+ }
1011
+ }
1012
+ }
1013
+ }
1014
+ };
1015
+ const CommunicationServicesCreateOrUpdateHeaders = {
1016
+ type: {
1017
+ name: "Composite",
1018
+ className: "CommunicationServicesCreateOrUpdateHeaders",
1019
+ modelProperties: {
1020
+ azureAsyncOperation: {
1021
+ serializedName: "azure-asyncoperation",
1022
+ type: {
1023
+ name: "String"
1024
+ }
1025
+ }
1026
+ }
1027
+ }
1028
+ };
1029
+ const CommunicationServicesDeleteHeaders = {
1030
+ type: {
1031
+ name: "Composite",
1032
+ className: "CommunicationServicesDeleteHeaders",
1033
+ modelProperties: {
1034
+ location: {
1035
+ serializedName: "location",
1036
+ type: {
1037
+ name: "String"
1038
+ }
1039
+ }
1040
+ }
1041
+ }
1042
+ };
1043
+ const CommunicationServicesRegenerateKeyHeaders = {
1044
+ type: {
1045
+ name: "Composite",
1046
+ className: "CommunicationServicesRegenerateKeyHeaders",
1047
+ modelProperties: {
1048
+ azureAsyncOperation: {
1049
+ serializedName: "azure-asyncoperation",
1050
+ type: {
1051
+ name: "String"
1052
+ }
1053
+ }
1054
+ }
1055
+ }
1056
+ };
1057
+ const DomainsCreateOrUpdateHeaders = {
1058
+ type: {
1059
+ name: "Composite",
1060
+ className: "DomainsCreateOrUpdateHeaders",
1061
+ modelProperties: {
1062
+ azureAsyncOperation: {
1063
+ serializedName: "azure-asyncoperation",
1064
+ type: {
1065
+ name: "String"
1066
+ }
1067
+ }
1068
+ }
1069
+ }
1070
+ };
1071
+ const DomainsDeleteHeaders = {
1072
+ type: {
1073
+ name: "Composite",
1074
+ className: "DomainsDeleteHeaders",
1075
+ modelProperties: {
1076
+ location: {
1077
+ serializedName: "location",
1078
+ type: {
1079
+ name: "String"
1080
+ }
1081
+ }
1082
+ }
1083
+ }
1084
+ };
1085
+ const DomainsUpdateHeaders = {
1086
+ type: {
1087
+ name: "Composite",
1088
+ className: "DomainsUpdateHeaders",
1089
+ modelProperties: {
1090
+ azureAsyncOperation: {
1091
+ serializedName: "azure-asyncoperation",
1092
+ type: {
1093
+ name: "String"
1094
+ }
1095
+ }
1096
+ }
1097
+ }
1098
+ };
1099
+ const DomainsInitiateVerificationHeaders = {
1100
+ type: {
1101
+ name: "Composite",
1102
+ className: "DomainsInitiateVerificationHeaders",
1103
+ modelProperties: {
1104
+ location: {
1105
+ serializedName: "location",
1106
+ type: {
1107
+ name: "String"
1108
+ }
1109
+ }
1110
+ }
1111
+ }
1112
+ };
1113
+ const DomainsCancelVerificationHeaders = {
1114
+ type: {
1115
+ name: "Composite",
1116
+ className: "DomainsCancelVerificationHeaders",
1117
+ modelProperties: {
1118
+ location: {
1119
+ serializedName: "location",
1120
+ type: {
1121
+ name: "String"
1122
+ }
1123
+ }
1124
+ }
1125
+ }
1126
+ };
1127
+ const EmailServicesCreateOrUpdateHeaders = {
1128
+ type: {
1129
+ name: "Composite",
1130
+ className: "EmailServicesCreateOrUpdateHeaders",
1131
+ modelProperties: {
1132
+ azureAsyncOperation: {
1133
+ serializedName: "azure-asyncoperation",
1134
+ type: {
1135
+ name: "String"
1136
+ }
1137
+ }
1138
+ }
1139
+ }
1140
+ };
1141
+ const EmailServicesDeleteHeaders = {
1142
+ type: {
1143
+ name: "Composite",
1144
+ className: "EmailServicesDeleteHeaders",
1145
+ modelProperties: {
1146
+ location: {
1147
+ serializedName: "location",
1148
+ type: {
1149
+ name: "String"
1150
+ }
1151
+ }
1152
+ }
1153
+ }
1154
+ };
1155
+ const EmailServicesUpdateHeaders = {
1156
+ type: {
1157
+ name: "Composite",
1158
+ className: "EmailServicesUpdateHeaders",
1159
+ modelProperties: {
1160
+ azureAsyncOperation: {
1161
+ serializedName: "azure-asyncoperation",
1162
+ type: {
1163
+ name: "String"
1164
+ }
1165
+ }
1166
+ }
1167
+ }
1168
+ };
1169
+
1170
+ var Mappers = /*#__PURE__*/Object.freeze({
1171
+ __proto__: null,
1172
+ OperationListResult: OperationListResult,
1173
+ Operation: Operation,
1174
+ OperationDisplay: OperationDisplay,
1175
+ ErrorResponse: ErrorResponse,
1176
+ ErrorDetail: ErrorDetail,
1177
+ ErrorAdditionalInfo: ErrorAdditionalInfo,
1178
+ CheckNameAvailabilityRequest: CheckNameAvailabilityRequest,
1179
+ CheckNameAvailabilityResponse: CheckNameAvailabilityResponse,
1180
+ LinkNotificationHubParameters: LinkNotificationHubParameters,
1181
+ LinkedNotificationHub: LinkedNotificationHub,
1182
+ CommunicationServiceResourceList: CommunicationServiceResourceList,
1183
+ Resource: Resource,
1184
+ SystemData: SystemData,
1185
+ TaggedResource: TaggedResource,
1186
+ CommunicationServiceKeys: CommunicationServiceKeys,
1187
+ RegenerateKeyParameters: RegenerateKeyParameters,
1188
+ DomainPropertiesVerificationStates: DomainPropertiesVerificationStates,
1189
+ VerificationStatusRecord: VerificationStatusRecord,
1190
+ DomainPropertiesVerificationRecords: DomainPropertiesVerificationRecords,
1191
+ DnsRecord: DnsRecord,
1192
+ DomainResourceList: DomainResourceList,
1193
+ VerificationParameter: VerificationParameter,
1194
+ EmailServiceResourceList: EmailServiceResourceList,
1195
+ NameAvailabilityParameters: NameAvailabilityParameters,
1196
+ TrackedResource: TrackedResource,
1197
+ CommunicationServiceResourceUpdate: CommunicationServiceResourceUpdate,
1198
+ UpdateDomainRequestParameters: UpdateDomainRequestParameters,
1199
+ EmailServiceResourceUpdate: EmailServiceResourceUpdate,
1200
+ CommunicationServiceResource: CommunicationServiceResource,
1201
+ DomainResource: DomainResource,
1202
+ EmailServiceResource: EmailServiceResource,
1203
+ CommunicationServicesUpdateHeaders: CommunicationServicesUpdateHeaders,
1204
+ CommunicationServicesCreateOrUpdateHeaders: CommunicationServicesCreateOrUpdateHeaders,
1205
+ CommunicationServicesDeleteHeaders: CommunicationServicesDeleteHeaders,
1206
+ CommunicationServicesRegenerateKeyHeaders: CommunicationServicesRegenerateKeyHeaders,
1207
+ DomainsCreateOrUpdateHeaders: DomainsCreateOrUpdateHeaders,
1208
+ DomainsDeleteHeaders: DomainsDeleteHeaders,
1209
+ DomainsUpdateHeaders: DomainsUpdateHeaders,
1210
+ DomainsInitiateVerificationHeaders: DomainsInitiateVerificationHeaders,
1211
+ DomainsCancelVerificationHeaders: DomainsCancelVerificationHeaders,
1212
+ EmailServicesCreateOrUpdateHeaders: EmailServicesCreateOrUpdateHeaders,
1213
+ EmailServicesDeleteHeaders: EmailServicesDeleteHeaders,
1214
+ EmailServicesUpdateHeaders: EmailServicesUpdateHeaders
1215
+ });
1216
+
1217
+ /*
1218
+ * Copyright (c) Microsoft Corporation.
1219
+ * Licensed under the MIT License.
1220
+ *
1221
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1222
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1223
+ */
1224
+ const accept = {
1225
+ parameterPath: "accept",
1226
+ mapper: {
1227
+ defaultValue: "application/json",
1228
+ isConstant: true,
1229
+ serializedName: "Accept",
660
1230
  type: {
661
1231
  name: "String"
662
1232
  }
1233
+ }
1234
+ };
1235
+ const $host = {
1236
+ parameterPath: "$host",
1237
+ mapper: {
1238
+ serializedName: "$host",
1239
+ required: true,
1240
+ type: {
1241
+ name: "String"
1242
+ }
1243
+ },
1244
+ skipEncoding: true
1245
+ };
1246
+ const apiVersion = {
1247
+ parameterPath: "apiVersion",
1248
+ mapper: {
1249
+ defaultValue: "2021-10-01-preview",
1250
+ isConstant: true,
1251
+ serializedName: "api-version",
1252
+ type: {
1253
+ name: "String"
1254
+ }
1255
+ }
1256
+ };
1257
+ const nextLink = {
1258
+ parameterPath: "nextLink",
1259
+ mapper: {
1260
+ serializedName: "nextLink",
1261
+ required: true,
1262
+ type: {
1263
+ name: "String"
1264
+ }
1265
+ },
1266
+ skipEncoding: true
1267
+ };
1268
+ const contentType = {
1269
+ parameterPath: ["options", "contentType"],
1270
+ mapper: {
1271
+ defaultValue: "application/json",
1272
+ isConstant: true,
1273
+ serializedName: "Content-Type",
1274
+ type: {
1275
+ name: "String"
1276
+ }
1277
+ }
1278
+ };
1279
+ const nameAvailabilityParameters = {
1280
+ parameterPath: "nameAvailabilityParameters",
1281
+ mapper: NameAvailabilityParameters
1282
+ };
1283
+ const subscriptionId = {
1284
+ parameterPath: "subscriptionId",
1285
+ mapper: {
1286
+ constraints: {
1287
+ MinLength: 1
1288
+ },
1289
+ serializedName: "subscriptionId",
1290
+ required: true,
1291
+ type: {
1292
+ name: "String"
1293
+ }
1294
+ }
1295
+ };
1296
+ const linkNotificationHubParameters = {
1297
+ parameterPath: ["options", "linkNotificationHubParameters"],
1298
+ mapper: LinkNotificationHubParameters
1299
+ };
1300
+ const resourceGroupName = {
1301
+ parameterPath: "resourceGroupName",
1302
+ mapper: {
1303
+ constraints: {
1304
+ MaxLength: 90,
1305
+ MinLength: 1
1306
+ },
1307
+ serializedName: "resourceGroupName",
1308
+ required: true,
1309
+ type: {
1310
+ name: "String"
1311
+ }
1312
+ }
1313
+ };
1314
+ const communicationServiceName = {
1315
+ parameterPath: "communicationServiceName",
1316
+ mapper: {
1317
+ constraints: {
1318
+ Pattern: new RegExp("^[a-zA-Z0-9-]+$"),
1319
+ MaxLength: 63,
1320
+ MinLength: 1
1321
+ },
1322
+ serializedName: "communicationServiceName",
1323
+ required: true,
1324
+ type: {
1325
+ name: "String"
1326
+ }
1327
+ }
1328
+ };
1329
+ const parameters = {
1330
+ parameterPath: "parameters",
1331
+ mapper: CommunicationServiceResourceUpdate
1332
+ };
1333
+ const parameters1 = {
1334
+ parameterPath: "parameters",
1335
+ mapper: CommunicationServiceResource
1336
+ };
1337
+ const parameters2 = {
1338
+ parameterPath: "parameters",
1339
+ mapper: RegenerateKeyParameters
1340
+ };
1341
+ const emailServiceName = {
1342
+ parameterPath: "emailServiceName",
1343
+ mapper: {
1344
+ constraints: {
1345
+ Pattern: new RegExp("^[a-zA-Z0-9-]+$"),
1346
+ MaxLength: 63,
1347
+ MinLength: 1
1348
+ },
1349
+ serializedName: "emailServiceName",
1350
+ required: true,
1351
+ type: {
1352
+ name: "String"
1353
+ }
1354
+ }
1355
+ };
1356
+ const domainName = {
1357
+ parameterPath: "domainName",
1358
+ mapper: {
1359
+ constraints: {
1360
+ MaxLength: 253,
1361
+ MinLength: 1
1362
+ },
1363
+ serializedName: "domainName",
1364
+ required: true,
1365
+ type: {
1366
+ name: "String"
1367
+ }
1368
+ }
1369
+ };
1370
+ const parameters3 = {
1371
+ parameterPath: "parameters",
1372
+ mapper: DomainResource
1373
+ };
1374
+ const parameters4 = {
1375
+ parameterPath: "parameters",
1376
+ mapper: UpdateDomainRequestParameters
1377
+ };
1378
+ const parameters5 = {
1379
+ parameterPath: "parameters",
1380
+ mapper: VerificationParameter
1381
+ };
1382
+ const parameters6 = {
1383
+ parameterPath: "parameters",
1384
+ mapper: EmailServiceResource
1385
+ };
1386
+ const parameters7 = {
1387
+ parameterPath: "parameters",
1388
+ mapper: EmailServiceResourceUpdate
1389
+ };
1390
+
1391
+ /*
1392
+ * Copyright (c) Microsoft Corporation.
1393
+ * Licensed under the MIT License.
1394
+ *
1395
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1396
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1397
+ */
1398
+ /// <reference lib="esnext.asynciterable" />
1399
+ /** Class containing Operations operations. */
1400
+ class OperationsImpl {
1401
+ /**
1402
+ * Initialize a new instance of the class Operations class.
1403
+ * @param client Reference to the service client
1404
+ */
1405
+ constructor(client) {
1406
+ this.client = client;
1407
+ }
1408
+ /**
1409
+ * Lists all of the available REST API operations of the Microsoft.Communication provider.
1410
+ * @param options The options parameters.
1411
+ */
1412
+ list(options) {
1413
+ const iter = this.listPagingAll(options);
1414
+ return {
1415
+ next() {
1416
+ return iter.next();
1417
+ },
1418
+ [Symbol.asyncIterator]() {
1419
+ return this;
1420
+ },
1421
+ byPage: () => {
1422
+ return this.listPagingPage(options);
1423
+ }
1424
+ };
1425
+ }
1426
+ listPagingPage(options) {
1427
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1428
+ let result = yield tslib.__await(this._list(options));
1429
+ yield yield tslib.__await(result.value || []);
1430
+ let continuationToken = result.nextLink;
1431
+ while (continuationToken) {
1432
+ result = yield tslib.__await(this._listNext(continuationToken, options));
1433
+ continuationToken = result.nextLink;
1434
+ yield yield tslib.__await(result.value || []);
1435
+ }
1436
+ });
1437
+ }
1438
+ listPagingAll(options) {
1439
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1440
+ var e_1, _a;
1441
+ try {
1442
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1443
+ const page = _c.value;
1444
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1445
+ }
1446
+ }
1447
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1448
+ finally {
1449
+ try {
1450
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1451
+ }
1452
+ finally { if (e_1) throw e_1.error; }
1453
+ }
1454
+ });
1455
+ }
1456
+ /**
1457
+ * Lists all of the available REST API operations of the Microsoft.Communication provider.
1458
+ * @param options The options parameters.
1459
+ */
1460
+ _list(options) {
1461
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
1462
+ }
1463
+ /**
1464
+ * ListNext
1465
+ * @param nextLink The nextLink from the previous successful call to the List method.
1466
+ * @param options The options parameters.
1467
+ */
1468
+ _listNext(nextLink, options) {
1469
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
1470
+ }
1471
+ }
1472
+ // Operation Specifications
1473
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1474
+ const listOperationSpec = {
1475
+ path: "/providers/Microsoft.Communication/operations",
1476
+ httpMethod: "GET",
1477
+ responses: {
1478
+ 200: {
1479
+ bodyMapper: OperationListResult
1480
+ },
1481
+ default: {
1482
+ bodyMapper: ErrorResponse
1483
+ }
1484
+ },
1485
+ queryParameters: [apiVersion],
1486
+ urlParameters: [$host],
1487
+ headerParameters: [accept],
1488
+ serializer: serializer$3
1489
+ };
1490
+ const listNextOperationSpec = {
1491
+ path: "{nextLink}",
1492
+ httpMethod: "GET",
1493
+ responses: {
1494
+ 200: {
1495
+ bodyMapper: OperationListResult
1496
+ },
1497
+ default: {
1498
+ bodyMapper: ErrorResponse
1499
+ }
1500
+ },
1501
+ queryParameters: [apiVersion],
1502
+ urlParameters: [$host, nextLink],
1503
+ headerParameters: [accept],
1504
+ serializer: serializer$3
1505
+ };
1506
+
1507
+ /*
1508
+ * Copyright (c) Microsoft Corporation.
1509
+ * Licensed under the MIT License.
1510
+ *
1511
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1512
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1513
+ */
1514
+ class LroImpl {
1515
+ constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
1516
+ this.sendOperationFn = sendOperationFn;
1517
+ this.args = args;
1518
+ this.spec = spec;
1519
+ this.requestPath = requestPath;
1520
+ this.requestMethod = requestMethod;
1521
+ }
1522
+ sendInitialRequest() {
1523
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1524
+ return this.sendOperationFn(this.args, this.spec);
1525
+ });
1526
+ }
1527
+ sendPollRequest(path) {
1528
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1529
+ const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
1530
+ return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
1531
+ });
1532
+ }
1533
+ }
1534
+
1535
+ /*
1536
+ * Copyright (c) Microsoft Corporation.
1537
+ * Licensed under the MIT License.
1538
+ *
1539
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1540
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1541
+ */
1542
+ /// <reference lib="esnext.asynciterable" />
1543
+ /** Class containing CommunicationServices operations. */
1544
+ class CommunicationServicesImpl {
1545
+ /**
1546
+ * Initialize a new instance of the class CommunicationServices class.
1547
+ * @param client Reference to the service client
1548
+ */
1549
+ constructor(client) {
1550
+ this.client = client;
1551
+ }
1552
+ /**
1553
+ * Handles requests to list all resources in a subscription.
1554
+ * @param options The options parameters.
1555
+ */
1556
+ listBySubscription(options) {
1557
+ const iter = this.listBySubscriptionPagingAll(options);
1558
+ return {
1559
+ next() {
1560
+ return iter.next();
1561
+ },
1562
+ [Symbol.asyncIterator]() {
1563
+ return this;
1564
+ },
1565
+ byPage: () => {
1566
+ return this.listBySubscriptionPagingPage(options);
1567
+ }
1568
+ };
1569
+ }
1570
+ listBySubscriptionPagingPage(options) {
1571
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
1572
+ let result = yield tslib.__await(this._listBySubscription(options));
1573
+ yield yield tslib.__await(result.value || []);
1574
+ let continuationToken = result.nextLink;
1575
+ while (continuationToken) {
1576
+ result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
1577
+ continuationToken = result.nextLink;
1578
+ yield yield tslib.__await(result.value || []);
1579
+ }
1580
+ });
1581
+ }
1582
+ listBySubscriptionPagingAll(options) {
1583
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
1584
+ var e_1, _a;
1585
+ try {
1586
+ for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1587
+ const page = _c.value;
1588
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1589
+ }
1590
+ }
1591
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1592
+ finally {
1593
+ try {
1594
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1595
+ }
1596
+ finally { if (e_1) throw e_1.error; }
1597
+ }
1598
+ });
1599
+ }
1600
+ /**
1601
+ * Handles requests to list all resources in a resource group.
1602
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1603
+ * @param options The options parameters.
1604
+ */
1605
+ listByResourceGroup(resourceGroupName, options) {
1606
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
1607
+ return {
1608
+ next() {
1609
+ return iter.next();
1610
+ },
1611
+ [Symbol.asyncIterator]() {
1612
+ return this;
1613
+ },
1614
+ byPage: () => {
1615
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
1616
+ }
1617
+ };
1618
+ }
1619
+ listByResourceGroupPagingPage(resourceGroupName, options) {
1620
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
1621
+ let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
1622
+ yield yield tslib.__await(result.value || []);
1623
+ let continuationToken = result.nextLink;
1624
+ while (continuationToken) {
1625
+ result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
1626
+ continuationToken = result.nextLink;
1627
+ yield yield tslib.__await(result.value || []);
1628
+ }
1629
+ });
1630
+ }
1631
+ listByResourceGroupPagingAll(resourceGroupName, options) {
1632
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
1633
+ var e_2, _a;
1634
+ try {
1635
+ for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1636
+ const page = _c.value;
1637
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1638
+ }
1639
+ }
1640
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
1641
+ finally {
1642
+ try {
1643
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1644
+ }
1645
+ finally { if (e_2) throw e_2.error; }
1646
+ }
1647
+ });
1648
+ }
1649
+ /**
1650
+ * Checks that the CommunicationService name is valid and is not already in use.
1651
+ * @param nameAvailabilityParameters Parameters supplied to the operation.
1652
+ * @param options The options parameters.
1653
+ */
1654
+ checkNameAvailability(nameAvailabilityParameters, options) {
1655
+ return this.client.sendOperationRequest({ nameAvailabilityParameters, options }, checkNameAvailabilityOperationSpec);
1656
+ }
1657
+ /**
1658
+ * Links an Azure Notification Hub to this communication service.
1659
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1660
+ * @param communicationServiceName The name of the CommunicationService resource.
1661
+ * @param options The options parameters.
1662
+ */
1663
+ linkNotificationHub(resourceGroupName, communicationServiceName, options) {
1664
+ return this.client.sendOperationRequest({ resourceGroupName, communicationServiceName, options }, linkNotificationHubOperationSpec);
1665
+ }
1666
+ /**
1667
+ * Handles requests to list all resources in a subscription.
1668
+ * @param options The options parameters.
1669
+ */
1670
+ _listBySubscription(options) {
1671
+ return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec$1);
1672
+ }
1673
+ /**
1674
+ * Handles requests to list all resources in a resource group.
1675
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1676
+ * @param options The options parameters.
1677
+ */
1678
+ _listByResourceGroup(resourceGroupName, options) {
1679
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$1);
1680
+ }
1681
+ /**
1682
+ * Operation to update an existing CommunicationService.
1683
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1684
+ * @param communicationServiceName The name of the CommunicationService resource.
1685
+ * @param parameters Parameters for the update operation
1686
+ * @param options The options parameters.
1687
+ */
1688
+ beginUpdate(resourceGroupName, communicationServiceName, parameters, options) {
1689
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1690
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1691
+ return this.client.sendOperationRequest(args, spec);
1692
+ });
1693
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1694
+ var _a;
1695
+ let currentRawResponse = undefined;
1696
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1697
+ const callback = (rawResponse, flatResponse) => {
1698
+ currentRawResponse = rawResponse;
1699
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1700
+ };
1701
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1702
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1703
+ return {
1704
+ flatResponse,
1705
+ rawResponse: {
1706
+ statusCode: currentRawResponse.status,
1707
+ body: currentRawResponse.parsedBody,
1708
+ headers: currentRawResponse.headers.toJSON()
1709
+ }
1710
+ };
1711
+ });
1712
+ const lro = new LroImpl(sendOperation, { resourceGroupName, communicationServiceName, parameters, options }, updateOperationSpec$2);
1713
+ const poller = new coreLro.LroEngine(lro, {
1714
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1715
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1716
+ lroResourceLocationConfig: "azure-async-operation"
1717
+ });
1718
+ yield poller.poll();
1719
+ return poller;
1720
+ });
1721
+ }
1722
+ /**
1723
+ * Operation to update an existing CommunicationService.
1724
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1725
+ * @param communicationServiceName The name of the CommunicationService resource.
1726
+ * @param parameters Parameters for the update operation
1727
+ * @param options The options parameters.
1728
+ */
1729
+ beginUpdateAndWait(resourceGroupName, communicationServiceName, parameters, options) {
1730
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1731
+ const poller = yield this.beginUpdate(resourceGroupName, communicationServiceName, parameters, options);
1732
+ return poller.pollUntilDone();
1733
+ });
1734
+ }
1735
+ /**
1736
+ * Get the CommunicationService and its properties.
1737
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1738
+ * @param communicationServiceName The name of the CommunicationService resource.
1739
+ * @param options The options parameters.
1740
+ */
1741
+ get(resourceGroupName, communicationServiceName, options) {
1742
+ return this.client.sendOperationRequest({ resourceGroupName, communicationServiceName, options }, getOperationSpec$2);
1743
+ }
1744
+ /**
1745
+ * Create a new CommunicationService or update an existing CommunicationService.
1746
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1747
+ * @param communicationServiceName The name of the CommunicationService resource.
1748
+ * @param parameters Parameters for the create or update operation
1749
+ * @param options The options parameters.
1750
+ */
1751
+ beginCreateOrUpdate(resourceGroupName, communicationServiceName, parameters, options) {
1752
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1753
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1754
+ return this.client.sendOperationRequest(args, spec);
1755
+ });
1756
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1757
+ var _a;
1758
+ let currentRawResponse = undefined;
1759
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1760
+ const callback = (rawResponse, flatResponse) => {
1761
+ currentRawResponse = rawResponse;
1762
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1763
+ };
1764
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1765
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1766
+ return {
1767
+ flatResponse,
1768
+ rawResponse: {
1769
+ statusCode: currentRawResponse.status,
1770
+ body: currentRawResponse.parsedBody,
1771
+ headers: currentRawResponse.headers.toJSON()
1772
+ }
1773
+ };
1774
+ });
1775
+ const lro = new LroImpl(sendOperation, { resourceGroupName, communicationServiceName, parameters, options }, createOrUpdateOperationSpec$2);
1776
+ const poller = new coreLro.LroEngine(lro, {
1777
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1778
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1779
+ lroResourceLocationConfig: "azure-async-operation"
1780
+ });
1781
+ yield poller.poll();
1782
+ return poller;
1783
+ });
1784
+ }
1785
+ /**
1786
+ * Create a new CommunicationService or update an existing CommunicationService.
1787
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1788
+ * @param communicationServiceName The name of the CommunicationService resource.
1789
+ * @param parameters Parameters for the create or update operation
1790
+ * @param options The options parameters.
1791
+ */
1792
+ beginCreateOrUpdateAndWait(resourceGroupName, communicationServiceName, parameters, options) {
1793
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1794
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, communicationServiceName, parameters, options);
1795
+ return poller.pollUntilDone();
1796
+ });
1797
+ }
1798
+ /**
1799
+ * Operation to delete a CommunicationService.
1800
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1801
+ * @param communicationServiceName The name of the CommunicationService resource.
1802
+ * @param options The options parameters.
1803
+ */
1804
+ beginDelete(resourceGroupName, communicationServiceName, options) {
1805
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1806
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1807
+ return this.client.sendOperationRequest(args, spec);
1808
+ });
1809
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1810
+ var _a;
1811
+ let currentRawResponse = undefined;
1812
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1813
+ const callback = (rawResponse, flatResponse) => {
1814
+ currentRawResponse = rawResponse;
1815
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1816
+ };
1817
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1818
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1819
+ return {
1820
+ flatResponse,
1821
+ rawResponse: {
1822
+ statusCode: currentRawResponse.status,
1823
+ body: currentRawResponse.parsedBody,
1824
+ headers: currentRawResponse.headers.toJSON()
1825
+ }
1826
+ };
1827
+ });
1828
+ const lro = new LroImpl(sendOperation, { resourceGroupName, communicationServiceName, options }, deleteOperationSpec$2);
1829
+ const poller = new coreLro.LroEngine(lro, {
1830
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1831
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1832
+ lroResourceLocationConfig: "location"
1833
+ });
1834
+ yield poller.poll();
1835
+ return poller;
1836
+ });
1837
+ }
1838
+ /**
1839
+ * Operation to delete a CommunicationService.
1840
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1841
+ * @param communicationServiceName The name of the CommunicationService resource.
1842
+ * @param options The options parameters.
1843
+ */
1844
+ beginDeleteAndWait(resourceGroupName, communicationServiceName, options) {
1845
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1846
+ const poller = yield this.beginDelete(resourceGroupName, communicationServiceName, options);
1847
+ return poller.pollUntilDone();
1848
+ });
1849
+ }
1850
+ /**
1851
+ * Get the access keys of the CommunicationService resource.
1852
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1853
+ * @param communicationServiceName The name of the CommunicationService resource.
1854
+ * @param options The options parameters.
1855
+ */
1856
+ listKeys(resourceGroupName, communicationServiceName, options) {
1857
+ return this.client.sendOperationRequest({ resourceGroupName, communicationServiceName, options }, listKeysOperationSpec);
1858
+ }
1859
+ /**
1860
+ * Regenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at the
1861
+ * same time.
1862
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1863
+ * @param communicationServiceName The name of the CommunicationService resource.
1864
+ * @param parameters Parameter that describes the Regenerate Key Operation.
1865
+ * @param options The options parameters.
1866
+ */
1867
+ beginRegenerateKey(resourceGroupName, communicationServiceName, parameters, options) {
1868
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1869
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1870
+ return this.client.sendOperationRequest(args, spec);
1871
+ });
1872
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1873
+ var _a;
1874
+ let currentRawResponse = undefined;
1875
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1876
+ const callback = (rawResponse, flatResponse) => {
1877
+ currentRawResponse = rawResponse;
1878
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1879
+ };
1880
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1881
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1882
+ return {
1883
+ flatResponse,
1884
+ rawResponse: {
1885
+ statusCode: currentRawResponse.status,
1886
+ body: currentRawResponse.parsedBody,
1887
+ headers: currentRawResponse.headers.toJSON()
1888
+ }
1889
+ };
1890
+ });
1891
+ const lro = new LroImpl(sendOperation, { resourceGroupName, communicationServiceName, parameters, options }, regenerateKeyOperationSpec);
1892
+ const poller = new coreLro.LroEngine(lro, {
1893
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1894
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1895
+ lroResourceLocationConfig: "azure-async-operation"
1896
+ });
1897
+ yield poller.poll();
1898
+ return poller;
1899
+ });
1900
+ }
1901
+ /**
1902
+ * Regenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at the
1903
+ * same time.
1904
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1905
+ * @param communicationServiceName The name of the CommunicationService resource.
1906
+ * @param parameters Parameter that describes the Regenerate Key Operation.
1907
+ * @param options The options parameters.
1908
+ */
1909
+ beginRegenerateKeyAndWait(resourceGroupName, communicationServiceName, parameters, options) {
1910
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1911
+ const poller = yield this.beginRegenerateKey(resourceGroupName, communicationServiceName, parameters, options);
1912
+ return poller.pollUntilDone();
1913
+ });
1914
+ }
1915
+ /**
1916
+ * ListBySubscriptionNext
1917
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
1918
+ * @param options The options parameters.
1919
+ */
1920
+ _listBySubscriptionNext(nextLink, options) {
1921
+ return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec$1);
1922
+ }
1923
+ /**
1924
+ * ListByResourceGroupNext
1925
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1926
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
1927
+ * @param options The options parameters.
1928
+ */
1929
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
1930
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec$1);
1931
+ }
1932
+ }
1933
+ // Operation Specifications
1934
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1935
+ const checkNameAvailabilityOperationSpec = {
1936
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/checkNameAvailability",
1937
+ httpMethod: "POST",
1938
+ responses: {
1939
+ 200: {
1940
+ bodyMapper: CheckNameAvailabilityResponse
1941
+ },
1942
+ default: {
1943
+ bodyMapper: ErrorResponse
1944
+ }
663
1945
  },
664
- skipEncoding: true
1946
+ requestBody: nameAvailabilityParameters,
1947
+ queryParameters: [apiVersion],
1948
+ urlParameters: [$host, subscriptionId],
1949
+ headerParameters: [accept, contentType],
1950
+ mediaType: "json",
1951
+ serializer: serializer$2
665
1952
  };
666
- const apiVersion = {
667
- parameterPath: "apiVersion",
668
- mapper: {
669
- defaultValue: "2020-08-20",
670
- isConstant: true,
671
- serializedName: "api-version",
672
- type: {
673
- name: "String"
1953
+ const linkNotificationHubOperationSpec = {
1954
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/linkNotificationHub",
1955
+ httpMethod: "POST",
1956
+ responses: {
1957
+ 200: {
1958
+ bodyMapper: LinkedNotificationHub
1959
+ },
1960
+ default: {
1961
+ bodyMapper: ErrorResponse
674
1962
  }
675
- }
1963
+ },
1964
+ requestBody: linkNotificationHubParameters,
1965
+ queryParameters: [apiVersion],
1966
+ urlParameters: [
1967
+ $host,
1968
+ subscriptionId,
1969
+ resourceGroupName,
1970
+ communicationServiceName
1971
+ ],
1972
+ headerParameters: [accept, contentType],
1973
+ mediaType: "json",
1974
+ serializer: serializer$2
676
1975
  };
677
- const nextLink = {
678
- parameterPath: "nextLink",
679
- mapper: {
680
- serializedName: "nextLink",
681
- required: true,
682
- type: {
683
- name: "String"
1976
+ const listBySubscriptionOperationSpec$1 = {
1977
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/communicationServices",
1978
+ httpMethod: "GET",
1979
+ responses: {
1980
+ 200: {
1981
+ bodyMapper: CommunicationServiceResourceList
1982
+ },
1983
+ default: {
1984
+ bodyMapper: ErrorResponse
684
1985
  }
685
1986
  },
686
- skipEncoding: true
1987
+ queryParameters: [apiVersion],
1988
+ urlParameters: [$host, subscriptionId],
1989
+ headerParameters: [accept],
1990
+ serializer: serializer$2
687
1991
  };
688
- const contentType = {
689
- parameterPath: ["options", "contentType"],
690
- mapper: {
691
- defaultValue: "application/json",
692
- isConstant: true,
693
- serializedName: "Content-Type",
694
- type: {
695
- name: "String"
1992
+ const listByResourceGroupOperationSpec$1 = {
1993
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices",
1994
+ httpMethod: "GET",
1995
+ responses: {
1996
+ 200: {
1997
+ bodyMapper: CommunicationServiceResourceList
1998
+ },
1999
+ default: {
2000
+ bodyMapper: ErrorResponse
696
2001
  }
697
- }
2002
+ },
2003
+ queryParameters: [apiVersion],
2004
+ urlParameters: [
2005
+ $host,
2006
+ subscriptionId,
2007
+ resourceGroupName
2008
+ ],
2009
+ headerParameters: [accept],
2010
+ serializer: serializer$2
698
2011
  };
699
- const nameAvailabilityParameters = {
700
- parameterPath: ["options", "nameAvailabilityParameters"],
701
- mapper: NameAvailabilityParameters
2012
+ const updateOperationSpec$2 = {
2013
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}",
2014
+ httpMethod: "PATCH",
2015
+ responses: {
2016
+ 200: {
2017
+ bodyMapper: CommunicationServiceResource
2018
+ },
2019
+ 201: {
2020
+ bodyMapper: CommunicationServiceResource
2021
+ },
2022
+ 202: {
2023
+ bodyMapper: CommunicationServiceResource
2024
+ },
2025
+ 204: {
2026
+ bodyMapper: CommunicationServiceResource
2027
+ },
2028
+ default: {
2029
+ bodyMapper: ErrorResponse
2030
+ }
2031
+ },
2032
+ requestBody: parameters,
2033
+ queryParameters: [apiVersion],
2034
+ urlParameters: [
2035
+ $host,
2036
+ subscriptionId,
2037
+ resourceGroupName,
2038
+ communicationServiceName
2039
+ ],
2040
+ headerParameters: [accept, contentType],
2041
+ mediaType: "json",
2042
+ serializer: serializer$2
702
2043
  };
703
- const subscriptionId = {
704
- parameterPath: "subscriptionId",
705
- mapper: {
706
- constraints: {
707
- MinLength: 1
2044
+ const getOperationSpec$2 = {
2045
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}",
2046
+ httpMethod: "GET",
2047
+ responses: {
2048
+ 200: {
2049
+ bodyMapper: CommunicationServiceResource
708
2050
  },
709
- serializedName: "subscriptionId",
710
- required: true,
711
- type: {
712
- name: "String"
2051
+ default: {
2052
+ bodyMapper: ErrorResponse
713
2053
  }
714
- }
2054
+ },
2055
+ queryParameters: [apiVersion],
2056
+ urlParameters: [
2057
+ $host,
2058
+ subscriptionId,
2059
+ resourceGroupName,
2060
+ communicationServiceName
2061
+ ],
2062
+ headerParameters: [accept],
2063
+ serializer: serializer$2
715
2064
  };
716
- const linkNotificationHubParameters = {
717
- parameterPath: ["options", "linkNotificationHubParameters"],
718
- mapper: LinkNotificationHubParameters
2065
+ const createOrUpdateOperationSpec$2 = {
2066
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}",
2067
+ httpMethod: "PUT",
2068
+ responses: {
2069
+ 200: {
2070
+ bodyMapper: CommunicationServiceResource
2071
+ },
2072
+ 201: {
2073
+ bodyMapper: CommunicationServiceResource
2074
+ },
2075
+ 202: {
2076
+ bodyMapper: CommunicationServiceResource
2077
+ },
2078
+ 204: {
2079
+ bodyMapper: CommunicationServiceResource
2080
+ },
2081
+ default: {
2082
+ bodyMapper: ErrorResponse
2083
+ }
2084
+ },
2085
+ requestBody: parameters1,
2086
+ queryParameters: [apiVersion],
2087
+ urlParameters: [
2088
+ $host,
2089
+ subscriptionId,
2090
+ resourceGroupName,
2091
+ communicationServiceName
2092
+ ],
2093
+ headerParameters: [accept, contentType],
2094
+ mediaType: "json",
2095
+ serializer: serializer$2
719
2096
  };
720
- const resourceGroupName = {
721
- parameterPath: "resourceGroupName",
722
- mapper: {
723
- constraints: {
724
- MaxLength: 90,
725
- MinLength: 1
2097
+ const deleteOperationSpec$2 = {
2098
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}",
2099
+ httpMethod: "DELETE",
2100
+ responses: {
2101
+ 200: {},
2102
+ 201: {},
2103
+ 202: {},
2104
+ 204: {},
2105
+ default: {
2106
+ bodyMapper: ErrorResponse
2107
+ }
2108
+ },
2109
+ queryParameters: [apiVersion],
2110
+ urlParameters: [
2111
+ $host,
2112
+ subscriptionId,
2113
+ resourceGroupName,
2114
+ communicationServiceName
2115
+ ],
2116
+ headerParameters: [accept],
2117
+ serializer: serializer$2
2118
+ };
2119
+ const listKeysOperationSpec = {
2120
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/listKeys",
2121
+ httpMethod: "POST",
2122
+ responses: {
2123
+ 200: {
2124
+ bodyMapper: CommunicationServiceKeys
2125
+ },
2126
+ default: {
2127
+ bodyMapper: ErrorResponse
2128
+ }
2129
+ },
2130
+ queryParameters: [apiVersion],
2131
+ urlParameters: [
2132
+ $host,
2133
+ subscriptionId,
2134
+ resourceGroupName,
2135
+ communicationServiceName
2136
+ ],
2137
+ headerParameters: [accept],
2138
+ serializer: serializer$2
2139
+ };
2140
+ const regenerateKeyOperationSpec = {
2141
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/regenerateKey",
2142
+ httpMethod: "POST",
2143
+ responses: {
2144
+ 200: {
2145
+ bodyMapper: CommunicationServiceKeys
2146
+ },
2147
+ 201: {
2148
+ bodyMapper: CommunicationServiceKeys
2149
+ },
2150
+ 202: {
2151
+ bodyMapper: CommunicationServiceKeys
2152
+ },
2153
+ 204: {
2154
+ bodyMapper: CommunicationServiceKeys
2155
+ },
2156
+ default: {
2157
+ bodyMapper: ErrorResponse
2158
+ }
2159
+ },
2160
+ requestBody: parameters2,
2161
+ queryParameters: [apiVersion],
2162
+ urlParameters: [
2163
+ $host,
2164
+ subscriptionId,
2165
+ resourceGroupName,
2166
+ communicationServiceName
2167
+ ],
2168
+ headerParameters: [accept, contentType],
2169
+ mediaType: "json",
2170
+ serializer: serializer$2
2171
+ };
2172
+ const listBySubscriptionNextOperationSpec$1 = {
2173
+ path: "{nextLink}",
2174
+ httpMethod: "GET",
2175
+ responses: {
2176
+ 200: {
2177
+ bodyMapper: CommunicationServiceResourceList
726
2178
  },
727
- serializedName: "resourceGroupName",
728
- required: true,
729
- type: {
730
- name: "String"
2179
+ default: {
2180
+ bodyMapper: ErrorResponse
731
2181
  }
732
- }
2182
+ },
2183
+ queryParameters: [apiVersion],
2184
+ urlParameters: [
2185
+ $host,
2186
+ nextLink,
2187
+ subscriptionId
2188
+ ],
2189
+ headerParameters: [accept],
2190
+ serializer: serializer$2
733
2191
  };
734
- const communicationServiceName = {
735
- parameterPath: "communicationServiceName",
736
- mapper: {
737
- constraints: {
738
- Pattern: new RegExp("^[-\\w]+$"),
739
- MaxLength: 63,
740
- MinLength: 1
2192
+ const listByResourceGroupNextOperationSpec$1 = {
2193
+ path: "{nextLink}",
2194
+ httpMethod: "GET",
2195
+ responses: {
2196
+ 200: {
2197
+ bodyMapper: CommunicationServiceResourceList
741
2198
  },
742
- serializedName: "communicationServiceName",
743
- required: true,
744
- type: {
745
- name: "String"
2199
+ default: {
2200
+ bodyMapper: ErrorResponse
746
2201
  }
747
- }
748
- };
749
- const parameters = {
750
- parameterPath: ["options", "parameters"],
751
- mapper: CommunicationServiceResource
752
- };
753
- const parameters1 = {
754
- parameterPath: "parameters",
755
- mapper: RegenerateKeyParameters
2202
+ },
2203
+ queryParameters: [apiVersion],
2204
+ urlParameters: [
2205
+ $host,
2206
+ nextLink,
2207
+ subscriptionId,
2208
+ resourceGroupName
2209
+ ],
2210
+ headerParameters: [accept],
2211
+ serializer: serializer$2
756
2212
  };
757
2213
 
758
2214
  /*
@@ -763,21 +2219,23 @@ const parameters1 = {
763
2219
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
764
2220
  */
765
2221
  /// <reference lib="esnext.asynciterable" />
766
- /** Class containing Operations operations. */
767
- class OperationsImpl {
2222
+ /** Class containing Domains operations. */
2223
+ class DomainsImpl {
768
2224
  /**
769
- * Initialize a new instance of the class Operations class.
2225
+ * Initialize a new instance of the class Domains class.
770
2226
  * @param client Reference to the service client
771
2227
  */
772
2228
  constructor(client) {
773
2229
  this.client = client;
774
2230
  }
775
2231
  /**
776
- * Lists all of the available REST API operations of the Microsoft.Communication provider.
2232
+ * Handles requests to list all Domains resources under the parent EmailServices resource.
2233
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2234
+ * @param emailServiceName The name of the EmailService resource.
777
2235
  * @param options The options parameters.
778
2236
  */
779
- list(options) {
780
- const iter = this.listPagingAll(options);
2237
+ listByEmailServiceResource(resourceGroupName, emailServiceName, options) {
2238
+ const iter = this.listByEmailServiceResourcePagingAll(resourceGroupName, emailServiceName, options);
781
2239
  return {
782
2240
  next() {
783
2241
  return iter.next();
@@ -786,118 +2244,573 @@ class OperationsImpl {
786
2244
  return this;
787
2245
  },
788
2246
  byPage: () => {
789
- return this.listPagingPage(options);
2247
+ return this.listByEmailServiceResourcePagingPage(resourceGroupName, emailServiceName, options);
790
2248
  }
791
2249
  };
792
2250
  }
793
- listPagingPage(options) {
794
- return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
795
- let result = yield tslib.__await(this._list(options));
796
- yield yield tslib.__await(result.value || []);
797
- let continuationToken = result.nextLink;
798
- while (continuationToken) {
799
- result = yield tslib.__await(this._listNext(continuationToken, options));
800
- continuationToken = result.nextLink;
801
- yield yield tslib.__await(result.value || []);
802
- }
2251
+ listByEmailServiceResourcePagingPage(resourceGroupName, emailServiceName, options) {
2252
+ return tslib.__asyncGenerator(this, arguments, function* listByEmailServiceResourcePagingPage_1() {
2253
+ let result = yield tslib.__await(this._listByEmailServiceResource(resourceGroupName, emailServiceName, options));
2254
+ yield yield tslib.__await(result.value || []);
2255
+ let continuationToken = result.nextLink;
2256
+ while (continuationToken) {
2257
+ result = yield tslib.__await(this._listByEmailServiceResourceNext(resourceGroupName, emailServiceName, continuationToken, options));
2258
+ continuationToken = result.nextLink;
2259
+ yield yield tslib.__await(result.value || []);
2260
+ }
2261
+ });
2262
+ }
2263
+ listByEmailServiceResourcePagingAll(resourceGroupName, emailServiceName, options) {
2264
+ return tslib.__asyncGenerator(this, arguments, function* listByEmailServiceResourcePagingAll_1() {
2265
+ var e_1, _a;
2266
+ try {
2267
+ for (var _b = tslib.__asyncValues(this.listByEmailServiceResourcePagingPage(resourceGroupName, emailServiceName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2268
+ const page = _c.value;
2269
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2270
+ }
2271
+ }
2272
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2273
+ finally {
2274
+ try {
2275
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2276
+ }
2277
+ finally { if (e_1) throw e_1.error; }
2278
+ }
2279
+ });
2280
+ }
2281
+ /**
2282
+ * Get the Domains resource and its properties.
2283
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2284
+ * @param emailServiceName The name of the EmailService resource.
2285
+ * @param domainName The name of the Domains resource.
2286
+ * @param options The options parameters.
2287
+ */
2288
+ get(resourceGroupName, emailServiceName, domainName, options) {
2289
+ return this.client.sendOperationRequest({ resourceGroupName, emailServiceName, domainName, options }, getOperationSpec$1);
2290
+ }
2291
+ /**
2292
+ * Add a new Domains resource under the parent EmailService resource or update an existing Domains
2293
+ * resource.
2294
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2295
+ * @param emailServiceName The name of the EmailService resource.
2296
+ * @param domainName The name of the Domains resource.
2297
+ * @param parameters Parameters for the create or update operation
2298
+ * @param options The options parameters.
2299
+ */
2300
+ beginCreateOrUpdate(resourceGroupName, emailServiceName, domainName, parameters, options) {
2301
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2302
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2303
+ return this.client.sendOperationRequest(args, spec);
2304
+ });
2305
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2306
+ var _a;
2307
+ let currentRawResponse = undefined;
2308
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2309
+ const callback = (rawResponse, flatResponse) => {
2310
+ currentRawResponse = rawResponse;
2311
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2312
+ };
2313
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2314
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2315
+ return {
2316
+ flatResponse,
2317
+ rawResponse: {
2318
+ statusCode: currentRawResponse.status,
2319
+ body: currentRawResponse.parsedBody,
2320
+ headers: currentRawResponse.headers.toJSON()
2321
+ }
2322
+ };
2323
+ });
2324
+ const lro = new LroImpl(sendOperation, { resourceGroupName, emailServiceName, domainName, parameters, options }, createOrUpdateOperationSpec$1);
2325
+ const poller = new coreLro.LroEngine(lro, {
2326
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2327
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2328
+ lroResourceLocationConfig: "azure-async-operation"
2329
+ });
2330
+ yield poller.poll();
2331
+ return poller;
2332
+ });
2333
+ }
2334
+ /**
2335
+ * Add a new Domains resource under the parent EmailService resource or update an existing Domains
2336
+ * resource.
2337
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2338
+ * @param emailServiceName The name of the EmailService resource.
2339
+ * @param domainName The name of the Domains resource.
2340
+ * @param parameters Parameters for the create or update operation
2341
+ * @param options The options parameters.
2342
+ */
2343
+ beginCreateOrUpdateAndWait(resourceGroupName, emailServiceName, domainName, parameters, options) {
2344
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2345
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, emailServiceName, domainName, parameters, options);
2346
+ return poller.pollUntilDone();
2347
+ });
2348
+ }
2349
+ /**
2350
+ * Operation to delete a Domains resource.
2351
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2352
+ * @param emailServiceName The name of the EmailService resource.
2353
+ * @param domainName The name of the Domains resource.
2354
+ * @param options The options parameters.
2355
+ */
2356
+ beginDelete(resourceGroupName, emailServiceName, domainName, options) {
2357
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2358
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2359
+ return this.client.sendOperationRequest(args, spec);
2360
+ });
2361
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2362
+ var _a;
2363
+ let currentRawResponse = undefined;
2364
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2365
+ const callback = (rawResponse, flatResponse) => {
2366
+ currentRawResponse = rawResponse;
2367
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2368
+ };
2369
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2370
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2371
+ return {
2372
+ flatResponse,
2373
+ rawResponse: {
2374
+ statusCode: currentRawResponse.status,
2375
+ body: currentRawResponse.parsedBody,
2376
+ headers: currentRawResponse.headers.toJSON()
2377
+ }
2378
+ };
2379
+ });
2380
+ const lro = new LroImpl(sendOperation, { resourceGroupName, emailServiceName, domainName, options }, deleteOperationSpec$1);
2381
+ const poller = new coreLro.LroEngine(lro, {
2382
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2383
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2384
+ lroResourceLocationConfig: "location"
2385
+ });
2386
+ yield poller.poll();
2387
+ return poller;
2388
+ });
2389
+ }
2390
+ /**
2391
+ * Operation to delete a Domains resource.
2392
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2393
+ * @param emailServiceName The name of the EmailService resource.
2394
+ * @param domainName The name of the Domains resource.
2395
+ * @param options The options parameters.
2396
+ */
2397
+ beginDeleteAndWait(resourceGroupName, emailServiceName, domainName, options) {
2398
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2399
+ const poller = yield this.beginDelete(resourceGroupName, emailServiceName, domainName, options);
2400
+ return poller.pollUntilDone();
2401
+ });
2402
+ }
2403
+ /**
2404
+ * Operation to update an existing Domains resource.
2405
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2406
+ * @param emailServiceName The name of the EmailService resource.
2407
+ * @param domainName The name of the Domains resource.
2408
+ * @param parameters Parameters for the update operation
2409
+ * @param options The options parameters.
2410
+ */
2411
+ beginUpdate(resourceGroupName, emailServiceName, domainName, parameters, options) {
2412
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2413
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2414
+ return this.client.sendOperationRequest(args, spec);
2415
+ });
2416
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2417
+ var _a;
2418
+ let currentRawResponse = undefined;
2419
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2420
+ const callback = (rawResponse, flatResponse) => {
2421
+ currentRawResponse = rawResponse;
2422
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2423
+ };
2424
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2425
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2426
+ return {
2427
+ flatResponse,
2428
+ rawResponse: {
2429
+ statusCode: currentRawResponse.status,
2430
+ body: currentRawResponse.parsedBody,
2431
+ headers: currentRawResponse.headers.toJSON()
2432
+ }
2433
+ };
2434
+ });
2435
+ const lro = new LroImpl(sendOperation, { resourceGroupName, emailServiceName, domainName, parameters, options }, updateOperationSpec$1);
2436
+ const poller = new coreLro.LroEngine(lro, {
2437
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2438
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2439
+ lroResourceLocationConfig: "azure-async-operation"
2440
+ });
2441
+ yield poller.poll();
2442
+ return poller;
2443
+ });
2444
+ }
2445
+ /**
2446
+ * Operation to update an existing Domains resource.
2447
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2448
+ * @param emailServiceName The name of the EmailService resource.
2449
+ * @param domainName The name of the Domains resource.
2450
+ * @param parameters Parameters for the update operation
2451
+ * @param options The options parameters.
2452
+ */
2453
+ beginUpdateAndWait(resourceGroupName, emailServiceName, domainName, parameters, options) {
2454
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2455
+ const poller = yield this.beginUpdate(resourceGroupName, emailServiceName, domainName, parameters, options);
2456
+ return poller.pollUntilDone();
2457
+ });
2458
+ }
2459
+ /**
2460
+ * Handles requests to list all Domains resources under the parent EmailServices resource.
2461
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2462
+ * @param emailServiceName The name of the EmailService resource.
2463
+ * @param options The options parameters.
2464
+ */
2465
+ _listByEmailServiceResource(resourceGroupName, emailServiceName, options) {
2466
+ return this.client.sendOperationRequest({ resourceGroupName, emailServiceName, options }, listByEmailServiceResourceOperationSpec);
2467
+ }
2468
+ /**
2469
+ * Initiate verification of DNS record.
2470
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2471
+ * @param emailServiceName The name of the EmailService resource.
2472
+ * @param domainName The name of the Domains resource.
2473
+ * @param parameters Type of verification to be initiated.
2474
+ * @param options The options parameters.
2475
+ */
2476
+ beginInitiateVerification(resourceGroupName, emailServiceName, domainName, parameters, options) {
2477
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2478
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2479
+ return this.client.sendOperationRequest(args, spec);
2480
+ });
2481
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2482
+ var _a;
2483
+ let currentRawResponse = undefined;
2484
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2485
+ const callback = (rawResponse, flatResponse) => {
2486
+ currentRawResponse = rawResponse;
2487
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2488
+ };
2489
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2490
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2491
+ return {
2492
+ flatResponse,
2493
+ rawResponse: {
2494
+ statusCode: currentRawResponse.status,
2495
+ body: currentRawResponse.parsedBody,
2496
+ headers: currentRawResponse.headers.toJSON()
2497
+ }
2498
+ };
2499
+ });
2500
+ const lro = new LroImpl(sendOperation, { resourceGroupName, emailServiceName, domainName, parameters, options }, initiateVerificationOperationSpec);
2501
+ const poller = new coreLro.LroEngine(lro, {
2502
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2503
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2504
+ lroResourceLocationConfig: "location"
2505
+ });
2506
+ yield poller.poll();
2507
+ return poller;
2508
+ });
2509
+ }
2510
+ /**
2511
+ * Initiate verification of DNS record.
2512
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2513
+ * @param emailServiceName The name of the EmailService resource.
2514
+ * @param domainName The name of the Domains resource.
2515
+ * @param parameters Type of verification to be initiated.
2516
+ * @param options The options parameters.
2517
+ */
2518
+ beginInitiateVerificationAndWait(resourceGroupName, emailServiceName, domainName, parameters, options) {
2519
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2520
+ const poller = yield this.beginInitiateVerification(resourceGroupName, emailServiceName, domainName, parameters, options);
2521
+ return poller.pollUntilDone();
803
2522
  });
804
2523
  }
805
- listPagingAll(options) {
806
- return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
807
- var e_1, _a;
808
- try {
809
- for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
810
- const page = _c.value;
811
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
812
- }
813
- }
814
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
815
- finally {
816
- try {
817
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
818
- }
819
- finally { if (e_1) throw e_1.error; }
820
- }
2524
+ /**
2525
+ * Cancel verification of DNS record.
2526
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2527
+ * @param emailServiceName The name of the EmailService resource.
2528
+ * @param domainName The name of the Domains resource.
2529
+ * @param parameters Type of verification to be canceled.
2530
+ * @param options The options parameters.
2531
+ */
2532
+ beginCancelVerification(resourceGroupName, emailServiceName, domainName, parameters, options) {
2533
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2534
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2535
+ return this.client.sendOperationRequest(args, spec);
2536
+ });
2537
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2538
+ var _a;
2539
+ let currentRawResponse = undefined;
2540
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2541
+ const callback = (rawResponse, flatResponse) => {
2542
+ currentRawResponse = rawResponse;
2543
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2544
+ };
2545
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2546
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2547
+ return {
2548
+ flatResponse,
2549
+ rawResponse: {
2550
+ statusCode: currentRawResponse.status,
2551
+ body: currentRawResponse.parsedBody,
2552
+ headers: currentRawResponse.headers.toJSON()
2553
+ }
2554
+ };
2555
+ });
2556
+ const lro = new LroImpl(sendOperation, { resourceGroupName, emailServiceName, domainName, parameters, options }, cancelVerificationOperationSpec);
2557
+ const poller = new coreLro.LroEngine(lro, {
2558
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2559
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2560
+ lroResourceLocationConfig: "location"
2561
+ });
2562
+ yield poller.poll();
2563
+ return poller;
821
2564
  });
822
2565
  }
823
2566
  /**
824
- * Lists all of the available REST API operations of the Microsoft.Communication provider.
2567
+ * Cancel verification of DNS record.
2568
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2569
+ * @param emailServiceName The name of the EmailService resource.
2570
+ * @param domainName The name of the Domains resource.
2571
+ * @param parameters Type of verification to be canceled.
825
2572
  * @param options The options parameters.
826
2573
  */
827
- _list(options) {
828
- return this.client.sendOperationRequest({ options }, listOperationSpec);
2574
+ beginCancelVerificationAndWait(resourceGroupName, emailServiceName, domainName, parameters, options) {
2575
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2576
+ const poller = yield this.beginCancelVerification(resourceGroupName, emailServiceName, domainName, parameters, options);
2577
+ return poller.pollUntilDone();
2578
+ });
829
2579
  }
830
2580
  /**
831
- * ListNext
832
- * @param nextLink The nextLink from the previous successful call to the List method.
2581
+ * ListByEmailServiceResourceNext
2582
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2583
+ * @param emailServiceName The name of the EmailService resource.
2584
+ * @param nextLink The nextLink from the previous successful call to the ListByEmailServiceResource
2585
+ * method.
833
2586
  * @param options The options parameters.
834
2587
  */
835
- _listNext(nextLink, options) {
836
- return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
2588
+ _listByEmailServiceResourceNext(resourceGroupName, emailServiceName, nextLink, options) {
2589
+ return this.client.sendOperationRequest({ resourceGroupName, emailServiceName, nextLink, options }, listByEmailServiceResourceNextOperationSpec);
837
2590
  }
838
2591
  }
839
2592
  // Operation Specifications
840
2593
  const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
841
- const listOperationSpec = {
842
- path: "/providers/Microsoft.Communication/operations",
2594
+ const getOperationSpec$1 = {
2595
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}",
843
2596
  httpMethod: "GET",
844
2597
  responses: {
845
2598
  200: {
846
- bodyMapper: OperationListResult
2599
+ bodyMapper: DomainResource
847
2600
  },
848
2601
  default: {
849
2602
  bodyMapper: ErrorResponse
850
2603
  }
851
2604
  },
852
2605
  queryParameters: [apiVersion],
853
- urlParameters: [$host],
2606
+ urlParameters: [
2607
+ $host,
2608
+ subscriptionId,
2609
+ resourceGroupName,
2610
+ emailServiceName,
2611
+ domainName
2612
+ ],
854
2613
  headerParameters: [accept],
855
2614
  serializer: serializer$1
856
2615
  };
857
- const listNextOperationSpec = {
858
- path: "{nextLink}",
2616
+ const createOrUpdateOperationSpec$1 = {
2617
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}",
2618
+ httpMethod: "PUT",
2619
+ responses: {
2620
+ 200: {
2621
+ bodyMapper: DomainResource
2622
+ },
2623
+ 201: {
2624
+ bodyMapper: DomainResource
2625
+ },
2626
+ 202: {
2627
+ bodyMapper: DomainResource
2628
+ },
2629
+ 204: {
2630
+ bodyMapper: DomainResource
2631
+ },
2632
+ default: {
2633
+ bodyMapper: ErrorResponse
2634
+ }
2635
+ },
2636
+ requestBody: parameters3,
2637
+ queryParameters: [apiVersion],
2638
+ urlParameters: [
2639
+ $host,
2640
+ subscriptionId,
2641
+ resourceGroupName,
2642
+ emailServiceName,
2643
+ domainName
2644
+ ],
2645
+ headerParameters: [accept, contentType],
2646
+ mediaType: "json",
2647
+ serializer: serializer$1
2648
+ };
2649
+ const deleteOperationSpec$1 = {
2650
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}",
2651
+ httpMethod: "DELETE",
2652
+ responses: {
2653
+ 200: {},
2654
+ 201: {},
2655
+ 202: {},
2656
+ 204: {},
2657
+ default: {
2658
+ bodyMapper: ErrorResponse
2659
+ }
2660
+ },
2661
+ queryParameters: [apiVersion],
2662
+ urlParameters: [
2663
+ $host,
2664
+ subscriptionId,
2665
+ resourceGroupName,
2666
+ emailServiceName,
2667
+ domainName
2668
+ ],
2669
+ headerParameters: [accept],
2670
+ serializer: serializer$1
2671
+ };
2672
+ const updateOperationSpec$1 = {
2673
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}",
2674
+ httpMethod: "PATCH",
2675
+ responses: {
2676
+ 200: {
2677
+ bodyMapper: DomainResource
2678
+ },
2679
+ 201: {
2680
+ bodyMapper: DomainResource
2681
+ },
2682
+ 202: {
2683
+ bodyMapper: DomainResource
2684
+ },
2685
+ 204: {
2686
+ bodyMapper: DomainResource
2687
+ },
2688
+ default: {
2689
+ bodyMapper: ErrorResponse
2690
+ }
2691
+ },
2692
+ requestBody: parameters4,
2693
+ queryParameters: [apiVersion],
2694
+ urlParameters: [
2695
+ $host,
2696
+ subscriptionId,
2697
+ resourceGroupName,
2698
+ emailServiceName,
2699
+ domainName
2700
+ ],
2701
+ headerParameters: [accept, contentType],
2702
+ mediaType: "json",
2703
+ serializer: serializer$1
2704
+ };
2705
+ const listByEmailServiceResourceOperationSpec = {
2706
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains",
859
2707
  httpMethod: "GET",
860
2708
  responses: {
861
2709
  200: {
862
- bodyMapper: OperationListResult
2710
+ bodyMapper: DomainResourceList
863
2711
  },
864
2712
  default: {
865
2713
  bodyMapper: ErrorResponse
866
2714
  }
867
2715
  },
868
2716
  queryParameters: [apiVersion],
869
- urlParameters: [$host, nextLink],
2717
+ urlParameters: [
2718
+ $host,
2719
+ subscriptionId,
2720
+ resourceGroupName,
2721
+ emailServiceName
2722
+ ],
2723
+ headerParameters: [accept],
2724
+ serializer: serializer$1
2725
+ };
2726
+ const initiateVerificationOperationSpec = {
2727
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/initiateVerification",
2728
+ httpMethod: "POST",
2729
+ responses: {
2730
+ 200: {
2731
+ headersMapper: DomainsInitiateVerificationHeaders
2732
+ },
2733
+ 201: {
2734
+ headersMapper: DomainsInitiateVerificationHeaders
2735
+ },
2736
+ 202: {
2737
+ headersMapper: DomainsInitiateVerificationHeaders
2738
+ },
2739
+ 204: {
2740
+ headersMapper: DomainsInitiateVerificationHeaders
2741
+ },
2742
+ default: {
2743
+ bodyMapper: ErrorResponse
2744
+ }
2745
+ },
2746
+ requestBody: parameters5,
2747
+ queryParameters: [apiVersion],
2748
+ urlParameters: [
2749
+ $host,
2750
+ subscriptionId,
2751
+ resourceGroupName,
2752
+ emailServiceName,
2753
+ domainName
2754
+ ],
2755
+ headerParameters: [accept, contentType],
2756
+ mediaType: "json",
2757
+ serializer: serializer$1
2758
+ };
2759
+ const cancelVerificationOperationSpec = {
2760
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/cancelVerification",
2761
+ httpMethod: "POST",
2762
+ responses: {
2763
+ 200: {
2764
+ headersMapper: DomainsCancelVerificationHeaders
2765
+ },
2766
+ 201: {
2767
+ headersMapper: DomainsCancelVerificationHeaders
2768
+ },
2769
+ 202: {
2770
+ headersMapper: DomainsCancelVerificationHeaders
2771
+ },
2772
+ 204: {
2773
+ headersMapper: DomainsCancelVerificationHeaders
2774
+ },
2775
+ default: {
2776
+ bodyMapper: ErrorResponse
2777
+ }
2778
+ },
2779
+ requestBody: parameters5,
2780
+ queryParameters: [apiVersion],
2781
+ urlParameters: [
2782
+ $host,
2783
+ subscriptionId,
2784
+ resourceGroupName,
2785
+ emailServiceName,
2786
+ domainName
2787
+ ],
2788
+ headerParameters: [accept, contentType],
2789
+ mediaType: "json",
2790
+ serializer: serializer$1
2791
+ };
2792
+ const listByEmailServiceResourceNextOperationSpec = {
2793
+ path: "{nextLink}",
2794
+ httpMethod: "GET",
2795
+ responses: {
2796
+ 200: {
2797
+ bodyMapper: DomainResourceList
2798
+ },
2799
+ default: {
2800
+ bodyMapper: ErrorResponse
2801
+ }
2802
+ },
2803
+ queryParameters: [apiVersion],
2804
+ urlParameters: [
2805
+ $host,
2806
+ nextLink,
2807
+ subscriptionId,
2808
+ resourceGroupName,
2809
+ emailServiceName
2810
+ ],
870
2811
  headerParameters: [accept],
871
2812
  serializer: serializer$1
872
2813
  };
873
-
874
- /*
875
- * Copyright (c) Microsoft Corporation.
876
- * Licensed under the MIT License.
877
- *
878
- * Code generated by Microsoft (R) AutoRest Code Generator.
879
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
880
- */
881
- class LroImpl {
882
- constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
883
- this.sendOperationFn = sendOperationFn;
884
- this.args = args;
885
- this.spec = spec;
886
- this.requestPath = requestPath;
887
- this.requestMethod = requestMethod;
888
- }
889
- sendInitialRequest() {
890
- return tslib.__awaiter(this, void 0, void 0, function* () {
891
- return this.sendOperationFn(this.args, this.spec);
892
- });
893
- }
894
- sendPollRequest(path) {
895
- return tslib.__awaiter(this, void 0, void 0, function* () {
896
- const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
897
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
898
- });
899
- }
900
- }
901
2814
 
902
2815
  /*
903
2816
  * Copyright (c) Microsoft Corporation.
@@ -907,10 +2820,10 @@ class LroImpl {
907
2820
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
908
2821
  */
909
2822
  /// <reference lib="esnext.asynciterable" />
910
- /** Class containing CommunicationService operations. */
911
- class CommunicationServiceImpl {
2823
+ /** Class containing EmailServices operations. */
2824
+ class EmailServicesImpl {
912
2825
  /**
913
- * Initialize a new instance of the class CommunicationService class.
2826
+ * Initialize a new instance of the class EmailServices class.
914
2827
  * @param client Reference to the service client
915
2828
  */
916
2829
  constructor(client) {
@@ -1014,61 +2927,75 @@ class CommunicationServiceImpl {
1014
2927
  });
1015
2928
  }
1016
2929
  /**
1017
- * Checks that the CommunicationService name is valid and is not already in use.
1018
- * @param options The options parameters.
1019
- */
1020
- checkNameAvailability(options) {
1021
- return this.client.sendOperationRequest({ options }, checkNameAvailabilityOperationSpec);
1022
- }
1023
- /**
1024
- * Links an Azure Notification Hub to this communication service.
1025
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1026
- * @param communicationServiceName The name of the CommunicationService resource.
1027
- * @param options The options parameters.
1028
- */
1029
- linkNotificationHub(resourceGroupName, communicationServiceName, options) {
1030
- return this.client.sendOperationRequest({ resourceGroupName, communicationServiceName, options }, linkNotificationHubOperationSpec);
1031
- }
1032
- /**
1033
- * Handles requests to list all resources in a subscription.
1034
- * @param options The options parameters.
1035
- */
1036
- _listBySubscription(options) {
1037
- return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
1038
- }
1039
- /**
1040
- * Handles requests to list all resources in a resource group.
2930
+ * Get the EmailService and its properties.
1041
2931
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
2932
+ * @param emailServiceName The name of the EmailService resource.
1042
2933
  * @param options The options parameters.
1043
2934
  */
1044
- _listByResourceGroup(resourceGroupName, options) {
1045
- return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
2935
+ get(resourceGroupName, emailServiceName, options) {
2936
+ return this.client.sendOperationRequest({ resourceGroupName, emailServiceName, options }, getOperationSpec);
1046
2937
  }
1047
2938
  /**
1048
- * Operation to update an existing CommunicationService.
2939
+ * Create a new EmailService or update an existing EmailService.
1049
2940
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1050
- * @param communicationServiceName The name of the CommunicationService resource.
2941
+ * @param emailServiceName The name of the EmailService resource.
2942
+ * @param parameters Parameters for the create or update operation
1051
2943
  * @param options The options parameters.
1052
2944
  */
1053
- update(resourceGroupName, communicationServiceName, options) {
1054
- return this.client.sendOperationRequest({ resourceGroupName, communicationServiceName, options }, updateOperationSpec);
2945
+ beginCreateOrUpdate(resourceGroupName, emailServiceName, parameters, options) {
2946
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2947
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2948
+ return this.client.sendOperationRequest(args, spec);
2949
+ });
2950
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2951
+ var _a;
2952
+ let currentRawResponse = undefined;
2953
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2954
+ const callback = (rawResponse, flatResponse) => {
2955
+ currentRawResponse = rawResponse;
2956
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2957
+ };
2958
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2959
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2960
+ return {
2961
+ flatResponse,
2962
+ rawResponse: {
2963
+ statusCode: currentRawResponse.status,
2964
+ body: currentRawResponse.parsedBody,
2965
+ headers: currentRawResponse.headers.toJSON()
2966
+ }
2967
+ };
2968
+ });
2969
+ const lro = new LroImpl(sendOperation, { resourceGroupName, emailServiceName, parameters, options }, createOrUpdateOperationSpec);
2970
+ const poller = new coreLro.LroEngine(lro, {
2971
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2972
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2973
+ lroResourceLocationConfig: "azure-async-operation"
2974
+ });
2975
+ yield poller.poll();
2976
+ return poller;
2977
+ });
1055
2978
  }
1056
2979
  /**
1057
- * Get the CommunicationService and its properties.
2980
+ * Create a new EmailService or update an existing EmailService.
1058
2981
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1059
- * @param communicationServiceName The name of the CommunicationService resource.
2982
+ * @param emailServiceName The name of the EmailService resource.
2983
+ * @param parameters Parameters for the create or update operation
1060
2984
  * @param options The options parameters.
1061
2985
  */
1062
- get(resourceGroupName, communicationServiceName, options) {
1063
- return this.client.sendOperationRequest({ resourceGroupName, communicationServiceName, options }, getOperationSpec);
2986
+ beginCreateOrUpdateAndWait(resourceGroupName, emailServiceName, parameters, options) {
2987
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2988
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, emailServiceName, parameters, options);
2989
+ return poller.pollUntilDone();
2990
+ });
1064
2991
  }
1065
2992
  /**
1066
- * Create a new CommunicationService or update an existing CommunicationService.
2993
+ * Operation to delete a EmailService.
1067
2994
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1068
- * @param communicationServiceName The name of the CommunicationService resource.
2995
+ * @param emailServiceName The name of the EmailService resource.
1069
2996
  * @param options The options parameters.
1070
2997
  */
1071
- beginCreateOrUpdate(resourceGroupName, communicationServiceName, options) {
2998
+ beginDelete(resourceGroupName, emailServiceName, options) {
1072
2999
  return tslib.__awaiter(this, void 0, void 0, function* () {
1073
3000
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1074
3001
  return this.client.sendOperationRequest(args, spec);
@@ -1092,35 +3019,36 @@ class CommunicationServiceImpl {
1092
3019
  }
1093
3020
  };
1094
3021
  });
1095
- const lro = new LroImpl(sendOperation, { resourceGroupName, communicationServiceName, options }, createOrUpdateOperationSpec);
3022
+ const lro = new LroImpl(sendOperation, { resourceGroupName, emailServiceName, options }, deleteOperationSpec);
1096
3023
  const poller = new coreLro.LroEngine(lro, {
1097
3024
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1098
3025
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1099
- lroResourceLocationConfig: "azure-async-operation"
3026
+ lroResourceLocationConfig: "location"
1100
3027
  });
1101
3028
  yield poller.poll();
1102
3029
  return poller;
1103
3030
  });
1104
3031
  }
1105
3032
  /**
1106
- * Create a new CommunicationService or update an existing CommunicationService.
3033
+ * Operation to delete a EmailService.
1107
3034
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1108
- * @param communicationServiceName The name of the CommunicationService resource.
3035
+ * @param emailServiceName The name of the EmailService resource.
1109
3036
  * @param options The options parameters.
1110
3037
  */
1111
- beginCreateOrUpdateAndWait(resourceGroupName, communicationServiceName, options) {
3038
+ beginDeleteAndWait(resourceGroupName, emailServiceName, options) {
1112
3039
  return tslib.__awaiter(this, void 0, void 0, function* () {
1113
- const poller = yield this.beginCreateOrUpdate(resourceGroupName, communicationServiceName, options);
3040
+ const poller = yield this.beginDelete(resourceGroupName, emailServiceName, options);
1114
3041
  return poller.pollUntilDone();
1115
3042
  });
1116
3043
  }
1117
3044
  /**
1118
- * Operation to delete a CommunicationService.
3045
+ * Operation to update an existing EmailService.
1119
3046
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1120
- * @param communicationServiceName The name of the CommunicationService resource.
3047
+ * @param emailServiceName The name of the EmailService resource.
3048
+ * @param parameters Parameters for the update operation
1121
3049
  * @param options The options parameters.
1122
3050
  */
1123
- beginDelete(resourceGroupName, communicationServiceName, options) {
3051
+ beginUpdate(resourceGroupName, emailServiceName, parameters, options) {
1124
3052
  return tslib.__awaiter(this, void 0, void 0, function* () {
1125
3053
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1126
3054
  return this.client.sendOperationRequest(args, spec);
@@ -1144,47 +3072,50 @@ class CommunicationServiceImpl {
1144
3072
  }
1145
3073
  };
1146
3074
  });
1147
- const lro = new LroImpl(sendOperation, { resourceGroupName, communicationServiceName, options }, deleteOperationSpec);
3075
+ const lro = new LroImpl(sendOperation, { resourceGroupName, emailServiceName, parameters, options }, updateOperationSpec);
1148
3076
  const poller = new coreLro.LroEngine(lro, {
1149
3077
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1150
3078
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1151
- lroResourceLocationConfig: "location"
3079
+ lroResourceLocationConfig: "azure-async-operation"
1152
3080
  });
1153
3081
  yield poller.poll();
1154
3082
  return poller;
1155
3083
  });
1156
3084
  }
1157
3085
  /**
1158
- * Operation to delete a CommunicationService.
3086
+ * Operation to update an existing EmailService.
1159
3087
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1160
- * @param communicationServiceName The name of the CommunicationService resource.
3088
+ * @param emailServiceName The name of the EmailService resource.
3089
+ * @param parameters Parameters for the update operation
1161
3090
  * @param options The options parameters.
1162
3091
  */
1163
- beginDeleteAndWait(resourceGroupName, communicationServiceName, options) {
3092
+ beginUpdateAndWait(resourceGroupName, emailServiceName, parameters, options) {
1164
3093
  return tslib.__awaiter(this, void 0, void 0, function* () {
1165
- const poller = yield this.beginDelete(resourceGroupName, communicationServiceName, options);
3094
+ const poller = yield this.beginUpdate(resourceGroupName, emailServiceName, parameters, options);
1166
3095
  return poller.pollUntilDone();
1167
3096
  });
1168
3097
  }
1169
3098
  /**
1170
- * Get the access keys of the CommunicationService resource.
1171
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1172
- * @param communicationServiceName The name of the CommunicationService resource.
3099
+ * Handles requests to list all resources in a subscription.
1173
3100
  * @param options The options parameters.
1174
3101
  */
1175
- listKeys(resourceGroupName, communicationServiceName, options) {
1176
- return this.client.sendOperationRequest({ resourceGroupName, communicationServiceName, options }, listKeysOperationSpec);
3102
+ _listBySubscription(options) {
3103
+ return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
1177
3104
  }
1178
3105
  /**
1179
- * Regenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at the
1180
- * same time.
3106
+ * Handles requests to list all resources in a resource group.
1181
3107
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1182
- * @param communicationServiceName The name of the CommunicationService resource.
1183
- * @param parameters Parameter that describes the Regenerate Key Operation.
1184
3108
  * @param options The options parameters.
1185
3109
  */
1186
- regenerateKey(resourceGroupName, communicationServiceName, parameters, options) {
1187
- return this.client.sendOperationRequest({ resourceGroupName, communicationServiceName, parameters, options }, regenerateKeyOperationSpec);
3110
+ _listByResourceGroup(resourceGroupName, options) {
3111
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
3112
+ }
3113
+ /**
3114
+ * Get a list of domains that are fully verified in Exchange Online.
3115
+ * @param options The options parameters.
3116
+ */
3117
+ listVerifiedExchangeOnlineDomains(options) {
3118
+ return this.client.sendOperationRequest({ options }, listVerifiedExchangeOnlineDomainsOperationSpec);
1188
3119
  }
1189
3120
  /**
1190
3121
  * ListBySubscriptionNext
@@ -1206,113 +3137,67 @@ class CommunicationServiceImpl {
1206
3137
  }
1207
3138
  // Operation Specifications
1208
3139
  const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1209
- const checkNameAvailabilityOperationSpec = {
1210
- path: "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/checkNameAvailability",
1211
- httpMethod: "POST",
1212
- responses: {
1213
- 200: {
1214
- bodyMapper: NameAvailability
1215
- },
1216
- default: {
1217
- bodyMapper: ErrorResponse
1218
- }
1219
- },
1220
- requestBody: nameAvailabilityParameters,
1221
- queryParameters: [apiVersion],
1222
- urlParameters: [$host, subscriptionId],
1223
- headerParameters: [accept, contentType],
1224
- mediaType: "json",
1225
- serializer
1226
- };
1227
- const linkNotificationHubOperationSpec = {
1228
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/linkNotificationHub",
1229
- httpMethod: "POST",
3140
+ const getOperationSpec = {
3141
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}",
3142
+ httpMethod: "GET",
1230
3143
  responses: {
1231
3144
  200: {
1232
- bodyMapper: LinkedNotificationHub
3145
+ bodyMapper: EmailServiceResource
1233
3146
  },
1234
3147
  default: {
1235
3148
  bodyMapper: ErrorResponse
1236
3149
  }
1237
3150
  },
1238
- requestBody: linkNotificationHubParameters,
1239
3151
  queryParameters: [apiVersion],
1240
3152
  urlParameters: [
1241
3153
  $host,
1242
3154
  subscriptionId,
1243
3155
  resourceGroupName,
1244
- communicationServiceName
3156
+ emailServiceName
1245
3157
  ],
1246
- headerParameters: [accept, contentType],
1247
- mediaType: "json",
1248
- serializer
1249
- };
1250
- const listBySubscriptionOperationSpec = {
1251
- path: "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/communicationServices",
1252
- httpMethod: "GET",
1253
- responses: {
1254
- 200: {
1255
- bodyMapper: CommunicationServiceResourceList
1256
- },
1257
- default: {
1258
- bodyMapper: ErrorResponse
1259
- }
1260
- },
1261
- queryParameters: [apiVersion],
1262
- urlParameters: [$host, subscriptionId],
1263
3158
  headerParameters: [accept],
1264
3159
  serializer
1265
3160
  };
1266
- const listByResourceGroupOperationSpec = {
1267
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices",
1268
- httpMethod: "GET",
3161
+ const createOrUpdateOperationSpec = {
3162
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}",
3163
+ httpMethod: "PUT",
1269
3164
  responses: {
1270
3165
  200: {
1271
- bodyMapper: CommunicationServiceResourceList
3166
+ bodyMapper: EmailServiceResource
1272
3167
  },
1273
- default: {
1274
- bodyMapper: ErrorResponse
1275
- }
1276
- },
1277
- queryParameters: [apiVersion],
1278
- urlParameters: [
1279
- $host,
1280
- subscriptionId,
1281
- resourceGroupName
1282
- ],
1283
- headerParameters: [accept],
1284
- serializer
1285
- };
1286
- const updateOperationSpec = {
1287
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}",
1288
- httpMethod: "PATCH",
1289
- responses: {
1290
- 200: {
1291
- bodyMapper: CommunicationServiceResource
3168
+ 201: {
3169
+ bodyMapper: EmailServiceResource
3170
+ },
3171
+ 202: {
3172
+ bodyMapper: EmailServiceResource
3173
+ },
3174
+ 204: {
3175
+ bodyMapper: EmailServiceResource
1292
3176
  },
1293
3177
  default: {
1294
3178
  bodyMapper: ErrorResponse
1295
3179
  }
1296
3180
  },
1297
- requestBody: parameters,
3181
+ requestBody: parameters6,
1298
3182
  queryParameters: [apiVersion],
1299
3183
  urlParameters: [
1300
3184
  $host,
1301
3185
  subscriptionId,
1302
3186
  resourceGroupName,
1303
- communicationServiceName
3187
+ emailServiceName
1304
3188
  ],
1305
3189
  headerParameters: [accept, contentType],
1306
3190
  mediaType: "json",
1307
3191
  serializer
1308
3192
  };
1309
- const getOperationSpec = {
1310
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}",
1311
- httpMethod: "GET",
3193
+ const deleteOperationSpec = {
3194
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}",
3195
+ httpMethod: "DELETE",
1312
3196
  responses: {
1313
- 200: {
1314
- bodyMapper: CommunicationServiceResource
1315
- },
3197
+ 200: {},
3198
+ 201: {},
3199
+ 202: {},
3200
+ 204: {},
1316
3201
  default: {
1317
3202
  bodyMapper: ErrorResponse
1318
3203
  }
@@ -1322,71 +3207,65 @@ const getOperationSpec = {
1322
3207
  $host,
1323
3208
  subscriptionId,
1324
3209
  resourceGroupName,
1325
- communicationServiceName
3210
+ emailServiceName
1326
3211
  ],
1327
3212
  headerParameters: [accept],
1328
3213
  serializer
1329
3214
  };
1330
- const createOrUpdateOperationSpec = {
1331
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}",
1332
- httpMethod: "PUT",
3215
+ const updateOperationSpec = {
3216
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}",
3217
+ httpMethod: "PATCH",
1333
3218
  responses: {
1334
3219
  200: {
1335
- bodyMapper: CommunicationServiceResource
3220
+ bodyMapper: EmailServiceResource
1336
3221
  },
1337
3222
  201: {
1338
- bodyMapper: CommunicationServiceResource
3223
+ bodyMapper: EmailServiceResource
1339
3224
  },
1340
3225
  202: {
1341
- bodyMapper: CommunicationServiceResource
3226
+ bodyMapper: EmailServiceResource
1342
3227
  },
1343
3228
  204: {
1344
- bodyMapper: CommunicationServiceResource
3229
+ bodyMapper: EmailServiceResource
1345
3230
  },
1346
3231
  default: {
1347
3232
  bodyMapper: ErrorResponse
1348
3233
  }
1349
3234
  },
1350
- requestBody: parameters,
3235
+ requestBody: parameters7,
1351
3236
  queryParameters: [apiVersion],
1352
3237
  urlParameters: [
1353
3238
  $host,
1354
3239
  subscriptionId,
1355
3240
  resourceGroupName,
1356
- communicationServiceName
3241
+ emailServiceName
1357
3242
  ],
1358
3243
  headerParameters: [accept, contentType],
1359
3244
  mediaType: "json",
1360
3245
  serializer
1361
3246
  };
1362
- const deleteOperationSpec = {
1363
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}",
1364
- httpMethod: "DELETE",
3247
+ const listBySubscriptionOperationSpec = {
3248
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/emailServices",
3249
+ httpMethod: "GET",
1365
3250
  responses: {
1366
- 200: {},
1367
- 201: {},
1368
- 202: {},
1369
- 204: {},
3251
+ 200: {
3252
+ bodyMapper: EmailServiceResourceList
3253
+ },
1370
3254
  default: {
1371
3255
  bodyMapper: ErrorResponse
1372
3256
  }
1373
3257
  },
1374
3258
  queryParameters: [apiVersion],
1375
- urlParameters: [
1376
- $host,
1377
- subscriptionId,
1378
- resourceGroupName,
1379
- communicationServiceName
1380
- ],
3259
+ urlParameters: [$host, subscriptionId],
1381
3260
  headerParameters: [accept],
1382
3261
  serializer
1383
3262
  };
1384
- const listKeysOperationSpec = {
1385
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/listKeys",
1386
- httpMethod: "POST",
3263
+ const listByResourceGroupOperationSpec = {
3264
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices",
3265
+ httpMethod: "GET",
1387
3266
  responses: {
1388
3267
  200: {
1389
- bodyMapper: CommunicationServiceKeys
3268
+ bodyMapper: EmailServiceResourceList
1390
3269
  },
1391
3270
  default: {
1392
3271
  bodyMapper: ErrorResponse
@@ -1396,33 +3275,27 @@ const listKeysOperationSpec = {
1396
3275
  urlParameters: [
1397
3276
  $host,
1398
3277
  subscriptionId,
1399
- resourceGroupName,
1400
- communicationServiceName
3278
+ resourceGroupName
1401
3279
  ],
1402
3280
  headerParameters: [accept],
1403
3281
  serializer
1404
3282
  };
1405
- const regenerateKeyOperationSpec = {
1406
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/regenerateKey",
3283
+ const listVerifiedExchangeOnlineDomainsOperationSpec = {
3284
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/listVerifiedExchangeOnlineDomains",
1407
3285
  httpMethod: "POST",
1408
3286
  responses: {
1409
3287
  200: {
1410
- bodyMapper: CommunicationServiceKeys
3288
+ bodyMapper: {
3289
+ type: { name: "Sequence", element: { type: { name: "String" } } }
3290
+ }
1411
3291
  },
1412
3292
  default: {
1413
3293
  bodyMapper: ErrorResponse
1414
3294
  }
1415
3295
  },
1416
- requestBody: parameters1,
1417
3296
  queryParameters: [apiVersion],
1418
- urlParameters: [
1419
- $host,
1420
- subscriptionId,
1421
- resourceGroupName,
1422
- communicationServiceName
1423
- ],
1424
- headerParameters: [accept, contentType],
1425
- mediaType: "json",
3297
+ urlParameters: [$host, subscriptionId],
3298
+ headerParameters: [accept],
1426
3299
  serializer
1427
3300
  };
1428
3301
  const listBySubscriptionNextOperationSpec = {
@@ -1430,7 +3303,7 @@ const listBySubscriptionNextOperationSpec = {
1430
3303
  httpMethod: "GET",
1431
3304
  responses: {
1432
3305
  200: {
1433
- bodyMapper: CommunicationServiceResourceList
3306
+ bodyMapper: EmailServiceResourceList
1434
3307
  },
1435
3308
  default: {
1436
3309
  bodyMapper: ErrorResponse
@@ -1450,7 +3323,7 @@ const listByResourceGroupNextOperationSpec = {
1450
3323
  httpMethod: "GET",
1451
3324
  responses: {
1452
3325
  200: {
1453
- bodyMapper: CommunicationServiceResourceList
3326
+ bodyMapper: EmailServiceResourceList
1454
3327
  },
1455
3328
  default: {
1456
3329
  bodyMapper: ErrorResponse
@@ -1497,7 +3370,7 @@ class CommunicationServiceManagementClient extends coreClient__namespace.Service
1497
3370
  requestContentType: "application/json; charset=utf-8",
1498
3371
  credential: credentials
1499
3372
  };
1500
- const packageDetails = `azsdk-js-arm-communication/3.0.1`;
3373
+ const packageDetails = `azsdk-js-arm-communication/4.0.0-beta.1`;
1501
3374
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1502
3375
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1503
3376
  : `${packageDetails}`;
@@ -1508,13 +3381,59 @@ class CommunicationServiceManagementClient extends coreClient__namespace.Service
1508
3381
  userAgentPrefix
1509
3382
  }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
1510
3383
  super(optionsWithDefaults);
3384
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
3385
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
3386
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
3387
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
3388
+ if (!bearerTokenAuthenticationPolicyFound) {
3389
+ this.pipeline.removePolicy({
3390
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
3391
+ });
3392
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
3393
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
3394
+ challengeCallbacks: {
3395
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
3396
+ }
3397
+ }));
3398
+ }
3399
+ }
1511
3400
  // Parameter assignments
1512
3401
  this.subscriptionId = subscriptionId;
1513
3402
  // Assigning values to Constant parameters
1514
3403
  this.$host = options.$host || "https://management.azure.com";
1515
- this.apiVersion = options.apiVersion || "2020-08-20";
3404
+ this.apiVersion = options.apiVersion || "2021-10-01-preview";
1516
3405
  this.operations = new OperationsImpl(this);
1517
- this.communicationService = new CommunicationServiceImpl(this);
3406
+ this.communicationServices = new CommunicationServicesImpl(this);
3407
+ this.domains = new DomainsImpl(this);
3408
+ this.emailServices = new EmailServicesImpl(this);
3409
+ this.addCustomApiVersionPolicy(options.apiVersion);
3410
+ }
3411
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
3412
+ addCustomApiVersionPolicy(apiVersion) {
3413
+ if (!apiVersion) {
3414
+ return;
3415
+ }
3416
+ const apiVersionPolicy = {
3417
+ name: "CustomApiVersionPolicy",
3418
+ sendRequest(request, next) {
3419
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3420
+ const param = request.url.split("?");
3421
+ if (param.length > 1) {
3422
+ const newParams = param[1].split("&").map((item) => {
3423
+ if (item.indexOf("api-version") > -1) {
3424
+ return item.replace(/(?<==).*$/, apiVersion);
3425
+ }
3426
+ else {
3427
+ return item;
3428
+ }
3429
+ });
3430
+ request.url = param[0] + "?" + newParams.join("&");
3431
+ }
3432
+ return next(request);
3433
+ });
3434
+ }
3435
+ };
3436
+ this.pipeline.addPolicy(apiVersionPolicy);
1518
3437
  }
1519
3438
  }
1520
3439