@azure/arm-healthcareapis 3.1.1-alpha.20250619.1 → 3.1.1-alpha.20250718.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/healthcareApisManagementClient.js +26 -5
- package/dist/browser/healthcareApisManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +158 -67
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/dicomServices.js +56 -58
- package/dist/browser/operations/dicomServices.js.map +1 -1
- package/dist/browser/operations/fhirDestinations.js +23 -40
- package/dist/browser/operations/fhirDestinations.js.map +1 -1
- package/dist/browser/operations/fhirServices.js +56 -58
- package/dist/browser/operations/fhirServices.js.map +1 -1
- package/dist/browser/operations/iotConnectorFhirDestination.js +23 -12
- package/dist/browser/operations/iotConnectorFhirDestination.js.map +1 -1
- package/dist/browser/operations/iotConnectors.js +56 -58
- package/dist/browser/operations/iotConnectors.js.map +1 -1
- package/dist/browser/operations/operationResults.js +1 -0
- package/dist/browser/operations/operationResults.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/privateEndpointConnections.js +32 -39
- package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
- package/dist/browser/operations/privateLinkResources.js +1 -0
- package/dist/browser/operations/privateLinkResources.js.map +1 -1
- package/dist/browser/operations/services.js +78 -97
- package/dist/browser/operations/services.js.map +1 -1
- package/dist/browser/operations/workspacePrivateEndpointConnections.js +32 -39
- package/dist/browser/operations/workspacePrivateEndpointConnections.js.map +1 -1
- package/dist/browser/operations/workspacePrivateLinkResources.js +10 -27
- package/dist/browser/operations/workspacePrivateLinkResources.js.map +1 -1
- package/dist/browser/operations/workspaces.js +78 -97
- package/dist/browser/operations/workspaces.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/healthcareApisManagementClient.js +26 -5
- package/dist/commonjs/healthcareApisManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +158 -67
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/dicomServices.js +56 -57
- package/dist/commonjs/operations/dicomServices.js.map +1 -1
- package/dist/commonjs/operations/fhirDestinations.js +23 -39
- package/dist/commonjs/operations/fhirDestinations.js.map +1 -1
- package/dist/commonjs/operations/fhirServices.js +56 -57
- package/dist/commonjs/operations/fhirServices.js.map +1 -1
- package/dist/commonjs/operations/iotConnectorFhirDestination.js +23 -12
- package/dist/commonjs/operations/iotConnectorFhirDestination.js.map +1 -1
- package/dist/commonjs/operations/iotConnectors.js +56 -57
- package/dist/commonjs/operations/iotConnectors.js.map +1 -1
- package/dist/commonjs/operations/operationResults.js +1 -0
- package/dist/commonjs/operations/operationResults.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/privateEndpointConnections.js +32 -38
- package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
- package/dist/commonjs/operations/privateLinkResources.js +1 -0
- package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
- package/dist/commonjs/operations/services.js +78 -96
- package/dist/commonjs/operations/services.js.map +1 -1
- package/dist/commonjs/operations/workspacePrivateEndpointConnections.js +32 -38
- package/dist/commonjs/operations/workspacePrivateEndpointConnections.js.map +1 -1
- package/dist/commonjs/operations/workspacePrivateLinkResources.js +10 -26
- package/dist/commonjs/operations/workspacePrivateLinkResources.js.map +1 -1
- package/dist/commonjs/operations/workspaces.js +78 -96
- package/dist/commonjs/operations/workspaces.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/healthcareApisManagementClient.js +26 -5
- package/dist/esm/healthcareApisManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +158 -67
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/dicomServices.js +56 -58
- package/dist/esm/operations/dicomServices.js.map +1 -1
- package/dist/esm/operations/fhirDestinations.js +23 -40
- package/dist/esm/operations/fhirDestinations.js.map +1 -1
- package/dist/esm/operations/fhirServices.js +56 -58
- package/dist/esm/operations/fhirServices.js.map +1 -1
- package/dist/esm/operations/iotConnectorFhirDestination.js +23 -12
- package/dist/esm/operations/iotConnectorFhirDestination.js.map +1 -1
- package/dist/esm/operations/iotConnectors.js +56 -58
- package/dist/esm/operations/iotConnectors.js.map +1 -1
- package/dist/esm/operations/operationResults.js +1 -0
- package/dist/esm/operations/operationResults.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/privateEndpointConnections.js +32 -39
- package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
- package/dist/esm/operations/privateLinkResources.js +1 -0
- package/dist/esm/operations/privateLinkResources.js.map +1 -1
- package/dist/esm/operations/services.js +78 -97
- package/dist/esm/operations/services.js.map +1 -1
- package/dist/esm/operations/workspacePrivateEndpointConnections.js +32 -39
- package/dist/esm/operations/workspacePrivateEndpointConnections.js.map +1 -1
- package/dist/esm/operations/workspacePrivateLinkResources.js +10 -27
- package/dist/esm/operations/workspacePrivateLinkResources.js.map +1 -1
- package/dist/esm/operations/workspaces.js +78 -97
- package/dist/esm/operations/workspaces.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/healthcareApisManagementClient.js +26 -5
- package/dist/react-native/healthcareApisManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +158 -67
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/dicomServices.js +56 -58
- package/dist/react-native/operations/dicomServices.js.map +1 -1
- package/dist/react-native/operations/fhirDestinations.js +23 -40
- package/dist/react-native/operations/fhirDestinations.js.map +1 -1
- package/dist/react-native/operations/fhirServices.js +56 -58
- package/dist/react-native/operations/fhirServices.js.map +1 -1
- package/dist/react-native/operations/iotConnectorFhirDestination.js +23 -12
- package/dist/react-native/operations/iotConnectorFhirDestination.js.map +1 -1
- package/dist/react-native/operations/iotConnectors.js +56 -58
- package/dist/react-native/operations/iotConnectors.js.map +1 -1
- package/dist/react-native/operations/operationResults.js +1 -0
- package/dist/react-native/operations/operationResults.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/privateEndpointConnections.js +32 -39
- package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
- package/dist/react-native/operations/privateLinkResources.js +1 -0
- package/dist/react-native/operations/privateLinkResources.js.map +1 -1
- package/dist/react-native/operations/services.js +78 -97
- package/dist/react-native/operations/services.js.map +1 -1
- package/dist/react-native/operations/workspacePrivateEndpointConnections.js +32 -39
- package/dist/react-native/operations/workspacePrivateEndpointConnections.js.map +1 -1
- package/dist/react-native/operations/workspacePrivateLinkResources.js +10 -27
- package/dist/react-native/operations/workspacePrivateLinkResources.js.map +1 -1
- package/dist/react-native/operations/workspaces.js +78 -97
- package/dist/react-native/operations/workspaces.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-healthcareapis.api.md → arm-healthcareapis-node.api.md} +0 -0
@@ -5,7 +5,6 @@
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
10
9
|
import * as coreClient from "@azure/core-client";
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
16
15
|
/** Class containing FhirServices operations. */
|
17
16
|
export class FhirServicesImpl {
|
17
|
+
client;
|
18
18
|
/**
|
19
19
|
* Initialize a new instance of the class FhirServices class.
|
20
20
|
* @param client Reference to the service client
|
@@ -38,52 +38,35 @@ export class FhirServicesImpl {
|
|
38
38
|
return this;
|
39
39
|
},
|
40
40
|
byPage: (settings) => {
|
41
|
-
if (settings
|
41
|
+
if (settings?.maxPageSize) {
|
42
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
43
43
|
}
|
44
44
|
return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
|
45
45
|
},
|
46
46
|
};
|
47
47
|
}
|
48
|
-
listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings) {
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
}
|
66
|
-
});
|
48
|
+
async *listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings) {
|
49
|
+
let result;
|
50
|
+
let continuationToken = settings?.continuationToken;
|
51
|
+
if (!continuationToken) {
|
52
|
+
result = await this._listByWorkspace(resourceGroupName, workspaceName, options);
|
53
|
+
let page = result.value || [];
|
54
|
+
continuationToken = result.nextLink;
|
55
|
+
setContinuationToken(page, continuationToken);
|
56
|
+
yield page;
|
57
|
+
}
|
58
|
+
while (continuationToken) {
|
59
|
+
result = await this._listByWorkspaceNext(resourceGroupName, workspaceName, continuationToken, options);
|
60
|
+
continuationToken = result.nextLink;
|
61
|
+
let page = result.value || [];
|
62
|
+
setContinuationToken(page, continuationToken);
|
63
|
+
yield page;
|
64
|
+
}
|
67
65
|
}
|
68
|
-
listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
for (var _d = true, _e = __asyncValues(this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
73
|
-
_c = _f.value;
|
74
|
-
_d = false;
|
75
|
-
const page = _c;
|
76
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
77
|
-
}
|
78
|
-
}
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
80
|
-
finally {
|
81
|
-
try {
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
83
|
-
}
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
85
|
-
}
|
86
|
-
});
|
66
|
+
async *listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
|
67
|
+
for await (const page of this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)) {
|
68
|
+
yield* page;
|
69
|
+
}
|
87
70
|
}
|
88
71
|
/**
|
89
72
|
* Lists all FHIR Services for the given workspace
|
@@ -117,14 +100,19 @@ export class FhirServicesImpl {
|
|
117
100
|
return this.client.sendOperationRequest(args, spec);
|
118
101
|
};
|
119
102
|
const sendOperationFn = async (args, spec) => {
|
120
|
-
var _a;
|
121
103
|
let currentRawResponse = undefined;
|
122
|
-
const providedCallback =
|
104
|
+
const providedCallback = args.options?.onResponse;
|
123
105
|
const callback = (rawResponse, flatResponse) => {
|
124
106
|
currentRawResponse = rawResponse;
|
125
|
-
providedCallback
|
107
|
+
providedCallback?.(rawResponse, flatResponse);
|
108
|
+
};
|
109
|
+
const updatedArgs = {
|
110
|
+
...args,
|
111
|
+
options: {
|
112
|
+
...args.options,
|
113
|
+
onResponse: callback,
|
114
|
+
},
|
126
115
|
};
|
127
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
128
116
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
129
117
|
return {
|
130
118
|
flatResponse,
|
@@ -147,8 +135,8 @@ export class FhirServicesImpl {
|
|
147
135
|
spec: createOrUpdateOperationSpec,
|
148
136
|
});
|
149
137
|
const poller = await createHttpPoller(lro, {
|
150
|
-
restoreFrom: options
|
151
|
-
intervalInMs: options
|
138
|
+
restoreFrom: options?.resumeFrom,
|
139
|
+
intervalInMs: options?.updateIntervalInMs,
|
152
140
|
});
|
153
141
|
await poller.poll();
|
154
142
|
return poller;
|
@@ -178,14 +166,19 @@ export class FhirServicesImpl {
|
|
178
166
|
return this.client.sendOperationRequest(args, spec);
|
179
167
|
};
|
180
168
|
const sendOperationFn = async (args, spec) => {
|
181
|
-
var _a;
|
182
169
|
let currentRawResponse = undefined;
|
183
|
-
const providedCallback =
|
170
|
+
const providedCallback = args.options?.onResponse;
|
184
171
|
const callback = (rawResponse, flatResponse) => {
|
185
172
|
currentRawResponse = rawResponse;
|
186
|
-
providedCallback
|
173
|
+
providedCallback?.(rawResponse, flatResponse);
|
174
|
+
};
|
175
|
+
const updatedArgs = {
|
176
|
+
...args,
|
177
|
+
options: {
|
178
|
+
...args.options,
|
179
|
+
onResponse: callback,
|
180
|
+
},
|
187
181
|
};
|
188
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
189
182
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
190
183
|
return {
|
191
184
|
flatResponse,
|
@@ -208,8 +201,8 @@ export class FhirServicesImpl {
|
|
208
201
|
spec: updateOperationSpec,
|
209
202
|
});
|
210
203
|
const poller = await createHttpPoller(lro, {
|
211
|
-
restoreFrom: options
|
212
|
-
intervalInMs: options
|
204
|
+
restoreFrom: options?.resumeFrom,
|
205
|
+
intervalInMs: options?.updateIntervalInMs,
|
213
206
|
});
|
214
207
|
await poller.poll();
|
215
208
|
return poller;
|
@@ -238,14 +231,19 @@ export class FhirServicesImpl {
|
|
238
231
|
return this.client.sendOperationRequest(args, spec);
|
239
232
|
};
|
240
233
|
const sendOperationFn = async (args, spec) => {
|
241
|
-
var _a;
|
242
234
|
let currentRawResponse = undefined;
|
243
|
-
const providedCallback =
|
235
|
+
const providedCallback = args.options?.onResponse;
|
244
236
|
const callback = (rawResponse, flatResponse) => {
|
245
237
|
currentRawResponse = rawResponse;
|
246
|
-
providedCallback
|
238
|
+
providedCallback?.(rawResponse, flatResponse);
|
239
|
+
};
|
240
|
+
const updatedArgs = {
|
241
|
+
...args,
|
242
|
+
options: {
|
243
|
+
...args.options,
|
244
|
+
onResponse: callback,
|
245
|
+
},
|
247
246
|
};
|
248
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
249
247
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
250
248
|
return {
|
251
249
|
flatResponse,
|
@@ -262,8 +260,8 @@ export class FhirServicesImpl {
|
|
262
260
|
spec: deleteOperationSpec,
|
263
261
|
});
|
264
262
|
const poller = await createHttpPoller(lro, {
|
265
|
-
restoreFrom: options
|
266
|
-
intervalInMs: options
|
263
|
+
restoreFrom: options?.resumeFrom,
|
264
|
+
intervalInMs: options?.updateIntervalInMs,
|
267
265
|
});
|
268
266
|
await poller.poll();
|
269
267
|
return poller;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fhirServices.js","sourceRoot":"","sources":["../../../src/operations/fhirServices.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OA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AAe;KAC3B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;SACjC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { FhirServices } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { HealthcareApisManagementClient } from \"../healthcareApisManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n FhirService,\n FhirServicesListByWorkspaceNextOptionalParams,\n FhirServicesListByWorkspaceOptionalParams,\n FhirServicesListByWorkspaceResponse,\n FhirServicesGetOptionalParams,\n FhirServicesGetResponse,\n FhirServicesCreateOrUpdateOptionalParams,\n FhirServicesCreateOrUpdateResponse,\n FhirServicePatchResource,\n FhirServicesUpdateOptionalParams,\n FhirServicesUpdateResponse,\n FhirServicesDeleteOptionalParams,\n FhirServicesListByWorkspaceNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing FhirServices operations. */\nexport class FhirServicesImpl implements FhirServices {\n private readonly client: HealthcareApisManagementClient;\n\n /**\n * Initialize a new instance of the class FhirServices class.\n * @param client Reference to the service client\n */\n constructor(client: HealthcareApisManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all FHIR Services for the given workspace\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: FhirServicesListByWorkspaceOptionalParams,\n ): PagedAsyncIterableIterator<FhirService> {\n const iter = this.listByWorkspacePagingAll(\n resourceGroupName,\n workspaceName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByWorkspacePagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: FhirServicesListByWorkspaceOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<FhirService[]> {\n let result: FhirServicesListByWorkspaceResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByWorkspaceNext(\n resourceGroupName,\n workspaceName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: FhirServicesListByWorkspaceOptionalParams,\n ): AsyncIterableIterator<FhirService> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all FHIR Services for the given workspace\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: FhirServicesListByWorkspaceOptionalParams,\n ): Promise<FhirServicesListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec,\n );\n }\n\n /**\n * Gets the properties of the specified FHIR Service.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n fhirServiceName: string,\n options?: FhirServicesGetOptionalParams,\n ): Promise<FhirServicesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, fhirServiceName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates a FHIR Service resource with the specified parameters.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param fhirservice The parameters for creating or updating a Fhir Service resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n fhirServiceName: string,\n fhirservice: FhirService,\n options?: FhirServicesCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<FhirServicesCreateOrUpdateResponse>,\n FhirServicesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<FhirServicesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n workspaceName,\n fhirServiceName,\n fhirservice,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n FhirServicesCreateOrUpdateResponse,\n OperationState<FhirServicesCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates a FHIR Service resource with the specified parameters.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param fhirservice The parameters for creating or updating a Fhir Service resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n fhirServiceName: string,\n fhirservice: FhirService,\n options?: FhirServicesCreateOrUpdateOptionalParams,\n ): Promise<FhirServicesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n workspaceName,\n fhirServiceName,\n fhirservice,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Patch FHIR Service details.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param workspaceName The name of workspace resource.\n * @param fhirservicePatchResource The parameters for updating a Fhir Service.\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n fhirServiceName: string,\n workspaceName: string,\n fhirservicePatchResource: FhirServicePatchResource,\n options?: FhirServicesUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<FhirServicesUpdateResponse>,\n FhirServicesUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<FhirServicesUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n fhirServiceName,\n workspaceName,\n fhirservicePatchResource,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n FhirServicesUpdateResponse,\n OperationState<FhirServicesUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Patch FHIR Service details.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param workspaceName The name of workspace resource.\n * @param fhirservicePatchResource The parameters for updating a Fhir Service.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n fhirServiceName: string,\n workspaceName: string,\n fhirservicePatchResource: FhirServicePatchResource,\n options?: FhirServicesUpdateOptionalParams,\n ): Promise<FhirServicesUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n fhirServiceName,\n workspaceName,\n fhirservicePatchResource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a FHIR Service.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n fhirServiceName: string,\n workspaceName: string,\n options?: FhirServicesDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, fhirServiceName, workspaceName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a FHIR Service.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n fhirServiceName: string,\n workspaceName: string,\n options?: FhirServicesDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n fhirServiceName,\n workspaceName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListByWorkspaceNext\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method.\n * @param options The options parameters.\n */\n private _listByWorkspaceNext(\n resourceGroupName: string,\n workspaceName: string,\n nextLink: string,\n options?: FhirServicesListByWorkspaceNextOptionalParams,\n ): Promise<FhirServicesListByWorkspaceNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, nextLink, options },\n listByWorkspaceNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/fhirservices\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FhirServiceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/fhirservices/{fhirServiceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FhirService,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.fhirServiceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/fhirservices/{fhirServiceName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.FhirService,\n },\n 201: {\n bodyMapper: Mappers.FhirService,\n },\n 202: {\n bodyMapper: Mappers.FhirService,\n },\n 204: {\n bodyMapper: Mappers.FhirService,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n requestBody: Parameters.fhirservice,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.fhirServiceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/fhirservices/{fhirServiceName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.FhirService,\n },\n 201: {\n bodyMapper: Mappers.FhirService,\n },\n 202: {\n bodyMapper: Mappers.FhirService,\n },\n 204: {\n bodyMapper: Mappers.FhirService,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n requestBody: Parameters.fhirservicePatchResource,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.fhirServiceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/fhirservices/{fhirServiceName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorModel,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.fhirServiceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByWorkspaceNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FhirServiceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink,\n Parameters.workspaceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
1
|
+
{"version":3,"file":"fhirServices.js","sourceRoot":"","sources":["../../../src/operations/fhirServices.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAiB9C,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,OAAO,gBAAgB;IACV,MAAM,CAAiC;IAExD;;;OAGG;IACH,YAAY,MAAsC;QAChD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC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QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,eAAe;KAC3B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,iKAAiK;IACvK,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,eAAe;KAC3B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;SACjC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { FhirServices } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { HealthcareApisManagementClient } from \"../healthcareApisManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n FhirService,\n FhirServicesListByWorkspaceNextOptionalParams,\n FhirServicesListByWorkspaceOptionalParams,\n FhirServicesListByWorkspaceResponse,\n FhirServicesGetOptionalParams,\n FhirServicesGetResponse,\n FhirServicesCreateOrUpdateOptionalParams,\n FhirServicesCreateOrUpdateResponse,\n FhirServicePatchResource,\n FhirServicesUpdateOptionalParams,\n FhirServicesUpdateResponse,\n FhirServicesDeleteOptionalParams,\n FhirServicesListByWorkspaceNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing FhirServices operations. */\nexport class FhirServicesImpl implements FhirServices {\n private readonly client: HealthcareApisManagementClient;\n\n /**\n * Initialize a new instance of the class FhirServices class.\n * @param client Reference to the service client\n */\n constructor(client: HealthcareApisManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all FHIR Services for the given workspace\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: FhirServicesListByWorkspaceOptionalParams,\n ): PagedAsyncIterableIterator<FhirService> {\n const iter = this.listByWorkspacePagingAll(\n resourceGroupName,\n workspaceName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByWorkspacePagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: FhirServicesListByWorkspaceOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<FhirService[]> {\n let result: FhirServicesListByWorkspaceResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByWorkspaceNext(\n resourceGroupName,\n workspaceName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: FhirServicesListByWorkspaceOptionalParams,\n ): AsyncIterableIterator<FhirService> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all FHIR Services for the given workspace\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: FhirServicesListByWorkspaceOptionalParams,\n ): Promise<FhirServicesListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec,\n );\n }\n\n /**\n * Gets the properties of the specified FHIR Service.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n fhirServiceName: string,\n options?: FhirServicesGetOptionalParams,\n ): Promise<FhirServicesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, fhirServiceName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates a FHIR Service resource with the specified parameters.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param fhirservice The parameters for creating or updating a Fhir Service resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n fhirServiceName: string,\n fhirservice: FhirService,\n options?: FhirServicesCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<FhirServicesCreateOrUpdateResponse>,\n FhirServicesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<FhirServicesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n workspaceName,\n fhirServiceName,\n fhirservice,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n FhirServicesCreateOrUpdateResponse,\n OperationState<FhirServicesCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates a FHIR Service resource with the specified parameters.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param fhirservice The parameters for creating or updating a Fhir Service resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n fhirServiceName: string,\n fhirservice: FhirService,\n options?: FhirServicesCreateOrUpdateOptionalParams,\n ): Promise<FhirServicesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n workspaceName,\n fhirServiceName,\n fhirservice,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Patch FHIR Service details.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param workspaceName The name of workspace resource.\n * @param fhirservicePatchResource The parameters for updating a Fhir Service.\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n fhirServiceName: string,\n workspaceName: string,\n fhirservicePatchResource: FhirServicePatchResource,\n options?: FhirServicesUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<FhirServicesUpdateResponse>,\n FhirServicesUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<FhirServicesUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n fhirServiceName,\n workspaceName,\n fhirservicePatchResource,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n FhirServicesUpdateResponse,\n OperationState<FhirServicesUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Patch FHIR Service details.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param workspaceName The name of workspace resource.\n * @param fhirservicePatchResource The parameters for updating a Fhir Service.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n fhirServiceName: string,\n workspaceName: string,\n fhirservicePatchResource: FhirServicePatchResource,\n options?: FhirServicesUpdateOptionalParams,\n ): Promise<FhirServicesUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n fhirServiceName,\n workspaceName,\n fhirservicePatchResource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a FHIR Service.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n fhirServiceName: string,\n workspaceName: string,\n options?: FhirServicesDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, fhirServiceName, workspaceName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a FHIR Service.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param fhirServiceName The name of FHIR Service resource.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n fhirServiceName: string,\n workspaceName: string,\n options?: FhirServicesDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n fhirServiceName,\n workspaceName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListByWorkspaceNext\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method.\n * @param options The options parameters.\n */\n private _listByWorkspaceNext(\n resourceGroupName: string,\n workspaceName: string,\n nextLink: string,\n options?: FhirServicesListByWorkspaceNextOptionalParams,\n ): Promise<FhirServicesListByWorkspaceNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, nextLink, options },\n listByWorkspaceNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/fhirservices\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FhirServiceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/fhirservices/{fhirServiceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FhirService,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.fhirServiceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/fhirservices/{fhirServiceName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.FhirService,\n },\n 201: {\n bodyMapper: Mappers.FhirService,\n },\n 202: {\n bodyMapper: Mappers.FhirService,\n },\n 204: {\n bodyMapper: Mappers.FhirService,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n requestBody: Parameters.fhirservice,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.fhirServiceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/fhirservices/{fhirServiceName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.FhirService,\n },\n 201: {\n bodyMapper: Mappers.FhirService,\n },\n 202: {\n bodyMapper: Mappers.FhirService,\n },\n 204: {\n bodyMapper: Mappers.FhirService,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n requestBody: Parameters.fhirservicePatchResource,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.fhirServiceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/fhirservices/{fhirServiceName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorModel,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.fhirServiceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByWorkspaceNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FhirServiceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink,\n Parameters.workspaceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
@@ -12,6 +12,7 @@ import { createHttpPoller, } from "@azure/core-lro";
|
|
12
12
|
import { createLroSpec } from "../lroImpl.js";
|
13
13
|
/** Class containing IotConnectorFhirDestination operations. */
|
14
14
|
export class IotConnectorFhirDestinationImpl {
|
15
|
+
client;
|
15
16
|
/**
|
16
17
|
* Initialize a new instance of the class IotConnectorFhirDestination class.
|
17
18
|
* @param client Reference to the service client
|
@@ -51,14 +52,19 @@ export class IotConnectorFhirDestinationImpl {
|
|
51
52
|
return this.client.sendOperationRequest(args, spec);
|
52
53
|
};
|
53
54
|
const sendOperationFn = async (args, spec) => {
|
54
|
-
var _a;
|
55
55
|
let currentRawResponse = undefined;
|
56
|
-
const providedCallback =
|
56
|
+
const providedCallback = args.options?.onResponse;
|
57
57
|
const callback = (rawResponse, flatResponse) => {
|
58
58
|
currentRawResponse = rawResponse;
|
59
|
-
providedCallback
|
59
|
+
providedCallback?.(rawResponse, flatResponse);
|
60
|
+
};
|
61
|
+
const updatedArgs = {
|
62
|
+
...args,
|
63
|
+
options: {
|
64
|
+
...args.options,
|
65
|
+
onResponse: callback,
|
66
|
+
},
|
60
67
|
};
|
61
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
62
68
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
63
69
|
return {
|
64
70
|
flatResponse,
|
@@ -82,8 +88,8 @@ export class IotConnectorFhirDestinationImpl {
|
|
82
88
|
spec: createOrUpdateOperationSpec,
|
83
89
|
});
|
84
90
|
const poller = await createHttpPoller(lro, {
|
85
|
-
restoreFrom: options
|
86
|
-
intervalInMs: options
|
91
|
+
restoreFrom: options?.resumeFrom,
|
92
|
+
intervalInMs: options?.updateIntervalInMs,
|
87
93
|
});
|
88
94
|
await poller.poll();
|
89
95
|
return poller;
|
@@ -115,14 +121,19 @@ export class IotConnectorFhirDestinationImpl {
|
|
115
121
|
return this.client.sendOperationRequest(args, spec);
|
116
122
|
};
|
117
123
|
const sendOperationFn = async (args, spec) => {
|
118
|
-
var _a;
|
119
124
|
let currentRawResponse = undefined;
|
120
|
-
const providedCallback =
|
125
|
+
const providedCallback = args.options?.onResponse;
|
121
126
|
const callback = (rawResponse, flatResponse) => {
|
122
127
|
currentRawResponse = rawResponse;
|
123
|
-
providedCallback
|
128
|
+
providedCallback?.(rawResponse, flatResponse);
|
129
|
+
};
|
130
|
+
const updatedArgs = {
|
131
|
+
...args,
|
132
|
+
options: {
|
133
|
+
...args.options,
|
134
|
+
onResponse: callback,
|
135
|
+
},
|
124
136
|
};
|
125
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
126
137
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
127
138
|
return {
|
128
139
|
flatResponse,
|
@@ -145,8 +156,8 @@ export class IotConnectorFhirDestinationImpl {
|
|
145
156
|
spec: deleteOperationSpec,
|
146
157
|
});
|
147
158
|
const poller = await createHttpPoller(lro, {
|
148
|
-
restoreFrom: options
|
149
|
-
intervalInMs: options
|
159
|
+
restoreFrom: options?.resumeFrom,
|
160
|
+
intervalInMs: options?.updateIntervalInMs,
|
150
161
|
});
|
151
162
|
await poller.poll();
|
152
163
|
return poller;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"iotConnectorFhirDestination.js","sourceRoot":"","sources":["../../../src/operations/iotConnectorFhirDestination.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,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;SACvC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,kBAAkB;SACvC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,kBAAkB;SACvC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;SACjC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,kBAAkB;IAC1C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,mBAAmB;KAC/B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,0MAA0M;IAChN,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,mBAAmB;KAC/B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { IotConnectorFhirDestination } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { HealthcareApisManagementClient } from \"../healthcareApisManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n IotConnectorFhirDestinationGetOptionalParams,\n IotConnectorFhirDestinationGetResponse,\n IotFhirDestination,\n IotConnectorFhirDestinationCreateOrUpdateOptionalParams,\n IotConnectorFhirDestinationCreateOrUpdateResponse,\n IotConnectorFhirDestinationDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/** Class containing IotConnectorFhirDestination operations. */\nexport class IotConnectorFhirDestinationImpl\n implements IotConnectorFhirDestination\n{\n private readonly client: HealthcareApisManagementClient;\n\n /**\n * Initialize a new instance of the class IotConnectorFhirDestination class.\n * @param client Reference to the service client\n */\n constructor(client: HealthcareApisManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the properties of the specified Iot Connector FHIR destination.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param fhirDestinationName The name of IoT Connector FHIR destination resource.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n fhirDestinationName: string,\n options?: IotConnectorFhirDestinationGetOptionalParams,\n ): Promise<IotConnectorFhirDestinationGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n fhirDestinationName,\n options,\n },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates an IoT Connector FHIR destination resource with the specified parameters.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param fhirDestinationName The name of IoT Connector FHIR destination resource.\n * @param iotFhirDestination The parameters for creating or updating an IoT Connector FHIR destination\n * resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n fhirDestinationName: string,\n iotFhirDestination: IotFhirDestination,\n options?: IotConnectorFhirDestinationCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<IotConnectorFhirDestinationCreateOrUpdateResponse>,\n IotConnectorFhirDestinationCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<IotConnectorFhirDestinationCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n fhirDestinationName,\n iotFhirDestination,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n IotConnectorFhirDestinationCreateOrUpdateResponse,\n OperationState<IotConnectorFhirDestinationCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates an IoT Connector FHIR destination resource with the specified parameters.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param fhirDestinationName The name of IoT Connector FHIR destination resource.\n * @param iotFhirDestination The parameters for creating or updating an IoT Connector FHIR destination\n * resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n fhirDestinationName: string,\n iotFhirDestination: IotFhirDestination,\n options?: IotConnectorFhirDestinationCreateOrUpdateOptionalParams,\n ): Promise<IotConnectorFhirDestinationCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n fhirDestinationName,\n iotFhirDestination,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an IoT Connector FHIR destination.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param fhirDestinationName The name of IoT Connector FHIR destination resource.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n fhirDestinationName: string,\n options?: IotConnectorFhirDestinationDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n fhirDestinationName,\n options,\n },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes an IoT Connector FHIR destination.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param fhirDestinationName The name of IoT Connector FHIR destination resource.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n fhirDestinationName: string,\n options?: IotConnectorFhirDestinationDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n fhirDestinationName,\n options,\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/iotconnectors/{iotConnectorName}/fhirdestinations/{fhirDestinationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotFhirDestination,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.iotConnectorName,\n Parameters.fhirDestinationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/iotconnectors/{iotConnectorName}/fhirdestinations/{fhirDestinationName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotFhirDestination,\n },\n 201: {\n bodyMapper: Mappers.IotFhirDestination,\n },\n 202: {\n bodyMapper: Mappers.IotFhirDestination,\n },\n 204: {\n bodyMapper: Mappers.IotFhirDestination,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n requestBody: Parameters.iotFhirDestination,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.iotConnectorName,\n Parameters.fhirDestinationName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/iotconnectors/{iotConnectorName}/fhirdestinations/{fhirDestinationName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorModel,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.iotConnectorName,\n Parameters.fhirDestinationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
1
|
+
{"version":3,"file":"iotConnectorFhirDestination.js","sourceRoot":"","sources":["../../../src/operations/iotConnectorFhirDestination.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,M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\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { IotConnectorFhirDestination } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { HealthcareApisManagementClient } from \"../healthcareApisManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n IotConnectorFhirDestinationGetOptionalParams,\n IotConnectorFhirDestinationGetResponse,\n IotFhirDestination,\n IotConnectorFhirDestinationCreateOrUpdateOptionalParams,\n IotConnectorFhirDestinationCreateOrUpdateResponse,\n IotConnectorFhirDestinationDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/** Class containing IotConnectorFhirDestination operations. */\nexport class IotConnectorFhirDestinationImpl\n implements IotConnectorFhirDestination\n{\n private readonly client: HealthcareApisManagementClient;\n\n /**\n * Initialize a new instance of the class IotConnectorFhirDestination class.\n * @param client Reference to the service client\n */\n constructor(client: HealthcareApisManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the properties of the specified Iot Connector FHIR destination.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param fhirDestinationName The name of IoT Connector FHIR destination resource.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n fhirDestinationName: string,\n options?: IotConnectorFhirDestinationGetOptionalParams,\n ): Promise<IotConnectorFhirDestinationGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n fhirDestinationName,\n options,\n },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates an IoT Connector FHIR destination resource with the specified parameters.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param fhirDestinationName The name of IoT Connector FHIR destination resource.\n * @param iotFhirDestination The parameters for creating or updating an IoT Connector FHIR destination\n * resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n fhirDestinationName: string,\n iotFhirDestination: IotFhirDestination,\n options?: IotConnectorFhirDestinationCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<IotConnectorFhirDestinationCreateOrUpdateResponse>,\n IotConnectorFhirDestinationCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<IotConnectorFhirDestinationCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n fhirDestinationName,\n iotFhirDestination,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n IotConnectorFhirDestinationCreateOrUpdateResponse,\n OperationState<IotConnectorFhirDestinationCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates an IoT Connector FHIR destination resource with the specified parameters.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param fhirDestinationName The name of IoT Connector FHIR destination resource.\n * @param iotFhirDestination The parameters for creating or updating an IoT Connector FHIR destination\n * resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n fhirDestinationName: string,\n iotFhirDestination: IotFhirDestination,\n options?: IotConnectorFhirDestinationCreateOrUpdateOptionalParams,\n ): Promise<IotConnectorFhirDestinationCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n fhirDestinationName,\n iotFhirDestination,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an IoT Connector FHIR destination.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param fhirDestinationName The name of IoT Connector FHIR destination resource.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n fhirDestinationName: string,\n options?: IotConnectorFhirDestinationDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n fhirDestinationName,\n options,\n },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes an IoT Connector FHIR destination.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param fhirDestinationName The name of IoT Connector FHIR destination resource.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n fhirDestinationName: string,\n options?: IotConnectorFhirDestinationDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n fhirDestinationName,\n options,\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/iotconnectors/{iotConnectorName}/fhirdestinations/{fhirDestinationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotFhirDestination,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.iotConnectorName,\n Parameters.fhirDestinationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/iotconnectors/{iotConnectorName}/fhirdestinations/{fhirDestinationName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotFhirDestination,\n },\n 201: {\n bodyMapper: Mappers.IotFhirDestination,\n },\n 202: {\n bodyMapper: Mappers.IotFhirDestination,\n },\n 204: {\n bodyMapper: Mappers.IotFhirDestination,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n requestBody: Parameters.iotFhirDestination,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.iotConnectorName,\n Parameters.fhirDestinationName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/iotconnectors/{iotConnectorName}/fhirdestinations/{fhirDestinationName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorModel,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.iotConnectorName,\n Parameters.fhirDestinationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|