@azure/arm-defendereasm 1.0.0-beta.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.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +2047 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/labelsCreateAndUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsCreateAndUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsCreateAndUpdateSample.js +40 -0
- package/dist-esm/samples-dev/labelsCreateAndUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsDeleteSample.js +40 -0
- package/dist-esm/samples-dev/labelsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.js +40 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.js +60 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsUpdateSample.js +40 -0
- package/dist-esm/samples-dev/labelsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +58 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.d.ts +2 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.js +40 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.js +43 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.js +39 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesGetSample.js +39 -0
- package/dist-esm/samples-dev/workspacesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js +59 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js +58 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.js +39 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.js.map +1 -0
- package/dist-esm/src/easmMgmtClient.d.ts +23 -0
- package/dist-esm/src/easmMgmtClient.d.ts.map +1 -0
- package/dist-esm/src/easmMgmtClient.js +103 -0
- package/dist-esm/src/easmMgmtClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +11 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +21 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +492 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +66 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +23 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +574 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +16 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +137 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +5 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +12 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/labels.d.ts +87 -0
- package/dist-esm/src/operations/labels.d.ts.map +1 -0
- package/dist-esm/src/operations/labels.js +395 -0
- package/dist-esm/src/operations/labels.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +138 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/tasks.d.ts +21 -0
- package/dist-esm/src/operations/tasks.d.ts.map +1 -0
- package/dist-esm/src/operations/tasks.js +55 -0
- package/dist-esm/src/operations/tasks.js.map +1 -0
- package/dist-esm/src/operations/workspaces.d.ts +96 -0
- package/dist-esm/src/operations/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operations/workspaces.js +496 -0
- package/dist-esm/src/operations/workspaces.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +12 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/labels.d.ts +62 -0
- package/dist-esm/src/operationsInterfaces/labels.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/labels.js +9 -0
- package/dist-esm/src/operationsInterfaces/labels.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/tasks.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/tasks.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/tasks.js +9 -0
- package/dist-esm/src/operationsInterfaces/tasks.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts +60 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspaces.js.map +1 -0
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/defendereasm_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/defendereasm_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/defendereasm_operations_test.spec.js +120 -0
- package/dist-esm/test/defendereasm_operations_test.spec.js.map +1 -0
- package/package.json +123 -0
- package/review/arm-defendereasm.api.md +400 -0
- package/rollup.config.js +122 -0
- package/src/easmMgmtClient.ts +151 -0
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +42 -0
- package/src/models/index.ts +562 -0
- package/src/models/mappers.ts +639 -0
- package/src/models/parameters.ts +161 -0
- package/src/operations/index.ts +12 -0
- package/src/operations/labels.ts +543 -0
- package/src/operations/operations.ts +149 -0
- package/src/operations/tasks.ts +75 -0
- package/src/operations/workspaces.ts +625 -0
- package/src/operationsInterfaces/index.ts +12 -0
- package/src/operationsInterfaces/labels.ts +120 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/tasks.ts +29 -0
- package/src/operationsInterfaces/workspaces.ts +114 -0
- package/src/pagingHelper.ts +39 -0
- package/tsconfig.json +33 -0
- package/types/arm-defendereasm.d.ts +724 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
+
import { Operations } from "../operationsInterfaces";
|
|
12
|
+
import * as coreClient from "@azure/core-client";
|
|
13
|
+
import * as Mappers from "../models/mappers";
|
|
14
|
+
import * as Parameters from "../models/parameters";
|
|
15
|
+
import { EasmMgmtClient } from "../easmMgmtClient";
|
|
16
|
+
import {
|
|
17
|
+
Operation,
|
|
18
|
+
OperationsListNextOptionalParams,
|
|
19
|
+
OperationsListOptionalParams,
|
|
20
|
+
OperationsListResponse,
|
|
21
|
+
OperationsListNextResponse
|
|
22
|
+
} from "../models";
|
|
23
|
+
|
|
24
|
+
/// <reference lib="esnext.asynciterable" />
|
|
25
|
+
/** Class containing Operations operations. */
|
|
26
|
+
export class OperationsImpl implements Operations {
|
|
27
|
+
private readonly client: EasmMgmtClient;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Initialize a new instance of the class Operations class.
|
|
31
|
+
* @param client Reference to the service client
|
|
32
|
+
*/
|
|
33
|
+
constructor(client: EasmMgmtClient) {
|
|
34
|
+
this.client = client;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Returns list of operations.
|
|
39
|
+
* @param options The options parameters.
|
|
40
|
+
*/
|
|
41
|
+
public list(
|
|
42
|
+
options?: OperationsListOptionalParams
|
|
43
|
+
): PagedAsyncIterableIterator<Operation> {
|
|
44
|
+
const iter = this.listPagingAll(options);
|
|
45
|
+
return {
|
|
46
|
+
next() {
|
|
47
|
+
return iter.next();
|
|
48
|
+
},
|
|
49
|
+
[Symbol.asyncIterator]() {
|
|
50
|
+
return this;
|
|
51
|
+
},
|
|
52
|
+
byPage: (settings?: PageSettings) => {
|
|
53
|
+
if (settings?.maxPageSize) {
|
|
54
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
55
|
+
}
|
|
56
|
+
return this.listPagingPage(options, settings);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
private async *listPagingPage(
|
|
62
|
+
options?: OperationsListOptionalParams,
|
|
63
|
+
settings?: PageSettings
|
|
64
|
+
): AsyncIterableIterator<Operation[]> {
|
|
65
|
+
let result: OperationsListResponse;
|
|
66
|
+
let continuationToken = settings?.continuationToken;
|
|
67
|
+
if (!continuationToken) {
|
|
68
|
+
result = await this._list(options);
|
|
69
|
+
let page = result.value || [];
|
|
70
|
+
continuationToken = result.nextLink;
|
|
71
|
+
setContinuationToken(page, continuationToken);
|
|
72
|
+
yield page;
|
|
73
|
+
}
|
|
74
|
+
while (continuationToken) {
|
|
75
|
+
result = await this._listNext(continuationToken, options);
|
|
76
|
+
continuationToken = result.nextLink;
|
|
77
|
+
let page = result.value || [];
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
private async *listPagingAll(
|
|
84
|
+
options?: OperationsListOptionalParams
|
|
85
|
+
): AsyncIterableIterator<Operation> {
|
|
86
|
+
for await (const page of this.listPagingPage(options)) {
|
|
87
|
+
yield* page;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Returns list of operations.
|
|
93
|
+
* @param options The options parameters.
|
|
94
|
+
*/
|
|
95
|
+
private _list(
|
|
96
|
+
options?: OperationsListOptionalParams
|
|
97
|
+
): Promise<OperationsListResponse> {
|
|
98
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* ListNext
|
|
103
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
104
|
+
* @param options The options parameters.
|
|
105
|
+
*/
|
|
106
|
+
private _listNext(
|
|
107
|
+
nextLink: string,
|
|
108
|
+
options?: OperationsListNextOptionalParams
|
|
109
|
+
): Promise<OperationsListNextResponse> {
|
|
110
|
+
return this.client.sendOperationRequest(
|
|
111
|
+
{ nextLink, options },
|
|
112
|
+
listNextOperationSpec
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// Operation Specifications
|
|
117
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
118
|
+
|
|
119
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
120
|
+
path: "/providers/Microsoft.Easm/operations",
|
|
121
|
+
httpMethod: "GET",
|
|
122
|
+
responses: {
|
|
123
|
+
200: {
|
|
124
|
+
bodyMapper: Mappers.OperationListResult
|
|
125
|
+
},
|
|
126
|
+
default: {
|
|
127
|
+
bodyMapper: Mappers.ErrorResponse
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
queryParameters: [Parameters.apiVersion],
|
|
131
|
+
urlParameters: [Parameters.$host],
|
|
132
|
+
headerParameters: [Parameters.accept],
|
|
133
|
+
serializer
|
|
134
|
+
};
|
|
135
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
136
|
+
path: "{nextLink}",
|
|
137
|
+
httpMethod: "GET",
|
|
138
|
+
responses: {
|
|
139
|
+
200: {
|
|
140
|
+
bodyMapper: Mappers.OperationListResult
|
|
141
|
+
},
|
|
142
|
+
default: {
|
|
143
|
+
bodyMapper: Mappers.ErrorResponse
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
147
|
+
headerParameters: [Parameters.accept],
|
|
148
|
+
serializer
|
|
149
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { Tasks } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
13
|
+
import { EasmMgmtClient } from "../easmMgmtClient";
|
|
14
|
+
import {
|
|
15
|
+
TasksGetByWorkspaceOptionalParams,
|
|
16
|
+
TasksGetByWorkspaceResponse
|
|
17
|
+
} from "../models";
|
|
18
|
+
|
|
19
|
+
/** Class containing Tasks operations. */
|
|
20
|
+
export class TasksImpl implements Tasks {
|
|
21
|
+
private readonly client: EasmMgmtClient;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Initialize a new instance of the class Tasks class.
|
|
25
|
+
* @param client Reference to the service client
|
|
26
|
+
*/
|
|
27
|
+
constructor(client: EasmMgmtClient) {
|
|
28
|
+
this.client = client;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Returns a task in the given workspace.
|
|
33
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
34
|
+
* @param workspaceName The name of the Workspace.
|
|
35
|
+
* @param taskId The id of the Task.
|
|
36
|
+
* @param options The options parameters.
|
|
37
|
+
*/
|
|
38
|
+
getByWorkspace(
|
|
39
|
+
resourceGroupName: string,
|
|
40
|
+
workspaceName: string,
|
|
41
|
+
taskId: string,
|
|
42
|
+
options?: TasksGetByWorkspaceOptionalParams
|
|
43
|
+
): Promise<TasksGetByWorkspaceResponse> {
|
|
44
|
+
return this.client.sendOperationRequest(
|
|
45
|
+
{ resourceGroupName, workspaceName, taskId, options },
|
|
46
|
+
getByWorkspaceOperationSpec
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// Operation Specifications
|
|
51
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
52
|
+
|
|
53
|
+
const getByWorkspaceOperationSpec: coreClient.OperationSpec = {
|
|
54
|
+
path:
|
|
55
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Easm/workspaces/{workspaceName}/tasks/{taskId}",
|
|
56
|
+
httpMethod: "GET",
|
|
57
|
+
responses: {
|
|
58
|
+
200: {
|
|
59
|
+
bodyMapper: Mappers.TaskResource
|
|
60
|
+
},
|
|
61
|
+
default: {
|
|
62
|
+
bodyMapper: Mappers.ErrorResponse
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
queryParameters: [Parameters.apiVersion],
|
|
66
|
+
urlParameters: [
|
|
67
|
+
Parameters.$host,
|
|
68
|
+
Parameters.subscriptionId,
|
|
69
|
+
Parameters.resourceGroupName,
|
|
70
|
+
Parameters.workspaceName,
|
|
71
|
+
Parameters.taskId
|
|
72
|
+
],
|
|
73
|
+
headerParameters: [Parameters.accept],
|
|
74
|
+
serializer
|
|
75
|
+
};
|