@azure/arm-locks 1.2.0 → 2.0.0-alpha.20211015.3
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 +26 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +63 -80
- package/dist/index.js +1796 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/esm/index.d.ts +534 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +13 -0
- package/esm/index.js.map +1 -0
- package/esm/managementLockClient.d.ts +9 -18
- package/esm/managementLockClient.d.ts.map +1 -1
- package/esm/managementLockClient.js +12 -28
- package/esm/managementLockClient.js.map +1 -1
- package/esm/managementLockClientContext.d.ts +10 -16
- package/esm/managementLockClientContext.d.ts.map +1 -1
- package/esm/managementLockClientContext.js +34 -46
- package/esm/managementLockClientContext.js.map +1 -1
- package/esm/models/index.d.ts +208 -445
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +9 -2
- package/esm/models/index.js.map +1 -1
- package/esm/models/mappers.d.ts +7 -9
- package/esm/models/mappers.d.ts.map +1 -1
- package/esm/models/mappers.js +69 -78
- package/esm/models/mappers.js.map +1 -1
- package/esm/models/parameters.d.ts +16 -13
- package/esm/models/parameters.d.ts.map +1 -1
- package/esm/models/parameters.js +78 -54
- package/esm/models/parameters.js.map +1 -1
- package/esm/operations/authorizationOperations.d.ts +27 -26
- package/esm/operations/authorizationOperations.d.ts.map +1 -1
- package/esm/operations/authorizationOperations.js +158 -50
- package/esm/operations/authorizationOperations.js.map +1 -1
- package/esm/operations/index.d.ts.map +1 -1
- package/esm/operations/index.js +3 -5
- package/esm/operations/index.js.map +1 -1
- package/esm/operations/managementLocks.d.ts +203 -393
- package/esm/operations/managementLocks.d.ts.map +1 -1
- package/esm/operations/managementLocks.js +993 -485
- package/esm/operations/managementLocks.js.map +1 -1
- package/esm/operationsInterfaces/authorizationOperations.d.ts +18 -0
- package/esm/operationsInterfaces/authorizationOperations.d.ts.map +1 -0
- package/esm/operationsInterfaces/authorizationOperations.js +9 -0
- package/esm/operationsInterfaces/authorizationOperations.js.map +1 -0
- package/esm/operationsInterfaces/index.d.ts +3 -0
- package/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/esm/operationsInterfaces/index.js +10 -0
- package/esm/operationsInterfaces/index.js.map +1 -0
- package/esm/operationsInterfaces/managementLocks.d.ts +198 -0
- package/esm/operationsInterfaces/managementLocks.d.ts.map +1 -0
- package/esm/operationsInterfaces/managementLocks.js +9 -0
- package/esm/operationsInterfaces/managementLocks.js.map +1 -0
- package/package.json +53 -16
- package/review/arm-locks.api.md +313 -0
- package/rollup.config.js +181 -30
- package/src/index.ts +13 -0
- package/src/managementLockClient.ts +23 -36
- package/src/managementLockClientContext.ts +47 -45
- package/src/models/index.ts +256 -470
- package/src/models/mappers.ts +72 -82
- package/src/models/parameters.ts +97 -55
- package/src/operations/authorizationOperations.ts +155 -70
- package/src/operations/index.ts +3 -5
- package/src/operations/managementLocks.ts +1165 -869
- package/src/operationsInterfaces/authorizationOperations.ts +36 -0
- package/src/operationsInterfaces/index.ts +10 -0
- package/src/operationsInterfaces/managementLocks.ts +332 -0
- package/tsconfig.json +3 -2
- package/dist/arm-locks.js +0 -1280
- package/dist/arm-locks.js.map +0 -1
- package/dist/arm-locks.min.js +0 -1
- package/dist/arm-locks.min.js.map +0 -1
- package/esm/models/authorizationOperationsMappers.d.ts +0 -2
- package/esm/models/authorizationOperationsMappers.d.ts.map +0 -1
- package/esm/models/authorizationOperationsMappers.js +0 -9
- package/esm/models/authorizationOperationsMappers.js.map +0 -1
- package/esm/models/managementLocksMappers.d.ts +0 -2
- package/esm/models/managementLocksMappers.d.ts.map +0 -1
- package/esm/models/managementLocksMappers.js +0 -9
- package/esm/models/managementLocksMappers.js.map +0 -1
- package/src/models/authorizationOperationsMappers.ts +0 -14
- package/src/models/managementLocksMappers.ts +0 -15
@@ -1,26 +1,36 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
3
|
-
* Licensed under the MIT License.
|
4
|
-
* license information.
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
5
4
|
*
|
6
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
8
|
-
* regenerated.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
9
7
|
*/
|
10
8
|
|
11
|
-
import
|
12
|
-
import
|
13
|
-
import
|
9
|
+
import "@azure/core-paging";
|
10
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
11
|
+
import { AuthorizationOperations } from "../operationsInterfaces";
|
12
|
+
import * as coreClient from "@azure/core-client";
|
13
|
+
import * as Mappers from "../models/mappers";
|
14
14
|
import * as Parameters from "../models/parameters";
|
15
15
|
import { ManagementLockClientContext } from "../managementLockClientContext";
|
16
|
+
import {
|
17
|
+
Operation,
|
18
|
+
AuthorizationOperationsListNextOptionalParams,
|
19
|
+
AuthorizationOperationsListOptionalParams,
|
20
|
+
AuthorizationOperationsListNextNextOptionalParams,
|
21
|
+
AuthorizationOperationsListResponse,
|
22
|
+
AuthorizationOperationsListNextResponse,
|
23
|
+
AuthorizationOperationsListNextNextResponse
|
24
|
+
} from "../models";
|
16
25
|
|
26
|
+
/// <reference lib="esnext.asynciterable" />
|
17
27
|
/** Class representing a AuthorizationOperations. */
|
18
|
-
export class AuthorizationOperations {
|
28
|
+
export class AuthorizationOperationsImpl implements AuthorizationOperations {
|
19
29
|
private readonly client: ManagementLockClientContext;
|
20
30
|
|
21
31
|
/**
|
22
|
-
*
|
23
|
-
* @param
|
32
|
+
* Initialize a new instance of the class AuthorizationOperations class.
|
33
|
+
* @param client Reference to the service client
|
24
34
|
*/
|
25
35
|
constructor(client: ManagementLockClientContext) {
|
26
36
|
this.client = client;
|
@@ -28,96 +38,171 @@ export class AuthorizationOperations {
|
|
28
38
|
|
29
39
|
/**
|
30
40
|
* Lists all of the available Microsoft.Authorization REST API operations.
|
31
|
-
* @param
|
32
|
-
* @returns Promise<Models.AuthorizationOperationsListResponse>
|
41
|
+
* @param options The options parameters.
|
33
42
|
*/
|
34
|
-
list(
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
43
|
+
public list(
|
44
|
+
options?: AuthorizationOperationsListOptionalParams
|
45
|
+
): PagedAsyncIterableIterator<Operation> {
|
46
|
+
const iter = this.listPagingAll(options);
|
47
|
+
return {
|
48
|
+
next() {
|
49
|
+
return iter.next();
|
50
|
+
},
|
51
|
+
[Symbol.asyncIterator]() {
|
52
|
+
return this;
|
53
|
+
},
|
54
|
+
byPage: () => {
|
55
|
+
return this.listPagingPage(options);
|
56
|
+
}
|
57
|
+
};
|
58
|
+
}
|
59
|
+
|
60
|
+
private async *listPagingPage(
|
61
|
+
options?: AuthorizationOperationsListOptionalParams
|
62
|
+
): AsyncIterableIterator<Operation[]> {
|
63
|
+
let result = await this._list(options);
|
64
|
+
yield result.value || [];
|
65
|
+
let continuationToken = result.nextLink;
|
66
|
+
while (continuationToken) {
|
67
|
+
result = await this._listNext(continuationToken, options);
|
68
|
+
continuationToken = result.nextLink;
|
69
|
+
yield result.value || [];
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
private async *listPagingAll(
|
74
|
+
options?: AuthorizationOperationsListOptionalParams
|
75
|
+
): AsyncIterableIterator<Operation> {
|
76
|
+
for await (const page of this.listPagingPage(options)) {
|
77
|
+
yield* page;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
39
81
|
/**
|
40
|
-
*
|
41
|
-
* @param
|
82
|
+
* ListNext
|
83
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
84
|
+
* @param options The options parameters.
|
42
85
|
*/
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
86
|
+
public listNext(
|
87
|
+
nextLink: string,
|
88
|
+
options?: AuthorizationOperationsListNextOptionalParams
|
89
|
+
): PagedAsyncIterableIterator<Operation> {
|
90
|
+
const iter = this.listNextPagingAll(nextLink, options);
|
91
|
+
return {
|
92
|
+
next() {
|
93
|
+
return iter.next();
|
48
94
|
},
|
49
|
-
|
50
|
-
|
95
|
+
[Symbol.asyncIterator]() {
|
96
|
+
return this;
|
97
|
+
},
|
98
|
+
byPage: () => {
|
99
|
+
return this.listNextPagingPage(nextLink, options);
|
100
|
+
}
|
101
|
+
};
|
102
|
+
}
|
103
|
+
|
104
|
+
private async *listNextPagingPage(
|
105
|
+
nextLink: string,
|
106
|
+
options?: AuthorizationOperationsListNextOptionalParams
|
107
|
+
): AsyncIterableIterator<Operation[]> {
|
108
|
+
let result = await this._listNext(nextLink, options);
|
109
|
+
yield result.value || [];
|
110
|
+
let continuationToken = result.nextLink;
|
111
|
+
while (continuationToken) {
|
112
|
+
result = await this._listNextNext(continuationToken, options);
|
113
|
+
continuationToken = result.nextLink;
|
114
|
+
yield result.value || [];
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
private async *listNextPagingAll(
|
119
|
+
nextLink: string,
|
120
|
+
options?: AuthorizationOperationsListNextOptionalParams
|
121
|
+
): AsyncIterableIterator<Operation> {
|
122
|
+
for await (const page of this.listNextPagingPage(nextLink, options)) {
|
123
|
+
yield* page;
|
124
|
+
}
|
51
125
|
}
|
52
126
|
|
53
127
|
/**
|
54
128
|
* Lists all of the available Microsoft.Authorization REST API operations.
|
55
|
-
* @param
|
56
|
-
* @param [options] The optional parameters
|
57
|
-
* @returns Promise<Models.AuthorizationOperationsListNextResponse>
|
129
|
+
* @param options The options parameters.
|
58
130
|
*/
|
59
|
-
|
131
|
+
private _list(
|
132
|
+
options?: AuthorizationOperationsListOptionalParams
|
133
|
+
): Promise<AuthorizationOperationsListResponse> {
|
134
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
135
|
+
}
|
136
|
+
|
60
137
|
/**
|
61
|
-
*
|
62
|
-
* @param
|
138
|
+
* ListNext
|
139
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
140
|
+
* @param options The options parameters.
|
63
141
|
*/
|
64
|
-
|
142
|
+
private _listNext(
|
143
|
+
nextLink: string,
|
144
|
+
options?: AuthorizationOperationsListNextOptionalParams
|
145
|
+
): Promise<AuthorizationOperationsListNextResponse> {
|
146
|
+
return this.client.sendOperationRequest(
|
147
|
+
{ nextLink, options },
|
148
|
+
listNextOperationSpec
|
149
|
+
);
|
150
|
+
}
|
151
|
+
|
65
152
|
/**
|
66
|
-
*
|
67
|
-
* @param
|
68
|
-
* @param
|
153
|
+
* ListNextNext
|
154
|
+
* @param nextLink The nextLink from the previous successful call to the ListNext method.
|
155
|
+
* @param options The options parameters.
|
69
156
|
*/
|
70
|
-
|
71
|
-
|
157
|
+
private _listNextNext(
|
158
|
+
nextLink: string,
|
159
|
+
options?: AuthorizationOperationsListNextNextOptionalParams
|
160
|
+
): Promise<AuthorizationOperationsListNextNextResponse> {
|
72
161
|
return this.client.sendOperationRequest(
|
73
|
-
{
|
74
|
-
|
75
|
-
|
76
|
-
},
|
77
|
-
listNextOperationSpec,
|
78
|
-
callback) as Promise<Models.AuthorizationOperationsListNextResponse>;
|
162
|
+
{ nextLink, options },
|
163
|
+
listNextNextOperationSpec
|
164
|
+
);
|
79
165
|
}
|
80
166
|
}
|
81
|
-
|
82
167
|
// Operation Specifications
|
83
|
-
const serializer =
|
84
|
-
|
168
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
169
|
+
|
170
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
171
|
+
path: "/providers/Microsoft.Authorization/operations",
|
85
172
|
httpMethod: "GET",
|
86
|
-
path: "providers/Microsoft.Authorization/operations",
|
87
|
-
queryParameters: [
|
88
|
-
Parameters.apiVersion
|
89
|
-
],
|
90
|
-
headerParameters: [
|
91
|
-
Parameters.acceptLanguage
|
92
|
-
],
|
93
173
|
responses: {
|
94
174
|
200: {
|
95
175
|
bodyMapper: Mappers.OperationListResult
|
96
|
-
},
|
97
|
-
default: {
|
98
|
-
bodyMapper: Mappers.CloudError
|
99
176
|
}
|
100
177
|
},
|
178
|
+
queryParameters: [Parameters.apiVersion],
|
179
|
+
urlParameters: [Parameters.$host],
|
180
|
+
headerParameters: [Parameters.accept],
|
101
181
|
serializer
|
102
182
|
};
|
103
|
-
|
104
|
-
|
183
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
184
|
+
path: "{nextLink}",
|
105
185
|
httpMethod: "GET",
|
106
|
-
|
186
|
+
responses: {
|
187
|
+
200: {
|
188
|
+
bodyMapper: Mappers.OperationListResult
|
189
|
+
}
|
190
|
+
},
|
191
|
+
queryParameters: [Parameters.apiVersion],
|
192
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
193
|
+
headerParameters: [Parameters.accept],
|
194
|
+
serializer
|
195
|
+
};
|
196
|
+
const listNextNextOperationSpec: coreClient.OperationSpec = {
|
107
197
|
path: "{nextLink}",
|
108
|
-
|
109
|
-
Parameters.nextPageLink
|
110
|
-
],
|
111
|
-
headerParameters: [
|
112
|
-
Parameters.acceptLanguage
|
113
|
-
],
|
198
|
+
httpMethod: "GET",
|
114
199
|
responses: {
|
115
200
|
200: {
|
116
201
|
bodyMapper: Mappers.OperationListResult
|
117
|
-
},
|
118
|
-
default: {
|
119
|
-
bodyMapper: Mappers.CloudError
|
120
202
|
}
|
121
203
|
},
|
204
|
+
queryParameters: [Parameters.apiVersion],
|
205
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
206
|
+
headerParameters: [Parameters.accept],
|
122
207
|
serializer
|
123
208
|
};
|
package/src/operations/index.ts
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
3
|
-
* Licensed under the MIT License.
|
4
|
-
* license information.
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
5
4
|
*
|
6
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
8
|
-
* regenerated.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
9
7
|
*/
|
10
8
|
|
11
9
|
export * from "./authorizationOperations";
|