@azure/arm-databricks 3.0.1-alpha.20250718.1 → 3.0.1-alpha.20250730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/browser/azureDatabricksManagementClient.js +19 -5
  2. package/dist/browser/azureDatabricksManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +62 -29
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/accessConnectors.js +78 -97
  8. package/dist/browser/operations/accessConnectors.js.map +1 -1
  9. package/dist/browser/operations/operations.js +23 -40
  10. package/dist/browser/operations/operations.js.map +1 -1
  11. package/dist/browser/operations/outboundNetworkDependenciesEndpoints.js +1 -0
  12. package/dist/browser/operations/outboundNetworkDependenciesEndpoints.js.map +1 -1
  13. package/dist/browser/operations/privateEndpointConnections.js +45 -52
  14. package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
  15. package/dist/browser/operations/privateLinkResources.js +23 -40
  16. package/dist/browser/operations/privateLinkResources.js.map +1 -1
  17. package/dist/browser/operations/vNetPeering.js +45 -52
  18. package/dist/browser/operations/vNetPeering.js.map +1 -1
  19. package/dist/browser/operations/workspaces.js +78 -97
  20. package/dist/browser/operations/workspaces.js.map +1 -1
  21. package/dist/browser/pagingHelper.js +2 -4
  22. package/dist/browser/pagingHelper.js.map +1 -1
  23. package/dist/commonjs/azureDatabricksManagementClient.js +19 -5
  24. package/dist/commonjs/azureDatabricksManagementClient.js.map +1 -1
  25. package/dist/commonjs/lroImpl.js +7 -3
  26. package/dist/commonjs/lroImpl.js.map +1 -1
  27. package/dist/commonjs/models/mappers.js +62 -29
  28. package/dist/commonjs/models/mappers.js.map +1 -1
  29. package/dist/commonjs/operations/accessConnectors.js +78 -96
  30. package/dist/commonjs/operations/accessConnectors.js.map +1 -1
  31. package/dist/commonjs/operations/operations.js +23 -39
  32. package/dist/commonjs/operations/operations.js.map +1 -1
  33. package/dist/commonjs/operations/outboundNetworkDependenciesEndpoints.js +1 -0
  34. package/dist/commonjs/operations/outboundNetworkDependenciesEndpoints.js.map +1 -1
  35. package/dist/commonjs/operations/privateEndpointConnections.js +45 -51
  36. package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
  37. package/dist/commonjs/operations/privateLinkResources.js +23 -39
  38. package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
  39. package/dist/commonjs/operations/vNetPeering.js +45 -51
  40. package/dist/commonjs/operations/vNetPeering.js.map +1 -1
  41. package/dist/commonjs/operations/workspaces.js +78 -96
  42. package/dist/commonjs/operations/workspaces.js.map +1 -1
  43. package/dist/commonjs/pagingHelper.js +2 -4
  44. package/dist/commonjs/pagingHelper.js.map +1 -1
  45. package/dist/commonjs/tsdoc-metadata.json +1 -1
  46. package/dist/esm/azureDatabricksManagementClient.js +19 -5
  47. package/dist/esm/azureDatabricksManagementClient.js.map +1 -1
  48. package/dist/esm/lroImpl.js +7 -3
  49. package/dist/esm/lroImpl.js.map +1 -1
  50. package/dist/esm/models/mappers.js +62 -29
  51. package/dist/esm/models/mappers.js.map +1 -1
  52. package/dist/esm/operations/accessConnectors.js +78 -97
  53. package/dist/esm/operations/accessConnectors.js.map +1 -1
  54. package/dist/esm/operations/operations.js +23 -40
  55. package/dist/esm/operations/operations.js.map +1 -1
  56. package/dist/esm/operations/outboundNetworkDependenciesEndpoints.js +1 -0
  57. package/dist/esm/operations/outboundNetworkDependenciesEndpoints.js.map +1 -1
  58. package/dist/esm/operations/privateEndpointConnections.js +45 -52
  59. package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
  60. package/dist/esm/operations/privateLinkResources.js +23 -40
  61. package/dist/esm/operations/privateLinkResources.js.map +1 -1
  62. package/dist/esm/operations/vNetPeering.js +45 -52
  63. package/dist/esm/operations/vNetPeering.js.map +1 -1
  64. package/dist/esm/operations/workspaces.js +78 -97
  65. package/dist/esm/operations/workspaces.js.map +1 -1
  66. package/dist/esm/pagingHelper.js +2 -4
  67. package/dist/esm/pagingHelper.js.map +1 -1
  68. package/dist/react-native/azureDatabricksManagementClient.js +19 -5
  69. package/dist/react-native/azureDatabricksManagementClient.js.map +1 -1
  70. package/dist/react-native/lroImpl.js +7 -3
  71. package/dist/react-native/lroImpl.js.map +1 -1
  72. package/dist/react-native/models/mappers.js +62 -29
  73. package/dist/react-native/models/mappers.js.map +1 -1
  74. package/dist/react-native/operations/accessConnectors.js +78 -97
  75. package/dist/react-native/operations/accessConnectors.js.map +1 -1
  76. package/dist/react-native/operations/operations.js +23 -40
  77. package/dist/react-native/operations/operations.js.map +1 -1
  78. package/dist/react-native/operations/outboundNetworkDependenciesEndpoints.js +1 -0
  79. package/dist/react-native/operations/outboundNetworkDependenciesEndpoints.js.map +1 -1
  80. package/dist/react-native/operations/privateEndpointConnections.js +45 -52
  81. package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
  82. package/dist/react-native/operations/privateLinkResources.js +23 -40
  83. package/dist/react-native/operations/privateLinkResources.js.map +1 -1
  84. package/dist/react-native/operations/vNetPeering.js +45 -52
  85. package/dist/react-native/operations/vNetPeering.js.map +1 -1
  86. package/dist/react-native/operations/workspaces.js +78 -97
  87. package/dist/react-native/operations/workspaces.js.map +1 -1
  88. package/dist/react-native/pagingHelper.js +2 -4
  89. package/dist/react-native/pagingHelper.js.map +1 -1
  90. package/package.json +2 -2
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing PrivateEndpointConnections operations. */
20
20
  class PrivateEndpointConnectionsImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class PrivateEndpointConnections class.
