@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
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
19
19
|
/** Class containing IotConnectors operations. */
|
20
20
|
class IotConnectorsImpl {
|
21
|
+
client;
|
21
22
|
/**
|
22
23
|
* Initialize a new instance of the class IotConnectors class.
|
23
24
|
* @param client Reference to the service client
|
@@ -41,52 +42,35 @@ class IotConnectorsImpl {
|
|
41
42
|
return this;
|
42
43
|
},
|
43
44
|
byPage: (settings) => {
|
44
|
-
if (settings
|
45
|
+
if (settings?.maxPageSize) {
|
45
46
|
throw new Error("maxPageSize is not supported by this operation.");
|
46
47
|
}
|
47
48
|
return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
|
48
49
|
},
|
49
50
|
};
|
50
51
|
}
|
51
|
-
listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings) {
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
}
|
69
|
-
});
|
52
|
+
async *listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings) {
|
53
|
+
let result;
|
54
|
+
let continuationToken = settings?.continuationToken;
|
55
|
+
if (!continuationToken) {
|
56
|
+
result = await this._listByWorkspace(resourceGroupName, workspaceName, options);
|
57
|
+
let page = result.value || [];
|
58
|
+
continuationToken = result.nextLink;
|
59
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
60
|
+
yield page;
|
61
|
+
}
|
62
|
+
while (continuationToken) {
|
63
|
+
result = await this._listByWorkspaceNext(resourceGroupName, workspaceName, continuationToken, options);
|
64
|
+
continuationToken = result.nextLink;
|
65
|
+
let page = result.value || [];
|
66
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
67
|
+
yield page;
|
68
|
+
}
|
70
69
|
}
|
71
|
-
listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
76
|
-
_c = _f.value;
|
77
|
-
_d = false;
|
78
|
-
const page = _c;
|
79
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
80
|
-
}
|
81
|
-
}
|
82
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
83
|
-
finally {
|
84
|
-
try {
|
85
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
86
|
-
}
|
87
|
-
finally { if (e_1) throw e_1.error; }
|
88
|
-
}
|
89
|
-
});
|
70
|
+
async *listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
|
71
|
+
for await (const page of this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)) {
|
72
|
+
yield* page;
|
73
|
+
}
|
90
74
|
}
|
91
75
|
/**
|
92
76
|
* Lists all IoT Connectors for the given workspace
|
@@ -120,14 +104,19 @@ class IotConnectorsImpl {
|
|
120
104
|
return this.client.sendOperationRequest(args, spec);
|
121
105
|
};
|
122
106
|
const sendOperationFn = async (args, spec) => {
|
123
|
-
var _a;
|
124
107
|
let currentRawResponse = undefined;
|
125
|
-
const providedCallback =
|
108
|
+
const providedCallback = args.options?.onResponse;
|
126
109
|
const callback = (rawResponse, flatResponse) => {
|
127
110
|
currentRawResponse = rawResponse;
|
128
|
-
providedCallback
|
111
|
+
providedCallback?.(rawResponse, flatResponse);
|
112
|
+
};
|
113
|
+
const updatedArgs = {
|
114
|
+
...args,
|
115
|
+
options: {
|
116
|
+
...args.options,
|
117
|
+
onResponse: callback,
|
118
|
+
},
|
129
119
|
};
|
130
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
131
120
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
132
121
|
return {
|
133
122
|
flatResponse,
|
@@ -150,8 +139,8 @@ class IotConnectorsImpl {
|
|
150
139
|
spec: createOrUpdateOperationSpec,
|
151
140
|
});
|
152
141
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
153
|
-
restoreFrom: options
|
154
|
-
intervalInMs: options
|
142
|
+
restoreFrom: options?.resumeFrom,
|
143
|
+
intervalInMs: options?.updateIntervalInMs,
|
155
144
|
});
|
156
145
|
await poller.poll();
|
157
146
|
return poller;
|
@@ -181,14 +170,19 @@ class IotConnectorsImpl {
|
|
181
170
|
return this.client.sendOperationRequest(args, spec);
|
182
171
|
};
|
183
172
|
const sendOperationFn = async (args, spec) => {
|
184
|
-
var _a;
|
185
173
|
let currentRawResponse = undefined;
|
186
|
-
const providedCallback =
|
174
|
+
const providedCallback = args.options?.onResponse;
|
187
175
|
const callback = (rawResponse, flatResponse) => {
|
188
176
|
currentRawResponse = rawResponse;
|
189
|
-
providedCallback
|
177
|
+
providedCallback?.(rawResponse, flatResponse);
|
178
|
+
};
|
179
|
+
const updatedArgs = {
|
180
|
+
...args,
|
181
|
+
options: {
|
182
|
+
...args.options,
|
183
|
+
onResponse: callback,
|
184
|
+
},
|
190
185
|
};
|
191
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
192
186
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
193
187
|
return {
|
194
188
|
flatResponse,
|
@@ -211,8 +205,8 @@ class IotConnectorsImpl {
|
|
211
205
|
spec: updateOperationSpec,
|
212
206
|
});
|
213
207
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
214
|
-
restoreFrom: options
|
215
|
-
intervalInMs: options
|
208
|
+
restoreFrom: options?.resumeFrom,
|
209
|
+
intervalInMs: options?.updateIntervalInMs,
|
216
210
|
});
|
217
211
|
await poller.poll();
|
218
212
|
return poller;
|
@@ -241,14 +235,19 @@ class IotConnectorsImpl {
|
|
241
235
|
return this.client.sendOperationRequest(args, spec);
|
242
236
|
};
|
243
237
|
const sendOperationFn = async (args, spec) => {
|
244
|
-
var _a;
|
245
238
|
let currentRawResponse = undefined;
|
246
|
-
const providedCallback =
|
239
|
+
const providedCallback = args.options?.onResponse;
|
247
240
|
const callback = (rawResponse, flatResponse) => {
|
248
241
|
currentRawResponse = rawResponse;
|
249
|
-
providedCallback
|
242
|
+
providedCallback?.(rawResponse, flatResponse);
|
243
|
+
};
|
244
|
+
const updatedArgs = {
|
245
|
+
...args,
|
246
|
+
options: {
|
247
|
+
...args.options,
|
248
|
+
onResponse: callback,
|
249
|
+
},
|
250
250
|
};
|
251
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
252
251
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
253
252
|
return {
|
254
253
|
flatResponse,
|
@@ -265,8 +264,8 @@ class IotConnectorsImpl {
|
|
265
264
|
spec: deleteOperationSpec,
|
266
265
|
});
|
267
266
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
268
|
-
restoreFrom: options
|
269
|
-
intervalInMs: options
|
267
|
+
restoreFrom: options?.resumeFrom,
|
268
|
+
intervalInMs: options?.updateIntervalInMs,
|
270
269
|
});
|
271
270
|
await poller.poll();
|
272
271
|
return poller;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"iotConnectors.js","sourceRoot":"","sources":["../../../src/operations/iotConnectors.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAiB9C,4CAA4C;AAC5C,iDAAiD;AACjD,MAAa,iBAAiB;IAG5B;;;OAGG;IACH,YAAY,MAAsC;QAChD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,eAAe,CACpB,iBAAyB,EACzB,aAAqB,EACrB,OAAoD;QAEpD,MAAM,IAAI,GAAG,IAAI,CAAC,wBAAwB,C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C3C;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 { IotConnectors } 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 IotConnector,\n IotConnectorsListByWorkspaceNextOptionalParams,\n IotConnectorsListByWorkspaceOptionalParams,\n IotConnectorsListByWorkspaceResponse,\n IotConnectorsGetOptionalParams,\n IotConnectorsGetResponse,\n IotConnectorsCreateOrUpdateOptionalParams,\n IotConnectorsCreateOrUpdateResponse,\n IotConnectorPatchResource,\n IotConnectorsUpdateOptionalParams,\n IotConnectorsUpdateResponse,\n IotConnectorsDeleteOptionalParams,\n IotConnectorsListByWorkspaceNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing IotConnectors operations. */\nexport class IotConnectorsImpl implements IotConnectors {\n private readonly client: HealthcareApisManagementClient;\n\n /**\n * Initialize a new instance of the class IotConnectors class.\n * @param client Reference to the service client\n */\n constructor(client: HealthcareApisManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all IoT Connectors 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?: IotConnectorsListByWorkspaceOptionalParams,\n ): PagedAsyncIterableIterator<IotConnector> {\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?: IotConnectorsListByWorkspaceOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<IotConnector[]> {\n let result: IotConnectorsListByWorkspaceResponse;\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?: IotConnectorsListByWorkspaceOptionalParams,\n ): AsyncIterableIterator<IotConnector> {\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 IoT Connectors 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?: IotConnectorsListByWorkspaceOptionalParams,\n ): Promise<IotConnectorsListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec,\n );\n }\n\n /**\n * Gets the properties of the specified IoT Connector.\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 options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n options?: IotConnectorsGetOptionalParams,\n ): Promise<IotConnectorsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, iotConnectorName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates an IoT Connector 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 iotConnector The parameters for creating or updating an IoT Connectors resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n iotConnector: IotConnector,\n options?: IotConnectorsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<IotConnectorsCreateOrUpdateResponse>,\n IotConnectorsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<IotConnectorsCreateOrUpdateResponse> => {\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 iotConnector,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n IotConnectorsCreateOrUpdateResponse,\n OperationState<IotConnectorsCreateOrUpdateResponse>\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 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 iotConnector The parameters for creating or updating an IoT Connectors resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n iotConnector: IotConnector,\n options?: IotConnectorsCreateOrUpdateOptionalParams,\n ): Promise<IotConnectorsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n iotConnector,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Patch an IoT Connector.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorPatchResource The parameters for updating an IoT Connector.\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n iotConnectorName: string,\n workspaceName: string,\n iotConnectorPatchResource: IotConnectorPatchResource,\n options?: IotConnectorsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<IotConnectorsUpdateResponse>,\n IotConnectorsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<IotConnectorsUpdateResponse> => {\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 iotConnectorName,\n workspaceName,\n iotConnectorPatchResource,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n IotConnectorsUpdateResponse,\n OperationState<IotConnectorsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Patch an IoT Connector.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorPatchResource The parameters for updating an IoT Connector.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n iotConnectorName: string,\n workspaceName: string,\n iotConnectorPatchResource: IotConnectorPatchResource,\n options?: IotConnectorsUpdateOptionalParams,\n ): Promise<IotConnectorsUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n iotConnectorName,\n workspaceName,\n iotConnectorPatchResource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an IoT Connector.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n iotConnectorName: string,\n workspaceName: string,\n options?: IotConnectorsDeleteOptionalParams,\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, iotConnectorName, 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 an IoT Connector.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n iotConnectorName: string,\n workspaceName: string,\n options?: IotConnectorsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n iotConnectorName,\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?: IotConnectorsListByWorkspaceNextOptionalParams,\n ): Promise<IotConnectorsListByWorkspaceNextResponse> {\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}/iotconnectors\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotConnectorCollection,\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}/iotconnectors/{iotConnectorName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotConnector,\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 ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/iotconnectors/{iotConnectorName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotConnector,\n },\n 201: {\n bodyMapper: Mappers.IotConnector,\n },\n 202: {\n bodyMapper: Mappers.IotConnector,\n },\n 204: {\n bodyMapper: Mappers.IotConnector,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n requestBody: Parameters.iotConnector,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.iotConnectorName,\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}/iotconnectors/{iotConnectorName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotConnector,\n },\n 201: {\n bodyMapper: Mappers.IotConnector,\n },\n 202: {\n bodyMapper: Mappers.IotConnector,\n },\n 204: {\n bodyMapper: Mappers.IotConnector,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n requestBody: Parameters.iotConnectorPatchResource,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.iotConnectorName,\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}\",\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 ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByWorkspaceNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotConnectorCollection,\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":"iotConnectors.js","sourceRoot":"","sources":["../../../src/operations/iotConnectors.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAiB9C,4CAA4C;AAC5C,iDAAiD;AACjD,MAAa,iBAAiB;IACX,MAAM,CAAiC;IAExD;;;OAGG;IACH,YAAY,MAAsC;QAChD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,eAAe,CACpB,iBAAyB,EACzB,aAAqB,EACrB,OAAoD;QAEpD,MAAM,IAAI,GAAG,IAAI,CAAC,wBAAwB,CACxC,iBAAiB,EACjB,aAAa,EACb,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,E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B;IACpD,IAAI,EAAE,mKAAmK;IACzK,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;KAC5B;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,sBAAsB;SAC3C;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 { IotConnectors } 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 IotConnector,\n IotConnectorsListByWorkspaceNextOptionalParams,\n IotConnectorsListByWorkspaceOptionalParams,\n IotConnectorsListByWorkspaceResponse,\n IotConnectorsGetOptionalParams,\n IotConnectorsGetResponse,\n IotConnectorsCreateOrUpdateOptionalParams,\n IotConnectorsCreateOrUpdateResponse,\n IotConnectorPatchResource,\n IotConnectorsUpdateOptionalParams,\n IotConnectorsUpdateResponse,\n IotConnectorsDeleteOptionalParams,\n IotConnectorsListByWorkspaceNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing IotConnectors operations. */\nexport class IotConnectorsImpl implements IotConnectors {\n private readonly client: HealthcareApisManagementClient;\n\n /**\n * Initialize a new instance of the class IotConnectors class.\n * @param client Reference to the service client\n */\n constructor(client: HealthcareApisManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all IoT Connectors 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?: IotConnectorsListByWorkspaceOptionalParams,\n ): PagedAsyncIterableIterator<IotConnector> {\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?: IotConnectorsListByWorkspaceOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<IotConnector[]> {\n let result: IotConnectorsListByWorkspaceResponse;\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?: IotConnectorsListByWorkspaceOptionalParams,\n ): AsyncIterableIterator<IotConnector> {\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 IoT Connectors 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?: IotConnectorsListByWorkspaceOptionalParams,\n ): Promise<IotConnectorsListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec,\n );\n }\n\n /**\n * Gets the properties of the specified IoT Connector.\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 options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n options?: IotConnectorsGetOptionalParams,\n ): Promise<IotConnectorsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, iotConnectorName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates an IoT Connector 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 iotConnector The parameters for creating or updating an IoT Connectors resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n iotConnector: IotConnector,\n options?: IotConnectorsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<IotConnectorsCreateOrUpdateResponse>,\n IotConnectorsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<IotConnectorsCreateOrUpdateResponse> => {\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 iotConnector,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n IotConnectorsCreateOrUpdateResponse,\n OperationState<IotConnectorsCreateOrUpdateResponse>\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 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 iotConnector The parameters for creating or updating an IoT Connectors resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n iotConnectorName: string,\n iotConnector: IotConnector,\n options?: IotConnectorsCreateOrUpdateOptionalParams,\n ): Promise<IotConnectorsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n workspaceName,\n iotConnectorName,\n iotConnector,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Patch an IoT Connector.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorPatchResource The parameters for updating an IoT Connector.\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n iotConnectorName: string,\n workspaceName: string,\n iotConnectorPatchResource: IotConnectorPatchResource,\n options?: IotConnectorsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<IotConnectorsUpdateResponse>,\n IotConnectorsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<IotConnectorsUpdateResponse> => {\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 iotConnectorName,\n workspaceName,\n iotConnectorPatchResource,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n IotConnectorsUpdateResponse,\n OperationState<IotConnectorsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Patch an IoT Connector.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param workspaceName The name of workspace resource.\n * @param iotConnectorPatchResource The parameters for updating an IoT Connector.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n iotConnectorName: string,\n workspaceName: string,\n iotConnectorPatchResource: IotConnectorPatchResource,\n options?: IotConnectorsUpdateOptionalParams,\n ): Promise<IotConnectorsUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n iotConnectorName,\n workspaceName,\n iotConnectorPatchResource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an IoT Connector.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n iotConnectorName: string,\n workspaceName: string,\n options?: IotConnectorsDeleteOptionalParams,\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, iotConnectorName, 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 an IoT Connector.\n * @param resourceGroupName The name of the resource group that contains the service instance.\n * @param iotConnectorName The name of IoT Connector resource.\n * @param workspaceName The name of workspace resource.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n iotConnectorName: string,\n workspaceName: string,\n options?: IotConnectorsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n iotConnectorName,\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?: IotConnectorsListByWorkspaceNextOptionalParams,\n ): Promise<IotConnectorsListByWorkspaceNextResponse> {\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}/iotconnectors\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotConnectorCollection,\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}/iotconnectors/{iotConnectorName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotConnector,\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 ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/iotconnectors/{iotConnectorName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotConnector,\n },\n 201: {\n bodyMapper: Mappers.IotConnector,\n },\n 202: {\n bodyMapper: Mappers.IotConnector,\n },\n 204: {\n bodyMapper: Mappers.IotConnector,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n requestBody: Parameters.iotConnector,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.iotConnectorName,\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}/iotconnectors/{iotConnectorName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotConnector,\n },\n 201: {\n bodyMapper: Mappers.IotConnector,\n },\n 202: {\n bodyMapper: Mappers.IotConnector,\n },\n 204: {\n bodyMapper: Mappers.IotConnector,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n requestBody: Parameters.iotConnectorPatchResource,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.iotConnectorName,\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}\",\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 ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByWorkspaceNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.IotConnectorCollection,\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"]}
|
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
|
14
14
|
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
15
15
|
/** Class containing OperationResults operations. */
|
16
16
|
class OperationResultsImpl {
|
17
|
+
client;
|
17
18
|
/**
|
18
19
|
* Initialize a new instance of the class OperationResults class.
|
19
20
|
* @param client Reference to the service client
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"operationResults.js","sourceRoot":"","sources":["../../../src/operations/operationResults.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,oDAAoD;AACpD,MAAa,oBAAoB;
|
1
|
+
{"version":3,"file":"operationResults.js","sourceRoot":"","sources":["../../../src/operations/operationResults.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,oDAAoD;AACpD,MAAa,oBAAoB;IACd,MAAM,CAAiC;IAExD;;;OAGG;IACH,YAAY,MAAsC;QAChD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,GAAG,CACD,YAAoB,EACpB,iBAAyB,EACzB,OAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,iBAAiB,EAAE,OAAO,EAAE,EAC5C,gBAAgB,CACjB,CAAC;IACJ,CAAC;CACF;AA3BD,oDA2BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,kIAAkI;IACxI,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,2BAA2B;SAChD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;SACjC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,iBAAiB;KAC7B;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 { OperationResults } 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 OperationResultsGetOptionalParams,\n OperationResultsGetResponse,\n} from \"../models/index.js\";\n\n/** Class containing OperationResults operations. */\nexport class OperationResultsImpl implements OperationResults {\n private readonly client: HealthcareApisManagementClient;\n\n /**\n * Initialize a new instance of the class OperationResults class.\n * @param client Reference to the service client\n */\n constructor(client: HealthcareApisManagementClient) {\n this.client = client;\n }\n\n /**\n * Get the operation result for a long running operation.\n * @param locationName The location of the operation.\n * @param operationResultId The ID of the operation result to get.\n * @param options The options parameters.\n */\n get(\n locationName: string,\n operationResultId: string,\n options?: OperationResultsGetOptionalParams,\n ): Promise<OperationResultsGetResponse> {\n return this.client.sendOperationRequest(\n { locationName, operationResultId, options },\n getOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/locations/{locationName}/operationresults/{operationResultId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationResultsDescription,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.locationName,\n Parameters.operationResultId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
17
17
|
/** Class containing Operations operations. */
|
18
18
|
class OperationsImpl {
|
19
|
+
client;
|
19
20
|
/**
|
20
21
|
* Initialize a new instance of the class Operations class.
|
21
22
|
* @param client Reference to the service client
|
@@ -37,52 +38,35 @@ class OperationsImpl {
|
|
37
38
|
return this;
|
38
39
|
},
|
39
40
|
byPage: (settings) => {
|
40
|
-
if (settings
|
41
|
+
if (settings?.maxPageSize) {
|
41
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
42
43
|
}
|
43
44
|
return this.listPagingPage(options, settings);
|
44
45
|
},
|
45
46
|
};
|
46
47
|
}
|
47
|
-
listPagingPage(options, settings) {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
}
|
65
|
-
});
|
48
|
+
async *listPagingPage(options, settings) {
|
49
|
+
let result;
|
50
|
+
let continuationToken = settings?.continuationToken;
|
51
|
+
if (!continuationToken) {
|
52
|
+
result = await this._list(options);
|
53
|
+
let page = result.value || [];
|
54
|
+
continuationToken = result.nextLink;
|
55
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
56
|
+
yield page;
|
57
|
+
}
|
58
|
+
while (continuationToken) {
|
59
|
+
result = await this._listNext(continuationToken, options);
|
60
|
+
continuationToken = result.nextLink;
|
61
|
+
let page = result.value || [];
|
62
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
63
|
+
yield page;
|
64
|
+
}
|
66
65
|
}
|
67
|
-
listPagingAll(options) {
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
72
|
-
_c = _f.value;
|
73
|
-
_d = false;
|
74
|
-
const page = _c;
|
75
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
76
|
-
}
|
77
|
-
}
|
78
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
79
|
-
finally {
|
80
|
-
try {
|
81
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
82
|
-
}
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
84
|
-
}
|
85
|
-
});
|
66
|
+
async *listPagingAll(options) {
|
67
|
+
for await (const page of this.listPagingPage(options)) {
|
68
|
+
yield* page;
|
69
|
+
}
|
86
70
|
}
|
87
71
|
/**
|
88
72
|
* Lists all of the available operations supported by Microsoft Healthcare resource provider.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAAiC;IAExD;;;OAGG;IACH,YAAY,MAAsC;QAChD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,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AAE,OAAO,CAAC,YAAY;SACjC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,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 { Operations } 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 OperationDetail,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: HealthcareApisManagementClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: HealthcareApisManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the available operations supported by Microsoft Healthcare resource provider.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams,\n ): PagedAsyncIterableIterator<OperationDetail> {\n const iter = this.listPagingAll(options);\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.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<OperationDetail[]> {\n let result: OperationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams,\n ): AsyncIterableIterator<OperationDetail> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the available operations supported by Microsoft Healthcare resource provider.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams,\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: OperationsListNextOptionalParams,\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.HealthcareApis/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListOperations,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListOperations,\n },\n default: {\n bodyMapper: Mappers.ErrorDetails,\n },\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
@@ -17,6 +17,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
17
17
|
/// <reference lib="esnext.asynciterable" />
|
18
18
|
/** Class containing PrivateEndpointConnections operations. */
|
19
19
|
class PrivateEndpointConnectionsImpl {
|
20
|
+
client;
|
20
21
|
/**
|
21
22
|
* Initialize a new instance of the class PrivateEndpointConnections class.
|
22
23
|
* @param client Reference to the service client
|
@@ -40,39 +41,22 @@ class PrivateEndpointConnectionsImpl {
|
|
40
41
|
return this;
|
41
42
|
},
|
42
43
|
byPage: (settings) => {
|
43
|
-
if (settings
|
44
|
+
if (settings?.maxPageSize) {
|
44
45
|
throw new Error("maxPageSize is not supported by this operation.");
|
45
46
|
}
|
46
47
|
return this.listByServicePagingPage(resourceGroupName, resourceName, options, settings);
|
47
48
|
},
|
48
49
|
};
|
49
50
|
}
|
50
|
-
listByServicePagingPage(resourceGroupName, resourceName, options, _settings) {
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
yield yield tslib_1.__await(result.value || []);
|
55
|
-
});
|
51
|
+
async *listByServicePagingPage(resourceGroupName, resourceName, options, _settings) {
|
52
|
+
let result;
|
53
|
+
result = await this._listByService(resourceGroupName, resourceName, options);
|
54
|
+
yield result.value || [];
|
56
55
|
}
|
57
|
-
listByServicePagingAll(resourceGroupName, resourceName, options) {
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByServicePagingPage(resourceGroupName, resourceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
62
|
-
_c = _f.value;
|
63
|
-
_d = false;
|
64
|
-
const page = _c;
|
65
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
66
|
-
}
|
67
|
-
}
|
68
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
69
|
-
finally {
|
70
|
-
try {
|
71
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
72
|
-
}
|
73
|
-
finally { if (e_1) throw e_1.error; }
|
74
|
-
}
|
75
|
-
});
|
56
|
+
async *listByServicePagingAll(resourceGroupName, resourceName, options) {
|
57
|
+
for await (const page of this.listByServicePagingPage(resourceGroupName, resourceName, options)) {
|
58
|
+
yield* page;
|
59
|
+
}
|
76
60
|
}
|
77
61
|
/**
|
78
62
|
* Lists all private endpoint connections for a service.
|
@@ -113,14 +97,19 @@ class PrivateEndpointConnectionsImpl {
|
|
113
97
|
return this.client.sendOperationRequest(args, spec);
|
114
98
|
};
|
115
99
|
const sendOperationFn = async (args, spec) => {
|
116
|
-
var _a;
|
117
100
|
let currentRawResponse = undefined;
|
118
|
-
const providedCallback =
|
101
|
+
const providedCallback = args.options?.onResponse;
|
119
102
|
const callback = (rawResponse, flatResponse) => {
|
120
103
|
currentRawResponse = rawResponse;
|
121
|
-
providedCallback
|
104
|
+
providedCallback?.(rawResponse, flatResponse);
|
105
|
+
};
|
106
|
+
const updatedArgs = {
|
107
|
+
...args,
|
108
|
+
options: {
|
109
|
+
...args.options,
|
110
|
+
onResponse: callback,
|
111
|
+
},
|
122
112
|
};
|
123
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
124
113
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
125
114
|
return {
|
126
115
|
flatResponse,
|
@@ -143,8 +132,8 @@ class PrivateEndpointConnectionsImpl {
|
|
143
132
|
spec: createOrUpdateOperationSpec,
|
144
133
|
});
|
145
134
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
146
|
-
restoreFrom: options
|
147
|
-
intervalInMs: options
|
135
|
+
restoreFrom: options?.resumeFrom,
|
136
|
+
intervalInMs: options?.updateIntervalInMs,
|
148
137
|
});
|
149
138
|
await poller.poll();
|
150
139
|
return poller;
|
@@ -175,14 +164,19 @@ class PrivateEndpointConnectionsImpl {
|
|
175
164
|
return this.client.sendOperationRequest(args, spec);
|
176
165
|
};
|
177
166
|
const sendOperationFn = async (args, spec) => {
|
178
|
-
var _a;
|
179
167
|
let currentRawResponse = undefined;
|
180
|
-
const providedCallback =
|
168
|
+
const providedCallback = args.options?.onResponse;
|
181
169
|
const callback = (rawResponse, flatResponse) => {
|
182
170
|
currentRawResponse = rawResponse;
|
183
|
-
providedCallback
|
171
|
+
providedCallback?.(rawResponse, flatResponse);
|
172
|
+
};
|
173
|
+
const updatedArgs = {
|
174
|
+
...args,
|
175
|
+
options: {
|
176
|
+
...args.options,
|
177
|
+
onResponse: callback,
|
178
|
+
},
|
184
179
|
};
|
185
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
186
180
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
187
181
|
return {
|
188
182
|
flatResponse,
|
@@ -204,8 +198,8 @@ class PrivateEndpointConnectionsImpl {
|
|
204
198
|
spec: deleteOperationSpec,
|
205
199
|
});
|
206
200
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
207
|
-
restoreFrom: options
|
208
|
-
intervalInMs: options
|
201
|
+
restoreFrom: options?.resumeFrom,
|
202
|
+
intervalInMs: options?.updateIntervalInMs,
|
209
203
|
});
|
210
204
|
await poller.poll();
|
211
205
|
return poller;
|