@azure/synapse-artifacts 1.0.0-beta.10 → 1.0.0-beta.11
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/README.md +1 -1
- package/dist/index.js +1375 -1791
- package/dist/index.js.map +1 -1
- package/dist-esm/src/artifactsClient.js +18 -1
- package/dist-esm/src/artifactsClient.js.map +1 -1
- package/dist-esm/src/models/index.js +378 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.js +583 -29
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.js +1 -1
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/bigDataPools.js +7 -32
- package/dist-esm/src/operations/bigDataPools.js.map +1 -1
- package/dist-esm/src/operations/dataFlowDebugSession.js +19 -92
- package/dist-esm/src/operations/dataFlowDebugSession.js.map +1 -1
- package/dist-esm/src/operations/dataFlowOperations.js +19 -92
- package/dist-esm/src/operations/dataFlowOperations.js.map +1 -1
- package/dist-esm/src/operations/datasetOperations.js +19 -92
- package/dist-esm/src/operations/datasetOperations.js.map +1 -1
- package/dist-esm/src/operations/integrationRuntimes.js +7 -32
- package/dist-esm/src/operations/integrationRuntimes.js.map +1 -1
- package/dist-esm/src/operations/kqlScriptOperations.js +13 -62
- package/dist-esm/src/operations/kqlScriptOperations.js.map +1 -1
- package/dist-esm/src/operations/kqlScripts.js +7 -32
- package/dist-esm/src/operations/kqlScripts.js.map +1 -1
- package/dist-esm/src/operations/library.js +25 -122
- package/dist-esm/src/operations/library.js.map +1 -1
- package/dist-esm/src/operations/linkConnectionOperations.js +37 -182
- package/dist-esm/src/operations/linkConnectionOperations.js.map +1 -1
- package/dist-esm/src/operations/linkedServiceOperations.js +19 -92
- package/dist-esm/src/operations/linkedServiceOperations.js.map +1 -1
- package/dist-esm/src/operations/metastore.js +13 -62
- package/dist-esm/src/operations/metastore.js.map +1 -1
- package/dist-esm/src/operations/notebookOperationResult.js +4 -17
- package/dist-esm/src/operations/notebookOperationResult.js.map +1 -1
- package/dist-esm/src/operations/notebookOperations.js +25 -122
- package/dist-esm/src/operations/notebookOperations.js.map +1 -1
- package/dist-esm/src/operations/pipelineOperations.js +22 -107
- package/dist-esm/src/operations/pipelineOperations.js.map +1 -1
- package/dist-esm/src/operations/pipelineRunOperations.js +13 -62
- package/dist-esm/src/operations/pipelineRunOperations.js.map +1 -1
- package/dist-esm/src/operations/sparkConfigurationOperations.js +19 -92
- package/dist-esm/src/operations/sparkConfigurationOperations.js.map +1 -1
- package/dist-esm/src/operations/sparkJobDefinitionOperations.js +25 -122
- package/dist-esm/src/operations/sparkJobDefinitionOperations.js.map +1 -1
- package/dist-esm/src/operations/sqlPools.js +7 -32
- package/dist-esm/src/operations/sqlPools.js.map +1 -1
- package/dist-esm/src/operations/sqlScriptOperations.js +19 -92
- package/dist-esm/src/operations/sqlScriptOperations.js.map +1 -1
- package/dist-esm/src/operations/triggerOperations.js +31 -152
- package/dist-esm/src/operations/triggerOperations.js.map +1 -1
- package/dist-esm/src/operations/triggerRunOperations.js +10 -47
- package/dist-esm/src/operations/triggerRunOperations.js.map +1 -1
- package/dist-esm/src/operations/workspaceGitRepoManagement.js +4 -17
- package/dist-esm/src/operations/workspaceGitRepoManagement.js.map +1 -1
- package/dist-esm/src/operations/workspaceOperations.js +4 -17
- package/dist-esm/src/operations/workspaceOperations.js.map +1 -1
- package/dist-esm/src/tracing.js +4 -3
- package/dist-esm/src/tracing.js.map +1 -1
- package/package.json +5 -5
- package/types/synapse-artifacts.d.ts +1557 -948
- package/CHANGELOG.md +0 -65
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { tracingClient } from "../tracing";
|
|
9
9
|
import * as coreClient from "@azure/core-client";
|
|
10
|
-
import * as coreTracing from "@azure/core-tracing";
|
|
11
10
|
import * as Mappers from "../models/mappers";
|
|
12
11
|
import * as Parameters from "../models/parameters";
|
|
13
12
|
/** Class containing IntegrationRuntimes operations. */
|
|
@@ -24,21 +23,9 @@ export class IntegrationRuntimesImpl {
|
|
|
24
23
|
* @param options The options parameters.
|
|
25
24
|
*/
|
|
26
25
|
async list(options) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return result;
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
span.setStatus({
|
|
34
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
35
|
-
message: error.message
|
|
36
|
-
});
|
|
37
|
-
throw error;
|
|
38
|
-
}
|
|
39
|
-
finally {
|
|
40
|
-
span.end();
|
|
41
|
-
}
|
|
26
|
+
return tracingClient.withSpan("ArtifactsClient.list", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
27
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
28
|
+
});
|
|
42
29
|
}
|
|
43
30
|
/**
|
|
44
31
|
* Get Integration Runtime
|
|
@@ -46,21 +33,9 @@ export class IntegrationRuntimesImpl {
|
|
|
46
33
|
* @param options The options parameters.
|
|
47
34
|
*/
|
|
48
35
|
async get(integrationRuntimeName, options) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return result;
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
span.setStatus({
|
|
56
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
57
|
-
message: error.message
|
|
58
|
-
});
|
|
59
|
-
throw error;
|
|
60
|
-
}
|
|
61
|
-
finally {
|
|
62
|
-
span.end();
|
|
63
|
-
}
|
|
36
|
+
return tracingClient.withSpan("ArtifactsClient.get", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
37
|
+
return this.client.sendOperationRequest({ integrationRuntimeName, options }, getOperationSpec);
|
|
38
|
+
});
|
|
64
39
|
}
|
|
65
40
|
}
|
|
66
41
|
// Operation Specifications
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrationRuntimes.js","sourceRoot":"","sources":["../../../src/operations/integrationRuntimes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"integrationRuntimes.js","sourceRoot":"","sources":["../../../src/operations/integrationRuntimes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AASnD,uDAAuD;AACvD,MAAM,OAAO,uBAAuB;IAGlC;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,IAAI,CACR,OAA+C;QAE/C,OAAO,aAAa,CAAC,QAAQ,CAC3B,sBAAsB,EACtB,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,EACX,iBAAiB,CAC0B,CAAC;QAChD,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,GAAG,CACP,sBAA8B,EAC9B,OAA8C;QAE9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,qBAAqB,EACrB,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,sBAAsB,EAAE,OAAO,EAAE,EACnC,gBAAgB,CAC0B,CAAC;QAC/C,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,sBAAsB;IAC5B,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,8BAA8B;SACnD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,+CAA+C;IACrD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,sBAAsB,CAAC;IACvE,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 { tracingClient } from \"../tracing\";\nimport { IntegrationRuntimes } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ArtifactsClient } from \"../artifactsClient\";\nimport {\n IntegrationRuntimesListOptionalParams,\n IntegrationRuntimesListResponse,\n IntegrationRuntimesGetOptionalParams,\n IntegrationRuntimesGetResponse\n} from \"../models\";\n\n/** Class containing IntegrationRuntimes operations. */\nexport class IntegrationRuntimesImpl implements IntegrationRuntimes {\n private readonly client: ArtifactsClient;\n\n /**\n * Initialize a new instance of the class IntegrationRuntimes class.\n * @param client Reference to the service client\n */\n constructor(client: ArtifactsClient) {\n this.client = client;\n }\n\n /**\n * List Integration Runtimes\n * @param options The options parameters.\n */\n async list(\n options?: IntegrationRuntimesListOptionalParams\n ): Promise<IntegrationRuntimesListResponse> {\n return tracingClient.withSpan(\n \"ArtifactsClient.list\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n listOperationSpec\n ) as Promise<IntegrationRuntimesListResponse>;\n }\n );\n }\n\n /**\n * Get Integration Runtime\n * @param integrationRuntimeName The Integration Runtime name\n * @param options The options parameters.\n */\n async get(\n integrationRuntimeName: string,\n options?: IntegrationRuntimesGetOptionalParams\n ): Promise<IntegrationRuntimesGetResponse> {\n return tracingClient.withSpan(\n \"ArtifactsClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { integrationRuntimeName, options },\n getOperationSpec\n ) as Promise<IntegrationRuntimesGetResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/integrationRuntimes\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.IntegrationRuntimeListResponse\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/integrationRuntimes/{integrationRuntimeName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.IntegrationRuntimeResource\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [Parameters.endpoint, Parameters.integrationRuntimeName],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { tracingClient } from "../tracing";
|
|
9
9
|
import * as coreClient from "@azure/core-client";
|
|
10
|
-
import * as coreTracing from "@azure/core-tracing";
|
|
11
10
|
import * as Mappers from "../models/mappers";
|
|
12
11
|
import * as Parameters from "../models/parameters";
|
|
13
12
|
import { LroEngine } from "@azure/core-lro";
|
|
@@ -28,22 +27,10 @@ export class KqlScriptOperationsImpl {
|
|
|
28
27
|
* @param options The options parameters.
|
|
29
28
|
*/
|
|
30
29
|
async beginCreateOrUpdate(kqlScriptName, kqlScript, options) {
|
|
31
|
-
const { span } = createSpan("ArtifactsClient-beginCreateOrUpdate", options || {});
|
|
32
30
|
const directSendOperation = async (args, spec) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
span.setStatus({
|
|
39
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
40
|
-
message: error.message
|
|
41
|
-
});
|
|
42
|
-
throw error;
|
|
43
|
-
}
|
|
44
|
-
finally {
|
|
45
|
-
span.end();
|
|
46
|
-
}
|
|
31
|
+
return tracingClient.withSpan("ArtifactsClient.beginCreateOrUpdate", options !== null && options !== void 0 ? options : {}, async () => {
|
|
32
|
+
return this.client.sendOperationRequest(args, spec);
|
|
33
|
+
});
|
|
47
34
|
};
|
|
48
35
|
const sendOperation = async (args, spec) => {
|
|
49
36
|
var _a;
|
|
@@ -88,21 +75,9 @@ export class KqlScriptOperationsImpl {
|
|
|
88
75
|
* @param options The options parameters.
|
|
89
76
|
*/
|
|
90
77
|
async getByName(kqlScriptName, options) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return result;
|
|
95
|
-
}
|
|
96
|
-
catch (error) {
|
|
97
|
-
span.setStatus({
|
|
98
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
99
|
-
message: error.message
|
|
100
|
-
});
|
|
101
|
-
throw error;
|
|
102
|
-
}
|
|
103
|
-
finally {
|
|
104
|
-
span.end();
|
|
105
|
-
}
|
|
78
|
+
return tracingClient.withSpan("ArtifactsClient.getByName", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
79
|
+
return this.client.sendOperationRequest({ kqlScriptName, options }, getByNameOperationSpec);
|
|
80
|
+
});
|
|
106
81
|
}
|
|
107
82
|
/**
|
|
108
83
|
* Delete KQL script by name
|
|
@@ -110,22 +85,10 @@ export class KqlScriptOperationsImpl {
|
|
|
110
85
|
* @param options The options parameters.
|
|
111
86
|
*/
|
|
112
87
|
async beginDeleteByName(kqlScriptName, options) {
|
|
113
|
-
const { span } = createSpan("ArtifactsClient-beginDeleteByName", options || {});
|
|
114
88
|
const directSendOperation = async (args, spec) => {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
catch (error) {
|
|
120
|
-
span.setStatus({
|
|
121
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
122
|
-
message: error.message
|
|
123
|
-
});
|
|
124
|
-
throw error;
|
|
125
|
-
}
|
|
126
|
-
finally {
|
|
127
|
-
span.end();
|
|
128
|
-
}
|
|
89
|
+
return tracingClient.withSpan("ArtifactsClient.beginDeleteByName", options !== null && options !== void 0 ? options : {}, async () => {
|
|
90
|
+
return this.client.sendOperationRequest(args, spec);
|
|
91
|
+
});
|
|
129
92
|
};
|
|
130
93
|
const sendOperation = async (args, spec) => {
|
|
131
94
|
var _a;
|
|
@@ -170,22 +133,10 @@ export class KqlScriptOperationsImpl {
|
|
|
170
133
|
* @param options The options parameters.
|
|
171
134
|
*/
|
|
172
135
|
async beginRename(kqlScriptName, renameRequest, options) {
|
|
173
|
-
const { span } = createSpan("ArtifactsClient-beginRename", options || {});
|
|
174
136
|
const directSendOperation = async (args, spec) => {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
catch (error) {
|
|
180
|
-
span.setStatus({
|
|
181
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
182
|
-
message: error.message
|
|
183
|
-
});
|
|
184
|
-
throw error;
|
|
185
|
-
}
|
|
186
|
-
finally {
|
|
187
|
-
span.end();
|
|
188
|
-
}
|
|
137
|
+
return tracingClient.withSpan("ArtifactsClient.beginRename", options !== null && options !== void 0 ? options : {}, async () => {
|
|
138
|
+
return this.client.sendOperationRequest(args, spec);
|
|
139
|
+
});
|
|
189
140
|
};
|
|
190
141
|
const sendOperation = async (args, spec) => {
|
|
191
142
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kqlScriptOperations.js","sourceRoot":"","sources":["../../../src/operations/kqlScriptOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAYrC,uDAAuD;AACvD,MAAM,OAAO,uBAAuB;IAGlC;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CAC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AAQ,EAAE,UAAU,CAAC,aAAa,CAAC;IAC9D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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 { createSpan } from \"../tracing\";\nimport { KqlScriptOperations } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreTracing from \"@azure/core-tracing\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ArtifactsClient } from \"../artifactsClient\";\nimport { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl\";\nimport {\n KqlScriptResource,\n KqlScriptCreateOrUpdateOptionalParams,\n KqlScriptCreateOrUpdateResponse,\n KqlScriptGetByNameOptionalParams,\n KqlScriptGetByNameResponse,\n KqlScriptDeleteByNameOptionalParams,\n ArtifactRenameRequest,\n KqlScriptRenameOptionalParams\n} from \"../models\";\n\n/** Class containing KqlScriptOperations operations. */\nexport class KqlScriptOperationsImpl implements KqlScriptOperations {\n private readonly client: ArtifactsClient;\n\n /**\n * Initialize a new instance of the class KqlScriptOperations class.\n * @param client Reference to the service client\n */\n constructor(client: ArtifactsClient) {\n this.client = client;\n }\n\n /**\n * Creates or updates a KQL Script\n * @param kqlScriptName KQL script name\n * @param kqlScript KQL script\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n kqlScriptName: string,\n kqlScript: KqlScriptResource,\n options?: KqlScriptCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<KqlScriptCreateOrUpdateResponse>,\n KqlScriptCreateOrUpdateResponse\n >\n > {\n const { span } = createSpan(\n \"ArtifactsClient-beginCreateOrUpdate\",\n options || {}\n );\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<KqlScriptCreateOrUpdateResponse> => {\n try {\n const result = await this.client.sendOperationRequest(args, spec);\n return result as KqlScriptCreateOrUpdateResponse;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n };\n const sendOperation = 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 = new LroImpl(\n sendOperation,\n { kqlScriptName, kqlScript, options },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates a KQL Script\n * @param kqlScriptName KQL script name\n * @param kqlScript KQL script\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n kqlScriptName: string,\n kqlScript: KqlScriptResource,\n options?: KqlScriptCreateOrUpdateOptionalParams\n ): Promise<KqlScriptCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n kqlScriptName,\n kqlScript,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async getByName(\n kqlScriptName: string,\n options?: KqlScriptGetByNameOptionalParams\n ): Promise<KqlScriptGetByNameResponse> {\n const { span } = createSpan(\"ArtifactsClient-getByName\", options || {});\n try {\n const result = await this.client.sendOperationRequest(\n { kqlScriptName, options },\n getByNameOperationSpec\n );\n return result as KqlScriptGetByNameResponse;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n }\n\n /**\n * Delete KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async beginDeleteByName(\n kqlScriptName: string,\n options?: KqlScriptDeleteByNameOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const { span } = createSpan(\n \"ArtifactsClient-beginDeleteByName\",\n options || {}\n );\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n try {\n const result = await this.client.sendOperationRequest(args, spec);\n return result as void;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n };\n const sendOperation = 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 = new LroImpl(\n sendOperation,\n { kqlScriptName, options },\n deleteByNameOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async beginDeleteByNameAndWait(\n kqlScriptName: string,\n options?: KqlScriptDeleteByNameOptionalParams\n ): Promise<void> {\n const poller = await this.beginDeleteByName(kqlScriptName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Rename KQL script\n * @param kqlScriptName KQL script name\n * @param renameRequest Rename request\n * @param options The options parameters.\n */\n async beginRename(\n kqlScriptName: string,\n renameRequest: ArtifactRenameRequest,\n options?: KqlScriptRenameOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const { span } = createSpan(\"ArtifactsClient-beginRename\", options || {});\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n try {\n const result = await this.client.sendOperationRequest(args, spec);\n return result as void;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n };\n const sendOperation = 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 = new LroImpl(\n sendOperation,\n { kqlScriptName, renameRequest, options },\n renameOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Rename KQL script\n * @param kqlScriptName KQL script name\n * @param renameRequest Rename request\n * @param options The options parameters.\n */\n async beginRenameAndWait(\n kqlScriptName: string,\n renameRequest: ArtifactRenameRequest,\n options?: KqlScriptRenameOptionalParams\n ): Promise<void> {\n const poller = await this.beginRename(\n kqlScriptName,\n renameRequest,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 201: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 202: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 204: {\n bodyMapper: Mappers.KqlScriptResource\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n requestBody: Parameters.kqlScript,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getByNameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptResource\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteByNameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst renameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}/rename\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n requestBody: Parameters.renameRequest,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"kqlScriptOperations.js","sourceRoot":"","sources":["../../../src/operations/kqlScriptOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAYrC,uDAAuD;AACvD,MAAM,OAAO,uBAAuB;IAGlC;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CACvB,aAAqB,EACrB,SAA4B,EAC5B,OAA+C;QAO/C,MAAM,mBAAmB,GAAG,KAAK,EAC/B,IAAmC,EACnC,IAA8B,EACY,EAAE;YAC5C,OAAO,aAAa,CAAC,QAAQ,CAC3B,qCAAqC,EACrC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,IAAI,EAAE;gBACT,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAEjD,CAAC;YACJ,CAAC,CACF,CAAC;QACJ,CAAC,CAAC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UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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 { tracingClient } from \"../tracing\";\nimport { KqlScriptOperations } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ArtifactsClient } from \"../artifactsClient\";\nimport { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl\";\nimport {\n KqlScriptResource,\n KqlScriptCreateOrUpdateOptionalParams,\n KqlScriptCreateOrUpdateResponse,\n KqlScriptGetByNameOptionalParams,\n KqlScriptGetByNameResponse,\n KqlScriptDeleteByNameOptionalParams,\n ArtifactRenameRequest,\n KqlScriptRenameOptionalParams\n} from \"../models\";\n\n/** Class containing KqlScriptOperations operations. */\nexport class KqlScriptOperationsImpl implements KqlScriptOperations {\n private readonly client: ArtifactsClient;\n\n /**\n * Initialize a new instance of the class KqlScriptOperations class.\n * @param client Reference to the service client\n */\n constructor(client: ArtifactsClient) {\n this.client = client;\n }\n\n /**\n * Creates or updates a KQL Script\n * @param kqlScriptName KQL script name\n * @param kqlScript KQL script\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n kqlScriptName: string,\n kqlScript: KqlScriptResource,\n options?: KqlScriptCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<KqlScriptCreateOrUpdateResponse>,\n KqlScriptCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<KqlScriptCreateOrUpdateResponse> => {\n return tracingClient.withSpan(\n \"ArtifactsClient.beginCreateOrUpdate\",\n options ?? {},\n async () => {\n return this.client.sendOperationRequest(args, spec) as Promise<\n KqlScriptCreateOrUpdateResponse\n >;\n }\n );\n };\n const sendOperation = 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 = new LroImpl(\n sendOperation,\n { kqlScriptName, kqlScript, options },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates a KQL Script\n * @param kqlScriptName KQL script name\n * @param kqlScript KQL script\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n kqlScriptName: string,\n kqlScript: KqlScriptResource,\n options?: KqlScriptCreateOrUpdateOptionalParams\n ): Promise<KqlScriptCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n kqlScriptName,\n kqlScript,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async getByName(\n kqlScriptName: string,\n options?: KqlScriptGetByNameOptionalParams\n ): Promise<KqlScriptGetByNameResponse> {\n return tracingClient.withSpan(\n \"ArtifactsClient.getByName\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { kqlScriptName, options },\n getByNameOperationSpec\n ) as Promise<KqlScriptGetByNameResponse>;\n }\n );\n }\n\n /**\n * Delete KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async beginDeleteByName(\n kqlScriptName: string,\n options?: KqlScriptDeleteByNameOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return tracingClient.withSpan(\n \"ArtifactsClient.beginDeleteByName\",\n options ?? {},\n async () => {\n return this.client.sendOperationRequest(args, spec) as Promise<void>;\n }\n );\n };\n const sendOperation = 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 = new LroImpl(\n sendOperation,\n { kqlScriptName, options },\n deleteByNameOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async beginDeleteByNameAndWait(\n kqlScriptName: string,\n options?: KqlScriptDeleteByNameOptionalParams\n ): Promise<void> {\n const poller = await this.beginDeleteByName(kqlScriptName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Rename KQL script\n * @param kqlScriptName KQL script name\n * @param renameRequest Rename request\n * @param options The options parameters.\n */\n async beginRename(\n kqlScriptName: string,\n renameRequest: ArtifactRenameRequest,\n options?: KqlScriptRenameOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return tracingClient.withSpan(\n \"ArtifactsClient.beginRename\",\n options ?? {},\n async () => {\n return this.client.sendOperationRequest(args, spec) as Promise<void>;\n }\n );\n };\n const sendOperation = 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 = new LroImpl(\n sendOperation,\n { kqlScriptName, renameRequest, options },\n renameOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Rename KQL script\n * @param kqlScriptName KQL script name\n * @param renameRequest Rename request\n * @param options The options parameters.\n */\n async beginRenameAndWait(\n kqlScriptName: string,\n renameRequest: ArtifactRenameRequest,\n options?: KqlScriptRenameOptionalParams\n ): Promise<void> {\n const poller = await this.beginRename(\n kqlScriptName,\n renameRequest,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 201: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 202: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 204: {\n bodyMapper: Mappers.KqlScriptResource\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n requestBody: Parameters.kqlScript,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getByNameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptResource\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteByNameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst renameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}/rename\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n requestBody: Parameters.renameRequest,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
|
-
import {
|
|
9
|
+
import { tracingClient } from "../tracing";
|
|
10
10
|
import * as coreClient from "@azure/core-client";
|
|
11
|
-
import * as coreTracing from "@azure/core-tracing";
|
|
12
11
|
import * as Mappers from "../models/mappers";
|
|
13
12
|
import * as Parameters from "../models/parameters";
|
|
14
13
|
/// <reference lib="esnext.asynciterable" />
|
|
@@ -74,21 +73,9 @@ export class KqlScriptsImpl {
|
|
|
74
73
|
* @param options The options parameters.
|
|
75
74
|
*/
|
|
76
75
|
async _getAll(options) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return result;
|
|
81
|
-
}
|
|
82
|
-
catch (error) {
|
|
83
|
-
span.setStatus({
|
|
84
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
85
|
-
message: error.message
|
|
86
|
-
});
|
|
87
|
-
throw error;
|
|
88
|
-
}
|
|
89
|
-
finally {
|
|
90
|
-
span.end();
|
|
91
|
-
}
|
|
76
|
+
return tracingClient.withSpan("ArtifactsClient._getAll", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
77
|
+
return this.client.sendOperationRequest({ options }, getAllOperationSpec);
|
|
78
|
+
});
|
|
92
79
|
}
|
|
93
80
|
/**
|
|
94
81
|
* GetAllNext
|
|
@@ -96,21 +83,9 @@ export class KqlScriptsImpl {
|
|
|
96
83
|
* @param options The options parameters.
|
|
97
84
|
*/
|
|
98
85
|
async _getAllNext(nextLink, options) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return result;
|
|
103
|
-
}
|
|
104
|
-
catch (error) {
|
|
105
|
-
span.setStatus({
|
|
106
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
107
|
-
message: error.message
|
|
108
|
-
});
|
|
109
|
-
throw error;
|
|
110
|
-
}
|
|
111
|
-
finally {
|
|
112
|
-
span.end();
|
|
113
|
-
}
|
|
86
|
+
return tracingClient.withSpan("ArtifactsClient._getAllNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
87
|
+
return this.client.sendOperationRequest({ nextLink, options }, getAllNextOperationSpec);
|
|
88
|
+
});
|
|
114
89
|
}
|
|
115
90
|
}
|
|
116
91
|
// Operation Specifications
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kqlScripts.js","sourceRoot":"","sources":["../../../src/operations/kqlScripts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"kqlScripts.js","sourceRoot":"","sources":["../../../src/operations/kqlScripts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAUnD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,OAAO,CACZ,OAAwC;QAExC,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC3C,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,GAAG,EAAE;gBACX,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;YACxC,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,gBAAgB,CAC7B,OAAwC;;YAExC,IAAI,MAAM,GAAG,cAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA,CAAC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F,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,aAAa;IACnB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,uBAAuB,GAA6B;IACxD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,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 { tracingClient } from \"../tracing\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { KqlScripts } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ArtifactsClient } from \"../artifactsClient\";\nimport {\n KqlScriptResource,\n KqlScriptsGetAllNextOptionalParams,\n KqlScriptsGetAllOptionalParams,\n KqlScriptsGetAllResponse,\n KqlScriptsGetAllNextResponse\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing KqlScripts operations. */\nexport class KqlScriptsImpl implements KqlScripts {\n private readonly client: ArtifactsClient;\n\n /**\n * Initialize a new instance of the class KqlScripts class.\n * @param client Reference to the service client\n */\n constructor(client: ArtifactsClient) {\n this.client = client;\n }\n\n /**\n * Get all KQL scripts\n * @param options The options parameters.\n */\n public listAll(\n options?: KqlScriptsGetAllOptionalParams\n ): PagedAsyncIterableIterator<KqlScriptResource> {\n const iter = this.getAllPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.getAllPagingPage(options);\n }\n };\n }\n\n private async *getAllPagingPage(\n options?: KqlScriptsGetAllOptionalParams\n ): AsyncIterableIterator<KqlScriptResource[]> {\n let result = await this._getAll(options);\n yield result.value || [];\n let continuationToken = result.nextLink;\n while (continuationToken) {\n result = await this._getAllNext(continuationToken, options);\n continuationToken = result.nextLink;\n yield result.value || [];\n }\n }\n\n private async *getAllPagingAll(\n options?: KqlScriptsGetAllOptionalParams\n ): AsyncIterableIterator<KqlScriptResource> {\n for await (const page of this.getAllPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get all KQL scripts\n * @param options The options parameters.\n */\n private async _getAll(\n options?: KqlScriptsGetAllOptionalParams\n ): Promise<KqlScriptsGetAllResponse> {\n return tracingClient.withSpan(\n \"ArtifactsClient._getAll\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getAllOperationSpec\n ) as Promise<KqlScriptsGetAllResponse>;\n }\n );\n }\n\n /**\n * GetAllNext\n * @param nextLink The nextLink from the previous successful call to the GetAll method.\n * @param options The options parameters.\n */\n private async _getAllNext(\n nextLink: string,\n options?: KqlScriptsGetAllNextOptionalParams\n ): Promise<KqlScriptsGetAllNextResponse> {\n return tracingClient.withSpan(\n \"ArtifactsClient._getAllNext\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { nextLink, options },\n getAllNextOperationSpec\n ) as Promise<KqlScriptsGetAllNextResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getAllOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptsResourceCollectionResponse\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getAllNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptsResourceCollectionResponse\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [Parameters.endpoint, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
|
-
import {
|
|
9
|
+
import { tracingClient } from "../tracing";
|
|
10
10
|
import * as coreClient from "@azure/core-client";
|
|
11
|
-
import * as coreTracing from "@azure/core-tracing";
|
|
12
11
|
import * as Mappers from "../models/mappers";
|
|
13
12
|
import * as Parameters from "../models/parameters";
|
|
14
13
|
import { LroEngine } from "@azure/core-lro";
|
|
@@ -76,21 +75,9 @@ export class LibraryImpl {
|
|
|
76
75
|
* @param options The options parameters.
|
|
77
76
|
*/
|
|
78
77
|
async _list(options) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return result;
|
|
83
|
-
}
|
|
84
|
-
catch (error) {
|
|
85
|
-
span.setStatus({
|
|
86
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
87
|
-
message: error.message
|
|
88
|
-
});
|
|
89
|
-
throw error;
|
|
90
|
-
}
|
|
91
|
-
finally {
|
|
92
|
-
span.end();
|
|
93
|
-
}
|
|
78
|
+
return tracingClient.withSpan("ArtifactsClient._list", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
79
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
80
|
+
});
|
|
94
81
|
}
|
|
95
82
|
/**
|
|
96
83
|
* Flush Library
|
|
@@ -99,22 +86,10 @@ export class LibraryImpl {
|
|
|
99
86
|
* @param options The options parameters.
|
|
100
87
|
*/
|
|
101
88
|
async beginFlush(libraryName, options) {
|
|
102
|
-
const { span } = createSpan("ArtifactsClient-beginFlush", options || {});
|
|
103
89
|
const directSendOperation = async (args, spec) => {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
catch (error) {
|
|
109
|
-
span.setStatus({
|
|
110
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
111
|
-
message: error.message
|
|
112
|
-
});
|
|
113
|
-
throw error;
|
|
114
|
-
}
|
|
115
|
-
finally {
|
|
116
|
-
span.end();
|
|
117
|
-
}
|
|
90
|
+
return tracingClient.withSpan("ArtifactsClient.beginFlush", options !== null && options !== void 0 ? options : {}, async () => {
|
|
91
|
+
return this.client.sendOperationRequest(args, spec);
|
|
92
|
+
});
|
|
118
93
|
};
|
|
119
94
|
const sendOperation = async (args, spec) => {
|
|
120
95
|
var _a;
|
|
@@ -159,21 +134,9 @@ export class LibraryImpl {
|
|
|
159
134
|
* @param options The options parameters.
|
|
160
135
|
*/
|
|
161
136
|
async getOperationResult(operationId, options) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
return result;
|
|
166
|
-
}
|
|
167
|
-
catch (error) {
|
|
168
|
-
span.setStatus({
|
|
169
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
170
|
-
message: error.message
|
|
171
|
-
});
|
|
172
|
-
throw error;
|
|
173
|
-
}
|
|
174
|
-
finally {
|
|
175
|
-
span.end();
|
|
176
|
-
}
|
|
137
|
+
return tracingClient.withSpan("ArtifactsClient.getOperationResult", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
138
|
+
return this.client.sendOperationRequest({ operationId, options }, getOperationResultOperationSpec);
|
|
139
|
+
});
|
|
177
140
|
}
|
|
178
141
|
/**
|
|
179
142
|
* Delete Library
|
|
@@ -182,22 +145,10 @@ export class LibraryImpl {
|
|
|
182
145
|
* @param options The options parameters.
|
|
183
146
|
*/
|
|
184
147
|
async beginDelete(libraryName, options) {
|
|
185
|
-
const { span } = createSpan("ArtifactsClient-beginDelete", options || {});
|
|
186
148
|
const directSendOperation = async (args, spec) => {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
catch (error) {
|
|
192
|
-
span.setStatus({
|
|
193
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
194
|
-
message: error.message
|
|
195
|
-
});
|
|
196
|
-
throw error;
|
|
197
|
-
}
|
|
198
|
-
finally {
|
|
199
|
-
span.end();
|
|
200
|
-
}
|
|
149
|
+
return tracingClient.withSpan("ArtifactsClient.beginDelete", options !== null && options !== void 0 ? options : {}, async () => {
|
|
150
|
+
return this.client.sendOperationRequest(args, spec);
|
|
151
|
+
});
|
|
201
152
|
};
|
|
202
153
|
const sendOperation = async (args, spec) => {
|
|
203
154
|
var _a;
|
|
@@ -243,21 +194,9 @@ export class LibraryImpl {
|
|
|
243
194
|
* @param options The options parameters.
|
|
244
195
|
*/
|
|
245
196
|
async get(libraryName, options) {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
return result;
|
|
250
|
-
}
|
|
251
|
-
catch (error) {
|
|
252
|
-
span.setStatus({
|
|
253
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
254
|
-
message: error.message
|
|
255
|
-
});
|
|
256
|
-
throw error;
|
|
257
|
-
}
|
|
258
|
-
finally {
|
|
259
|
-
span.end();
|
|
260
|
-
}
|
|
197
|
+
return tracingClient.withSpan("ArtifactsClient.get", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
198
|
+
return this.client.sendOperationRequest({ libraryName, options }, getOperationSpec);
|
|
199
|
+
});
|
|
261
200
|
}
|
|
262
201
|
/**
|
|
263
202
|
* Creates a library with the library name.
|
|
@@ -266,22 +205,10 @@ export class LibraryImpl {
|
|
|
266
205
|
* @param options The options parameters.
|
|
267
206
|
*/
|
|
268
207
|
async beginCreate(libraryName, options) {
|
|
269
|
-
const { span } = createSpan("ArtifactsClient-beginCreate", options || {});
|
|
270
208
|
const directSendOperation = async (args, spec) => {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
catch (error) {
|
|
276
|
-
span.setStatus({
|
|
277
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
278
|
-
message: error.message
|
|
279
|
-
});
|
|
280
|
-
throw error;
|
|
281
|
-
}
|
|
282
|
-
finally {
|
|
283
|
-
span.end();
|
|
284
|
-
}
|
|
209
|
+
return tracingClient.withSpan("ArtifactsClient.beginCreate", options !== null && options !== void 0 ? options : {}, async () => {
|
|
210
|
+
return this.client.sendOperationRequest(args, spec);
|
|
211
|
+
});
|
|
285
212
|
};
|
|
286
213
|
const sendOperation = async (args, spec) => {
|
|
287
214
|
var _a;
|
|
@@ -329,21 +256,9 @@ export class LibraryImpl {
|
|
|
329
256
|
* @param options The options parameters.
|
|
330
257
|
*/
|
|
331
258
|
async append(libraryName, content, options) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
return result;
|
|
336
|
-
}
|
|
337
|
-
catch (error) {
|
|
338
|
-
span.setStatus({
|
|
339
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
340
|
-
message: error.message
|
|
341
|
-
});
|
|
342
|
-
throw error;
|
|
343
|
-
}
|
|
344
|
-
finally {
|
|
345
|
-
span.end();
|
|
346
|
-
}
|
|
259
|
+
return tracingClient.withSpan("ArtifactsClient.append", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
260
|
+
return this.client.sendOperationRequest({ libraryName, content, options }, appendOperationSpec);
|
|
261
|
+
});
|
|
347
262
|
}
|
|
348
263
|
/**
|
|
349
264
|
* ListNext
|
|
@@ -351,21 +266,9 @@ export class LibraryImpl {
|
|
|
351
266
|
* @param options The options parameters.
|
|
352
267
|
*/
|
|
353
268
|
async _listNext(nextLink, options) {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
return result;
|
|
358
|
-
}
|
|
359
|
-
catch (error) {
|
|
360
|
-
span.setStatus({
|
|
361
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
362
|
-
message: error.message
|
|
363
|
-
});
|
|
364
|
-
throw error;
|
|
365
|
-
}
|
|
366
|
-
finally {
|
|
367
|
-
span.end();
|
|
368
|
-
}
|
|
269
|
+
return tracingClient.withSpan("ArtifactsClient._listNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
270
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
271
|
+
});
|
|
369
272
|
}
|
|
370
273
|
}
|
|
371
274
|
// Operation Specifications
|