23
24
  * @param client Reference to the service client
@@ -41,52 +42,35 @@ class PrivateEndpointConnectionsImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
45
+ if (settings?.maxPageSize) {
45
46
  throw new Error("maxPageSize is not supported by this operation.");
46
47
  }
47
48
  return this.listPagingPage(resourceGroupName, workspaceName, options, settings);
48
49
  }
49
50
  };
50
51
  }
51
- listPagingPage(resourceGroupName, workspaceName, options, settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
53
- let result;
54
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
55
- if (!continuationToken) {
56
- result = yield tslib_1.__await(this._list(resourceGroupName, workspaceName, options));
57
- let page = result.value || [];
58
- continuationToken = result.nextLink;
59
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
- yield yield tslib_1.__await(page);
61
- }
62
- while (continuationToken) {
63
- result = yield tslib_1.__await(this._listNext(resourceGroupName, workspaceName, continuationToken, options));
64
- continuationToken = result.nextLink;
65
- let page = result.value || [];
66
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
- yield yield tslib_1.__await(page);
68
- }
69
- });
52
+ async *listPagingPage(resourceGroupName, workspaceName, options, settings) {
53
+ let result;
54
+ let continuationToken = settings?.continuationToken;
55
+ if (!continuationToken) {
56
+ result = await this._list(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._listNext(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
- listPagingAll(resourceGroupName, workspaceName, options) {
72
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
73
- var _a, e_1, _b, _c;
74
- try {
75
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(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 *listPagingAll(resourceGroupName, workspaceName, options) {
71
+ for await (const page of this.listPagingPage(resourceGroupName, workspaceName, options)) {
72
+ yield* page;
73
+ }
90
74
  }
91
75
  /**
92
76
  * List private endpoint connections of the workspace
@@ -125,14 +109,19 @@ class PrivateEndpointConnectionsImpl {
125
109
  return this.client.sendOperationRequest(args, spec);
126
110
  };
127
111
  const sendOperationFn = async (args, spec) => {
128
- var _a;
129
112
  let currentRawResponse = undefined;
130
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
113
+ const providedCallback = args.options?.onResponse;
131
114
  const callback = (rawResponse, flatResponse) => {
132
115
  currentRawResponse = rawResponse;
133
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
116
+ providedCallback?.(rawResponse, flatResponse);
117
+ };
118
+ const updatedArgs = {
119
+ ...args,
120
+ options: {
121
+ ...args.options,
122
+ onResponse: callback
123
+ }
134
124
  };
135
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
136
125
  const flatResponse = await directSendOperation(updatedArgs, spec);
137
126
  return {
138
127
  flatResponse,
@@ -155,8 +144,8 @@ class PrivateEndpointConnectionsImpl {
155
144
  spec: createOperationSpec
156
145
  });
157
146
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
158
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
159
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
147
+ restoreFrom: options?.resumeFrom,
148
+ intervalInMs: options?.updateIntervalInMs
160
149
  });
161
150
  await poller.poll();
162
151
  return poller;
@@ -185,14 +174,19 @@ class PrivateEndpointConnectionsImpl {
185
174
  return this.client.sendOperationRequest(args, spec);
186
175
  };
187
176
  const sendOperationFn = async (args, spec) => {
188
- var _a;
189
177
  let currentRawResponse = undefined;
190
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
178
+ const providedCallback = args.options?.onResponse;
191
179
  const callback = (rawResponse, flatResponse) => {
192
180
  currentRawResponse = rawResponse;
193
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
181
+ providedCallback?.(rawResponse, flatResponse);
182
+ };
183
+ const updatedArgs = {
184
+ ...args,
185
+ options: {
186
+ ...args.options,
187
+ onResponse: callback
188
+ }
194
189
  };
195
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
196
190
  const flatResponse = await directSendOperation(updatedArgs, spec);
197
191
  return {
198
192
  flatResponse,
@@ -214,8 +208,8 @@ class PrivateEndpointConnectionsImpl {
214
208
  spec: deleteOperationSpec
215
209
  });
216
210
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
217
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
218
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
211
+ restoreFrom: options?.resumeFrom,
212
+ intervalInMs: options?.updateIntervalInMs
219
213
  });
220
214
  await poller.poll();
221
215
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"privateEndpointConnections.js","sourceRoot":"","sources":["../../../src/operations/privateEndpointConnections.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAc9C,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAa,8BAA8B;IAIzC;;;OAGG;IACH,YAAY,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AAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,8BAA8B;SACnD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;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 { PrivateEndpointConnections } 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 { AzureDatabricksManagementClient } from \"../azureDatabricksManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n PrivateEndpointConnection,\n PrivateEndpointConnectionsListNextOptionalParams,\n PrivateEndpointConnectionsListOptionalParams,\n PrivateEndpointConnectionsListResponse,\n PrivateEndpointConnectionsGetOptionalParams,\n PrivateEndpointConnectionsGetResponse,\n PrivateEndpointConnectionsCreateOptionalParams,\n PrivateEndpointConnectionsCreateResponse,\n PrivateEndpointConnectionsDeleteOptionalParams,\n PrivateEndpointConnectionsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PrivateEndpointConnections operations. */\nexport class PrivateEndpointConnectionsImpl\n implements PrivateEndpointConnections {\n private readonly client: AzureDatabricksManagementClient;\n\n /**\n * Initialize a new instance of the class PrivateEndpointConnections class.\n * @param client Reference to the service client\n */\n constructor(client: AzureDatabricksManagementClient) {\n this.client = client;\n }\n\n /**\n * List private endpoint connections of the workspace\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateEndpointConnectionsListOptionalParams\n ): PagedAsyncIterableIterator<PrivateEndpointConnection> {\n const iter = this.listPagingAll(resourceGroupName, workspaceName, 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(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateEndpointConnectionsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<PrivateEndpointConnection[]> {\n let result: PrivateEndpointConnectionsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, workspaceName, 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(\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 *listPagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateEndpointConnectionsListOptionalParams\n ): AsyncIterableIterator<PrivateEndpointConnection> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * List private endpoint connections of the workspace\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateEndpointConnectionsListOptionalParams\n ): Promise<PrivateEndpointConnectionsListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listOperationSpec\n );\n }\n\n /**\n * Get a private endpoint connection properties for a workspace\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param privateEndpointConnectionName The name of the private endpoint connection\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n privateEndpointConnectionName: string,\n options?: PrivateEndpointConnectionsGetOptionalParams\n ): Promise<PrivateEndpointConnectionsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n workspaceName,\n privateEndpointConnectionName,\n options\n },\n getOperationSpec\n );\n }\n\n /**\n * Update the status of a private endpoint connection with the specified name\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param privateEndpointConnectionName The name of the private endpoint connection\n * @param privateEndpointConnection The private endpoint connection with updated properties\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n workspaceName: string,\n privateEndpointConnectionName: string,\n privateEndpointConnection: PrivateEndpointConnection,\n options?: PrivateEndpointConnectionsCreateOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<PrivateEndpointConnectionsCreateResponse>,\n PrivateEndpointConnectionsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<PrivateEndpointConnectionsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 privateEndpointConnectionName,\n privateEndpointConnection,\n options\n },\n spec: createOperationSpec\n });\n const poller = await createHttpPoller<\n PrivateEndpointConnectionsCreateResponse,\n OperationState<PrivateEndpointConnectionsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Update the status of a private endpoint connection with the specified name\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param privateEndpointConnectionName The name of the private endpoint connection\n * @param privateEndpointConnection The private endpoint connection with updated properties\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n privateEndpointConnectionName: string,\n privateEndpointConnection: PrivateEndpointConnection,\n options?: PrivateEndpointConnectionsCreateOptionalParams\n ): Promise<PrivateEndpointConnectionsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n workspaceName,\n privateEndpointConnectionName,\n privateEndpointConnection,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Remove private endpoint connection with the specified name\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param privateEndpointConnectionName The name of the private endpoint connection\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n workspaceName: string,\n privateEndpointConnectionName: string,\n options?: PrivateEndpointConnectionsDeleteOptionalParams\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:\n | coreClient.FullOperationResponse\n | undefined = 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 privateEndpointConnectionName,\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 * Remove private endpoint connection with the specified name\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param privateEndpointConnectionName The name of the private endpoint connection\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n workspaceName: string,\n privateEndpointConnectionName: string,\n options?: PrivateEndpointConnectionsDeleteOptionalParams\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n workspaceName,\n privateEndpointConnectionName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\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 resourceGroupName: string,\n workspaceName: string,\n nextLink: string,\n options?: PrivateEndpointConnectionsListNextOptionalParams\n ): Promise<PrivateEndpointConnectionsListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateEndpointConnectionsList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateEndpointConnection\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.privateEndpointConnectionName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateEndpointConnection\n },\n 201: {\n bodyMapper: Mappers.PrivateEndpointConnection\n },\n 202: {\n bodyMapper: Mappers.PrivateEndpointConnection\n },\n 204: {\n bodyMapper: Mappers.PrivateEndpointConnection\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.privateEndpointConnection,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.privateEndpointConnectionName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.privateEndpointConnectionName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateEndpointConnectionsList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"privateEndpointConnections.js","sourceRoot":"","sources":["../../../src/operations/privateEndpointConnections.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAc9C,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAa,8BAA8B;IAExB,MAAM,CAAkC;IAEzD;;;OAGG;IACH,YAAY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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 { PrivateEndpointConnections } 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 { AzureDatabricksManagementClient } from \"../azureDatabricksManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n PrivateEndpointConnection,\n PrivateEndpointConnectionsListNextOptionalParams,\n PrivateEndpointConnectionsListOptionalParams,\n PrivateEndpointConnectionsListResponse,\n PrivateEndpointConnectionsGetOptionalParams,\n PrivateEndpointConnectionsGetResponse,\n PrivateEndpointConnectionsCreateOptionalParams,\n PrivateEndpointConnectionsCreateResponse,\n PrivateEndpointConnectionsDeleteOptionalParams,\n PrivateEndpointConnectionsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PrivateEndpointConnections operations. */\nexport class PrivateEndpointConnectionsImpl\n implements PrivateEndpointConnections {\n private readonly client: AzureDatabricksManagementClient;\n\n /**\n * Initialize a new instance of the class PrivateEndpointConnections class.\n * @param client Reference to the service client\n */\n constructor(client: AzureDatabricksManagementClient) {\n this.client = client;\n }\n\n /**\n * List private endpoint connections of the workspace\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateEndpointConnectionsListOptionalParams\n ): PagedAsyncIterableIterator<PrivateEndpointConnection> {\n const iter = this.listPagingAll(resourceGroupName, workspaceName, 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(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateEndpointConnectionsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<PrivateEndpointConnection[]> {\n let result: PrivateEndpointConnectionsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, workspaceName, 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(\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 *listPagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateEndpointConnectionsListOptionalParams\n ): AsyncIterableIterator<PrivateEndpointConnection> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * List private endpoint connections of the workspace\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateEndpointConnectionsListOptionalParams\n ): Promise<PrivateEndpointConnectionsListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listOperationSpec\n );\n }\n\n /**\n * Get a private endpoint connection properties for a workspace\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param privateEndpointConnectionName The name of the private endpoint connection\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n privateEndpointConnectionName: string,\n options?: PrivateEndpointConnectionsGetOptionalParams\n ): Promise<PrivateEndpointConnectionsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n workspaceName,\n privateEndpointConnectionName,\n options\n },\n getOperationSpec\n );\n }\n\n /**\n * Update the status of a private endpoint connection with the specified name\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param privateEndpointConnectionName The name of the private endpoint connection\n * @param privateEndpointConnection The private endpoint connection with updated properties\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n workspaceName: string,\n privateEndpointConnectionName: string,\n privateEndpointConnection: PrivateEndpointConnection,\n options?: PrivateEndpointConnectionsCreateOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<PrivateEndpointConnectionsCreateResponse>,\n PrivateEndpointConnectionsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<PrivateEndpointConnectionsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 privateEndpointConnectionName,\n privateEndpointConnection,\n options\n },\n spec: createOperationSpec\n });\n const poller = await createHttpPoller<\n PrivateEndpointConnectionsCreateResponse,\n OperationState<PrivateEndpointConnectionsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Update the status of a private endpoint connection with the specified name\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param privateEndpointConnectionName The name of the private endpoint connection\n * @param privateEndpointConnection The private endpoint connection with updated properties\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n privateEndpointConnectionName: string,\n privateEndpointConnection: PrivateEndpointConnection,\n options?: PrivateEndpointConnectionsCreateOptionalParams\n ): Promise<PrivateEndpointConnectionsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n workspaceName,\n privateEndpointConnectionName,\n privateEndpointConnection,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Remove private endpoint connection with the specified name\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param privateEndpointConnectionName The name of the private endpoint connection\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n workspaceName: string,\n privateEndpointConnectionName: string,\n options?: PrivateEndpointConnectionsDeleteOptionalParams\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:\n | coreClient.FullOperationResponse\n | undefined = 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 privateEndpointConnectionName,\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 * Remove private endpoint connection with the specified name\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param privateEndpointConnectionName The name of the private endpoint connection\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n workspaceName: string,\n privateEndpointConnectionName: string,\n options?: PrivateEndpointConnectionsDeleteOptionalParams\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n workspaceName,\n privateEndpointConnectionName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\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 resourceGroupName: string,\n workspaceName: string,\n nextLink: string,\n options?: PrivateEndpointConnectionsListNextOptionalParams\n ): Promise<PrivateEndpointConnectionsListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateEndpointConnectionsList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateEndpointConnection\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.privateEndpointConnectionName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateEndpointConnection\n },\n 201: {\n bodyMapper: Mappers.PrivateEndpointConnection\n },\n 202: {\n bodyMapper: Mappers.PrivateEndpointConnection\n },\n 204: {\n bodyMapper: Mappers.PrivateEndpointConnection\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.privateEndpointConnection,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.privateEndpointConnectionName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.privateEndpointConnectionName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateEndpointConnectionsList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.nextLink\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 PrivateLinkResources operations. */
18
18
  class PrivateLinkResourcesImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class PrivateLinkResources class.
21
22
  * @param client Reference to the service client
@@ -39,52 +40,35 @@ class PrivateLinkResourcesImpl {
39
40
  return this;
40
41
  },
41
42
  byPage: (settings) => {
42
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
43
+ if (settings?.maxPageSize) {
43
44
  throw new Error("maxPageSize is not supported by this operation.");
44
45
  }
45
46
  return this.listPagingPage(resourceGroupName, workspaceName, options, settings);
46
47
  }
47
48
  };
48
49
  }
49
- listPagingPage(resourceGroupName, workspaceName, options, settings) {
50
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
51
- let result;
52
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield tslib_1.__await(this._list(resourceGroupName, workspaceName, options));
55
- let page = result.value || [];
56
- continuationToken = result.nextLink;
57
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
58
- yield yield tslib_1.__await(page);
59
- }
60
- while (continuationToken) {
61
- result = yield tslib_1.__await(this._listNext(resourceGroupName, workspaceName, continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
65
- yield yield tslib_1.__await(page);
66
- }
67
- });
50
+ async *listPagingPage(resourceGroupName, workspaceName, options, settings) {
51
+ let result;
52
+ let continuationToken = settings?.continuationToken;
53
+ if (!continuationToken) {
54
+ result = await this._list(resourceGroupName, workspaceName, options);
55
+ let page = result.value || [];
56
+ continuationToken = result.nextLink;
57
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
58
+ yield page;
59
+ }
60
+ while (continuationToken) {
61
+ result = await this._listNext(resourceGroupName, workspaceName, continuationToken, options);
62
+ continuationToken = result.nextLink;
63
+ let page = result.value || [];
64
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
65
+ yield page;
66
+ }
68
67
  }
69
- listPagingAll(resourceGroupName, workspaceName, options) {
70
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(resourceGroupName, workspaceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
74
- _c = _f.value;
75
- _d = false;
76
- const page = _c;
77
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
78
- }
79
- }
80
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
81
- finally {
82
- try {
83
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
84
- }
85
- finally { if (e_1) throw e_1.error; }
86
- }
87
- });
68
+ async *listPagingAll(resourceGroupName, workspaceName, options) {
69
+ for await (const page of this.listPagingPage(resourceGroupName, workspaceName, options)) {
70
+ yield* page;
71
+ }
88
72
  }
89
73
  /**
90
74
  * List private link resources for a given workspace
@@ -1 +1 @@
1
- {"version":3,"file":"privateLinkResources.js","sourceRoot":"","sources":["../../../src/operations/privateLinkResources.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,4CAA4C;AAC5C,wDAAwD;AACxD,MAAa,wBAAwB;IAGnC;;;OAGG;IACH,YAAY,MAAuC;QACjD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAyB,EACzB,aAAqB,EACrB,OAAgD;QAEhD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3E,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,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CACxB,iBAAiB,EACjB,aAAa,EACb,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,iBAAyB,EACzB,aAAqB,EACrB,OAAgD,EAChD,QAAuB;;YAEvB,IAAI,MAAwC,CAAC;YAC7C,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ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EAAE;YACH,UAAU,EAAE,OAAO,CAAC,kBAAkB;SACvC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,OAAO;KACnB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;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 { PrivateLinkResources } 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 { AzureDatabricksManagementClient } from \"../azureDatabricksManagementClient.js\";\nimport {\n GroupIdInformation,\n PrivateLinkResourcesListNextOptionalParams,\n PrivateLinkResourcesListOptionalParams,\n PrivateLinkResourcesListResponse,\n PrivateLinkResourcesGetOptionalParams,\n PrivateLinkResourcesGetResponse,\n PrivateLinkResourcesListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PrivateLinkResources operations. */\nexport class PrivateLinkResourcesImpl implements PrivateLinkResources {\n private readonly client: AzureDatabricksManagementClient;\n\n /**\n * Initialize a new instance of the class PrivateLinkResources class.\n * @param client Reference to the service client\n */\n constructor(client: AzureDatabricksManagementClient) {\n this.client = client;\n }\n\n /**\n * List private link resources for a given workspace\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateLinkResourcesListOptionalParams\n ): PagedAsyncIterableIterator<GroupIdInformation> {\n const iter = this.listPagingAll(resourceGroupName, workspaceName, 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(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateLinkResourcesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<GroupIdInformation[]> {\n let result: PrivateLinkResourcesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, workspaceName, 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(\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 *listPagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateLinkResourcesListOptionalParams\n ): AsyncIterableIterator<GroupIdInformation> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * List private link resources for a given workspace\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateLinkResourcesListOptionalParams\n ): Promise<PrivateLinkResourcesListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listOperationSpec\n );\n }\n\n /**\n * Get the specified private link resource for the given group id (sub-resource)\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param groupId The name of the private link resource\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n groupId: string,\n options?: PrivateLinkResourcesGetOptionalParams\n ): Promise<PrivateLinkResourcesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, groupId, options },\n getOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\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 resourceGroupName: string,\n workspaceName: string,\n nextLink: string,\n options?: PrivateLinkResourcesListNextOptionalParams\n ): Promise<PrivateLinkResourcesListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateLinkResourcesList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources/{groupId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupIdInformation\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.groupId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateLinkResourcesList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"privateLinkResources.js","sourceRoot":"","sources":["../../../src/operations/privateLinkResources.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,4CAA4C;AAC5C,wDAAwD;AACxD,MAAa,wBAAwB;IAClB,MAAM,CAAkC;IAEzD;;;OAGG;IACH,YAAY,MAAuC;QACjD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAyB,EACzB,aAAqB,EACrB,OAAgD;QAEhD,MAAM,IAAI,GAAG,IAAI,C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E,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 { PrivateLinkResources } 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 { AzureDatabricksManagementClient } from \"../azureDatabricksManagementClient.js\";\nimport {\n GroupIdInformation,\n PrivateLinkResourcesListNextOptionalParams,\n PrivateLinkResourcesListOptionalParams,\n PrivateLinkResourcesListResponse,\n PrivateLinkResourcesGetOptionalParams,\n PrivateLinkResourcesGetResponse,\n PrivateLinkResourcesListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PrivateLinkResources operations. */\nexport class PrivateLinkResourcesImpl implements PrivateLinkResources {\n private readonly client: AzureDatabricksManagementClient;\n\n /**\n * Initialize a new instance of the class PrivateLinkResources class.\n * @param client Reference to the service client\n */\n constructor(client: AzureDatabricksManagementClient) {\n this.client = client;\n }\n\n /**\n * List private link resources for a given workspace\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateLinkResourcesListOptionalParams\n ): PagedAsyncIterableIterator<GroupIdInformation> {\n const iter = this.listPagingAll(resourceGroupName, workspaceName, 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(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateLinkResourcesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<GroupIdInformation[]> {\n let result: PrivateLinkResourcesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, workspaceName, 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(\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 *listPagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateLinkResourcesListOptionalParams\n ): AsyncIterableIterator<GroupIdInformation> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * List private link resources for a given workspace\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n workspaceName: string,\n options?: PrivateLinkResourcesListOptionalParams\n ): Promise<PrivateLinkResourcesListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listOperationSpec\n );\n }\n\n /**\n * Get the specified private link resource for the given group id (sub-resource)\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param groupId The name of the private link resource\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n groupId: string,\n options?: PrivateLinkResourcesGetOptionalParams\n ): Promise<PrivateLinkResourcesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, groupId, options },\n getOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\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 resourceGroupName: string,\n workspaceName: string,\n nextLink: string,\n options?: PrivateLinkResourcesListNextOptionalParams\n ): Promise<PrivateLinkResourcesListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateLinkResourcesList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources/{groupId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupIdInformation\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.groupId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateLinkResourcesList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing VNetPeering operations. */
20
20
  class VNetPeeringImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class VNetPeering class.
23
24
  * @param client Reference to the service client
@@ -41,52 +42,35 @@ class VNetPeeringImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
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
- return tslib_1.__asyncGenerator(this, arguments, function* listByWorkspacePagingPage_1() {
53
- let result;
54
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
55
- if (!continuationToken) {
56
- result = yield tslib_1.__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 yield tslib_1.__await(page);
61
- }
62
- while (continuationToken) {
63
- result = yield tslib_1.__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 yield tslib_1.__await(page);
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
- return tslib_1.__asyncGenerator(this, arguments, function* listByWorkspacePagingAll_1() {
73
- var _a, e_1, _b, _c;
74
- try {
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
  * Gets the workspace vNet Peering.
@@ -110,14 +94,19 @@ class VNetPeeringImpl {
110
94
  return this.client.sendOperationRequest(args, spec);
111
95
  };
112
96
  const sendOperationFn = async (args, spec) => {
113
- var _a;
114
97
  let currentRawResponse = undefined;
115
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
98
+ const providedCallback = args.options?.onResponse;
116
99
  const callback = (rawResponse, flatResponse) => {
117
100
  currentRawResponse = rawResponse;
118
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
101
+ providedCallback?.(rawResponse, flatResponse);
102
+ };
103
+ const updatedArgs = {
104
+ ...args,
105
+ options: {
106
+ ...args.options,
107
+ onResponse: callback
108
+ }
119
109
  };
120
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
121
110
  const flatResponse = await directSendOperation(updatedArgs, spec);
122
111
  return {
123
112
  flatResponse,
@@ -134,8 +123,8 @@ class VNetPeeringImpl {
134
123
  spec: deleteOperationSpec
135
124
  });
136
125
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
137
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
138
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
126
+ restoreFrom: options?.resumeFrom,
127
+ intervalInMs: options?.updateIntervalInMs
139
128
  });
140
129
  await poller.poll();
141
130
  return poller;
@@ -164,14 +153,19 @@ class VNetPeeringImpl {
164
153
  return this.client.sendOperationRequest(args, spec);
165
154
  };
166
155
  const sendOperationFn = async (args, spec) => {
167
- var _a;
168
156
  let currentRawResponse = undefined;
169
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
157
+ const providedCallback = args.options?.onResponse;
170
158
  const callback = (rawResponse, flatResponse) => {
171
159
  currentRawResponse = rawResponse;
172
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
160
+ providedCallback?.(rawResponse, flatResponse);
161
+ };
162
+ const updatedArgs = {
163
+ ...args,
164
+ options: {
165
+ ...args.options,
166
+ onResponse: callback
167
+ }
173
168
  };
174
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
175
169
  const flatResponse = await directSendOperation(updatedArgs, spec);
176
170
  return {
177
171
  flatResponse,
@@ -194,8 +188,8 @@ class VNetPeeringImpl {
194
188
  spec: createOrUpdateOperationSpec
195
189
  });
196
190
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
197
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
198
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
191
+ restoreFrom: options?.resumeFrom,
192
+ intervalInMs: options?.updateIntervalInMs
199
193
  });
200
194
  await poller.poll();
201
195
  return poller;