@azure/arm-managedapplications 2.0.0-beta.1 → 2.0.1-alpha.20220105.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 +15 -10
- package/README.md +15 -9
- package/dist/index.js +145 -929
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/{esm → dist-esm/src}/applicationClient.d.ts +7 -19
- package/dist-esm/src/applicationClient.d.ts.map +1 -0
- package/{esm → dist-esm/src}/applicationClient.js +31 -74
- package/dist-esm/src/applicationClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/index.js +0 -1
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/{esm → dist-esm/src}/models/index.d.ts +39 -59
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/index.js +0 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.d.ts +2 -2
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +34 -34
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/{esm → dist-esm/src}/models/parameters.d.ts +0 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/parameters.js +0 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/{esm → dist-esm/src}/operations/applicationDefinitions.d.ts +4 -22
- package/dist-esm/src/operations/applicationDefinitions.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/applicationDefinitions.js +23 -93
- package/dist-esm/src/operations/applicationDefinitions.js.map +1 -0
- package/{esm → dist-esm/src}/operations/applications.d.ts +4 -36
- package/dist-esm/src/operations/applications.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/applications.js +23 -170
- package/dist-esm/src/operations/applications.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +0 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/applicationDefinitions.d.ts +1 -9
- package/dist-esm/src/operationsInterfaces/applicationDefinitions.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/applicationDefinitions.js +1 -1
- package/dist-esm/src/operationsInterfaces/applicationDefinitions.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/applications.d.ts +1 -15
- package/dist-esm/src/operationsInterfaces/applications.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/applications.js +1 -1
- package/dist-esm/src/operationsInterfaces/applications.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/index.d.ts +0 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/index.js +0 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +24 -20
- package/review/arm-managedapplications.api.md +20 -58
- package/src/applicationClient.ts +56 -94
- package/src/index.ts +0 -1
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +37 -65
- package/src/models/mappers.ts +34 -34
- package/src/operations/applicationDefinitions.ts +27 -128
- package/src/operations/applications.ts +27 -217
- package/src/operationsInterfaces/applicationDefinitions.ts +0 -13
- package/src/operationsInterfaces/applications.ts +0 -23
- package/tsconfig.json +2 -3
- package/{esm/index.d.ts → types/arm-managedapplications.d.ts} +19 -91
- package/types/tsdoc-metadata.json +11 -0
- package/esm/applicationClient.d.ts.map +0 -1
- package/esm/applicationClient.js.map +0 -1
- package/esm/applicationClientContext.d.ts +0 -16
- package/esm/applicationClientContext.d.ts.map +0 -1
- package/esm/applicationClientContext.js +0 -49
- package/esm/applicationClientContext.js.map +0 -1
- package/esm/coreClientLro.d.ts +0 -26
- package/esm/coreClientLro.d.ts.map +0 -1
- package/esm/coreClientLro.js +0 -186
- package/esm/coreClientLro.js.map +0 -1
- package/esm/index.d.ts.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/lro/azureAsyncPolling.d.ts +0 -3
- package/esm/lro/azureAsyncPolling.d.ts.map +0 -1
- package/esm/lro/azureAsyncPolling.js +0 -67
- package/esm/lro/azureAsyncPolling.js.map +0 -1
- package/esm/lro/bodyPolling.d.ts +0 -8
- package/esm/lro/bodyPolling.d.ts.map +0 -1
- package/esm/lro/bodyPolling.js +0 -37
- package/esm/lro/bodyPolling.js.map +0 -1
- package/esm/lro/index.d.ts +0 -4
- package/esm/lro/index.d.ts.map +0 -1
- package/esm/lro/index.js +0 -12
- package/esm/lro/index.js.map +0 -1
- package/esm/lro/locationPolling.d.ts +0 -3
- package/esm/lro/locationPolling.d.ts.map +0 -1
- package/esm/lro/locationPolling.js +0 -19
- package/esm/lro/locationPolling.js.map +0 -1
- package/esm/lro/lroEngine.d.ts +0 -14
- package/esm/lro/lroEngine.d.ts.map +0 -1
- package/esm/lro/lroEngine.js +0 -41
- package/esm/lro/lroEngine.js.map +0 -1
- package/esm/lro/models.d.ts +0 -138
- package/esm/lro/models.d.ts.map +0 -1
- package/esm/lro/models.js +0 -14
- package/esm/lro/models.js.map +0 -1
- package/esm/lro/operation.d.ts +0 -36
- package/esm/lro/operation.d.ts.map +0 -1
- package/esm/lro/operation.js +0 -82
- package/esm/lro/operation.js.map +0 -1
- package/esm/lro/passthrough.d.ts +0 -3
- package/esm/lro/passthrough.d.ts.map +0 -1
- package/esm/lro/passthrough.js +0 -15
- package/esm/lro/passthrough.js.map +0 -1
- package/esm/lro/requestUtils.d.ts +0 -16
- package/esm/lro/requestUtils.d.ts.map +0 -1
- package/esm/lro/requestUtils.js +0 -73
- package/esm/lro/requestUtils.js.map +0 -1
- package/esm/lro/stateMachine.d.ts +0 -18
- package/esm/lro/stateMachine.d.ts.map +0 -1
- package/esm/lro/stateMachine.js +0 -84
- package/esm/lro/stateMachine.js.map +0 -1
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js.map +0 -1
- package/esm/operations/applicationDefinitions.d.ts.map +0 -1
- package/esm/operations/applicationDefinitions.js.map +0 -1
- package/esm/operations/applications.d.ts.map +0 -1
- package/esm/operations/applications.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operationsInterfaces/applicationDefinitions.d.ts.map +0 -1
- package/esm/operationsInterfaces/applicationDefinitions.js.map +0 -1
- package/esm/operationsInterfaces/applications.d.ts.map +0 -1
- package/esm/operationsInterfaces/applications.js.map +0 -1
- package/esm/operationsInterfaces/index.d.ts.map +0 -1
- package/esm/operationsInterfaces/index.js.map +0 -1
- package/src/applicationClientContext.ts +0 -70
- package/src/coreClientLro.ts +0 -323
- package/src/lro/azureAsyncPolling.ts +0 -96
- package/src/lro/bodyPolling.ts +0 -54
- package/src/lro/index.ts +0 -26
- package/src/lro/locationPolling.ts +0 -30
- package/src/lro/lroEngine.ts +0 -61
- package/src/lro/models.ts +0 -173
- package/src/lro/operation.ts +0 -120
- package/src/lro/passthrough.ts +0 -23
- package/src/lro/requestUtils.ts +0 -105
- package/src/lro/stateMachine.ts +0 -138
package/dist/index.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var coreClient = require('@azure/core-client');
|
|
7
|
-
require('@azure/core-paging');
|
|
8
7
|
var coreLro = require('@azure/core-lro');
|
|
9
8
|
|
|
10
9
|
/*
|
|
@@ -108,43 +107,43 @@ const OperationDisplay = {
|
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
};
|
|
111
|
-
const
|
|
110
|
+
const Plan = {
|
|
112
111
|
type: {
|
|
113
112
|
name: "Composite",
|
|
114
|
-
className: "
|
|
113
|
+
className: "Plan",
|
|
115
114
|
modelProperties: {
|
|
116
|
-
|
|
117
|
-
serializedName: "
|
|
118
|
-
|
|
115
|
+
name: {
|
|
116
|
+
serializedName: "name",
|
|
117
|
+
required: true,
|
|
119
118
|
type: {
|
|
120
119
|
name: "String"
|
|
121
120
|
}
|
|
122
121
|
},
|
|
123
|
-
|
|
124
|
-
serializedName: "
|
|
125
|
-
|
|
122
|
+
publisher: {
|
|
123
|
+
serializedName: "publisher",
|
|
124
|
+
required: true,
|
|
126
125
|
type: {
|
|
127
126
|
name: "String"
|
|
128
127
|
}
|
|
129
128
|
},
|
|
130
|
-
|
|
131
|
-
serializedName: "
|
|
132
|
-
|
|
129
|
+
product: {
|
|
130
|
+
serializedName: "product",
|
|
131
|
+
required: true,
|
|
133
132
|
type: {
|
|
134
133
|
name: "String"
|
|
135
134
|
}
|
|
136
135
|
},
|
|
137
|
-
|
|
138
|
-
serializedName: "
|
|
136
|
+
promotionCode: {
|
|
137
|
+
serializedName: "promotionCode",
|
|
139
138
|
type: {
|
|
140
139
|
name: "String"
|
|
141
140
|
}
|
|
142
141
|
},
|
|
143
|
-
|
|
144
|
-
serializedName: "
|
|
142
|
+
version: {
|
|
143
|
+
serializedName: "version",
|
|
144
|
+
required: true,
|
|
145
145
|
type: {
|
|
146
|
-
name: "
|
|
147
|
-
value: { type: { name: "String" } }
|
|
146
|
+
name: "String"
|
|
148
147
|
}
|
|
149
148
|
}
|
|
150
149
|
}
|
|
@@ -225,43 +224,43 @@ const Identity = {
|
|
|
225
224
|
}
|
|
226
225
|
}
|
|
227
226
|
};
|
|
228
|
-
const
|
|
227
|
+
const Resource = {
|
|
229
228
|
type: {
|
|
230
229
|
name: "Composite",
|
|
231
|
-
className: "
|
|
230
|
+
className: "Resource",
|
|
232
231
|
modelProperties: {
|
|
233
|
-
|
|
234
|
-
serializedName: "
|
|
235
|
-
|
|
232
|
+
id: {
|
|
233
|
+
serializedName: "id",
|
|
234
|
+
readOnly: true,
|
|
236
235
|
type: {
|
|
237
236
|
name: "String"
|
|
238
237
|
}
|
|
239
238
|
},
|
|
240
|
-
|
|
241
|
-
serializedName: "
|
|
242
|
-
|
|
239
|
+
name: {
|
|
240
|
+
serializedName: "name",
|
|
241
|
+
readOnly: true,
|
|
243
242
|
type: {
|
|
244
243
|
name: "String"
|
|
245
244
|
}
|
|
246
245
|
},
|
|
247
|
-
|
|
248
|
-
serializedName: "
|
|
249
|
-
|
|
246
|
+
type: {
|
|
247
|
+
serializedName: "type",
|
|
248
|
+
readOnly: true,
|
|
250
249
|
type: {
|
|
251
250
|
name: "String"
|
|
252
251
|
}
|
|
253
252
|
},
|
|
254
|
-
|
|
255
|
-
serializedName: "
|
|
253
|
+
location: {
|
|
254
|
+
serializedName: "location",
|
|
256
255
|
type: {
|
|
257
256
|
name: "String"
|
|
258
257
|
}
|
|
259
258
|
},
|
|
260
|
-
|
|
261
|
-
serializedName: "
|
|
262
|
-
required: true,
|
|
259
|
+
tags: {
|
|
260
|
+
serializedName: "tags",
|
|
263
261
|
type: {
|
|
264
|
-
name: "
|
|
262
|
+
name: "Dictionary",
|
|
263
|
+
value: { type: { name: "String" } }
|
|
265
264
|
}
|
|
266
265
|
}
|
|
267
266
|
}
|
|
@@ -633,10 +632,10 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
633
632
|
OperationListResult: OperationListResult,
|
|
634
633
|
Operation: Operation,
|
|
635
634
|
OperationDisplay: OperationDisplay,
|
|
636
|
-
|
|
635
|
+
Plan: Plan,
|
|
637
636
|
Sku: Sku,
|
|
638
637
|
Identity: Identity,
|
|
639
|
-
|
|
638
|
+
Resource: Resource,
|
|
640
639
|
ErrorResponse: ErrorResponse,
|
|
641
640
|
PlanPatchable: PlanPatchable,
|
|
642
641
|
ApplicationProviderAuthorization: ApplicationProviderAuthorization,
|
|
@@ -799,627 +798,51 @@ const parameters3 = {
|
|
|
799
798
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
800
799
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
801
800
|
*/
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
return rawResponse.headers["azure-asyncoperation"];
|
|
820
|
-
}
|
|
821
|
-
function inferLroMode(requestPath, requestMethod, rawResponse) {
|
|
822
|
-
if (getAzureAsyncOperation(rawResponse) !== undefined) {
|
|
823
|
-
return {
|
|
824
|
-
mode: "AzureAsync",
|
|
825
|
-
resourceLocation: requestMethod === "PUT"
|
|
826
|
-
? requestPath
|
|
827
|
-
: requestMethod === "POST"
|
|
828
|
-
? getLocation(rawResponse)
|
|
829
|
-
: undefined
|
|
830
|
-
};
|
|
831
|
-
}
|
|
832
|
-
else if (getLocation(rawResponse) !== undefined ||
|
|
833
|
-
getOperationLocation(rawResponse) !== undefined) {
|
|
834
|
-
return {
|
|
835
|
-
mode: "Location"
|
|
836
|
-
};
|
|
837
|
-
}
|
|
838
|
-
else if (["PUT", "PATCH"].includes(requestMethod)) {
|
|
839
|
-
return {
|
|
840
|
-
mode: "Body"
|
|
841
|
-
};
|
|
842
|
-
}
|
|
843
|
-
return {};
|
|
844
|
-
}
|
|
845
|
-
class RestError extends Error {
|
|
846
|
-
constructor(message, statusCode) {
|
|
847
|
-
super(message);
|
|
848
|
-
this.name = "RestError";
|
|
849
|
-
this.statusCode = statusCode;
|
|
850
|
-
Object.setPrototypeOf(this, RestError.prototype);
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
function isUnexpectedInitialResponse(rawResponse) {
|
|
854
|
-
const code = rawResponse.statusCode;
|
|
855
|
-
if (![203, 204, 202, 201, 200, 500].includes(code)) {
|
|
856
|
-
throw new RestError(`Received unexpected HTTP status code ${code} in the initial response. This may indicate a server issue.`, code);
|
|
857
|
-
}
|
|
858
|
-
return false;
|
|
859
|
-
}
|
|
860
|
-
function isUnexpectedPollingResponse(rawResponse) {
|
|
861
|
-
const code = rawResponse.statusCode;
|
|
862
|
-
if (![202, 201, 200, 500].includes(code)) {
|
|
863
|
-
throw new RestError(`Received unexpected HTTP status code ${code} while polling. This may indicate a server issue.`, code);
|
|
864
|
-
}
|
|
865
|
-
return false;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
/*
|
|
869
|
-
* Copyright (c) Microsoft Corporation.
|
|
870
|
-
* Licensed under the MIT License.
|
|
871
|
-
*
|
|
872
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
873
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
874
|
-
*/
|
|
875
|
-
const successStates = ["succeeded"];
|
|
876
|
-
const failureStates = ["failed", "canceled", "cancelled"];
|
|
877
|
-
|
|
878
|
-
/*
|
|
879
|
-
* Copyright (c) Microsoft Corporation.
|
|
880
|
-
* Licensed under the MIT License.
|
|
881
|
-
*
|
|
882
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
883
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
884
|
-
*/
|
|
885
|
-
function getResponseStatus(rawResponse) {
|
|
886
|
-
var _a, _b;
|
|
887
|
-
const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
|
|
888
|
-
return (_b = status === null || status === void 0 ? void 0 : status.toLowerCase()) !== null && _b !== void 0 ? _b : "succeeded";
|
|
889
|
-
}
|
|
890
|
-
function isAzureAsyncPollingDone(rawResponse) {
|
|
891
|
-
const state = getResponseStatus(rawResponse);
|
|
892
|
-
if (isUnexpectedPollingResponse(rawResponse) ||
|
|
893
|
-
failureStates.includes(state)) {
|
|
894
|
-
throw new Error(`Operation status: ${state}`);
|
|
895
|
-
}
|
|
896
|
-
return successStates.includes(state);
|
|
897
|
-
}
|
|
898
|
-
function sendFinalRequest(lro, lroResourceLocationConfig, resourceLocation) {
|
|
899
|
-
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
900
|
-
switch (lroResourceLocationConfig) {
|
|
901
|
-
case "original-uri":
|
|
902
|
-
return lro.retrieveAzureAsyncResource();
|
|
903
|
-
case "azure-async-operation":
|
|
904
|
-
return Promise.resolve(undefined);
|
|
905
|
-
case "location":
|
|
906
|
-
default:
|
|
907
|
-
return lro.retrieveAzureAsyncResource(resourceLocation);
|
|
908
|
-
}
|
|
909
|
-
});
|
|
910
|
-
}
|
|
911
|
-
function processAzureAsyncOperationResult(lro, resourceLocation, lroResourceLocationConfig) {
|
|
912
|
-
return (rawResponse, flatResponse) => {
|
|
913
|
-
if (isAzureAsyncPollingDone(rawResponse)) {
|
|
914
|
-
if (resourceLocation === undefined) {
|
|
915
|
-
return { rawResponse, flatResponse, done: true };
|
|
916
|
-
}
|
|
917
|
-
else {
|
|
918
|
-
return {
|
|
919
|
-
rawResponse,
|
|
920
|
-
flatResponse,
|
|
921
|
-
done: false,
|
|
922
|
-
next: () => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
923
|
-
const finalResponse = yield sendFinalRequest(lro, lroResourceLocationConfig, resourceLocation);
|
|
924
|
-
return Object.assign(Object.assign({}, (finalResponse !== null && finalResponse !== void 0 ? finalResponse : {
|
|
925
|
-
rawResponse,
|
|
926
|
-
flatResponse
|
|
927
|
-
})), { done: true });
|
|
928
|
-
})
|
|
929
|
-
};
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
return {
|
|
933
|
-
rawResponse,
|
|
934
|
-
flatResponse,
|
|
935
|
-
done: false
|
|
936
|
-
};
|
|
937
|
-
};
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
/*
|
|
941
|
-
* Copyright (c) Microsoft Corporation.
|
|
942
|
-
* Licensed under the MIT License.
|
|
943
|
-
*
|
|
944
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
945
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
946
|
-
*/
|
|
947
|
-
function getProvisioningState(rawResponse) {
|
|
948
|
-
var _a, _b, _c;
|
|
949
|
-
const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
|
|
950
|
-
const state = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState;
|
|
951
|
-
return (_c = state === null || state === void 0 ? void 0 : state.toLowerCase()) !== null && _c !== void 0 ? _c : "succeeded";
|
|
952
|
-
}
|
|
953
|
-
function isBodyPollingDone(rawResponse) {
|
|
954
|
-
const state = getProvisioningState(rawResponse);
|
|
955
|
-
if (isUnexpectedPollingResponse(rawResponse) ||
|
|
956
|
-
failureStates.includes(state)) {
|
|
957
|
-
throw new Error(`The long running operation has failed. The provisioning state: ${state}.`);
|
|
958
|
-
}
|
|
959
|
-
return successStates.includes(state);
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
* Creates a polling strategy based on BodyPolling which uses the provisioning state
|
|
963
|
-
* from the result to determine the current operation state
|
|
964
|
-
*/
|
|
965
|
-
function processBodyPollingOperationResult(rawResponse, flatResponse) {
|
|
966
|
-
return {
|
|
967
|
-
rawResponse,
|
|
968
|
-
flatResponse,
|
|
969
|
-
done: isBodyPollingDone(rawResponse)
|
|
970
|
-
};
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
/*
|
|
974
|
-
* Copyright (c) Microsoft Corporation.
|
|
975
|
-
* Licensed under the MIT License.
|
|
976
|
-
*
|
|
977
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
978
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
979
|
-
*/
|
|
980
|
-
function isLocationPollingDone(rawResponse) {
|
|
981
|
-
return (!isUnexpectedPollingResponse(rawResponse) && rawResponse.statusCode !== 202);
|
|
982
|
-
}
|
|
983
|
-
function processLocationPollingOperationResult(rawResponse, flatResponse) {
|
|
984
|
-
return {
|
|
985
|
-
rawResponse,
|
|
986
|
-
flatResponse,
|
|
987
|
-
done: isLocationPollingDone(rawResponse)
|
|
988
|
-
};
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
/*
|
|
992
|
-
* Copyright (c) Microsoft Corporation.
|
|
993
|
-
* Licensed under the MIT License.
|
|
994
|
-
*
|
|
995
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
996
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
997
|
-
*/
|
|
998
|
-
function processPassthroughOperationResult(rawResponse, flatResponse) {
|
|
999
|
-
return {
|
|
1000
|
-
rawResponse,
|
|
1001
|
-
flatResponse,
|
|
1002
|
-
done: true
|
|
1003
|
-
};
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
/*
|
|
1007
|
-
* Copyright (c) Microsoft Corporation.
|
|
1008
|
-
* Licensed under the MIT License.
|
|
1009
|
-
*
|
|
1010
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1011
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1012
|
-
*/
|
|
1013
|
-
/**
|
|
1014
|
-
* creates a stepping function that maps an LRO state to another.
|
|
1015
|
-
*/
|
|
1016
|
-
function createGetLroStatusFromResponse(lroPrimitives, config, lroResourceLocationConfig) {
|
|
1017
|
-
switch (config.mode) {
|
|
1018
|
-
case "AzureAsync": {
|
|
1019
|
-
return processAzureAsyncOperationResult(lroPrimitives, config.resourceLocation, lroResourceLocationConfig);
|
|
1020
|
-
}
|
|
1021
|
-
case "Location": {
|
|
1022
|
-
return processLocationPollingOperationResult;
|
|
1023
|
-
}
|
|
1024
|
-
case "Body": {
|
|
1025
|
-
return processBodyPollingOperationResult;
|
|
1026
|
-
}
|
|
1027
|
-
default: {
|
|
1028
|
-
return processPassthroughOperationResult;
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
/**
|
|
1033
|
-
* Creates a polling operation that returns a LRO state.
|
|
1034
|
-
*/
|
|
1035
|
-
function createPollForLROStatus(lroPrimitives, config) {
|
|
1036
|
-
return (path, pollerConfig) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1037
|
-
const response = yield lroPrimitives.sendPollRequest(config, path);
|
|
1038
|
-
const retryAfter = response.rawResponse.headers["retry-after"];
|
|
1039
|
-
if (retryAfter !== undefined) {
|
|
1040
|
-
const retryAfterInMs = parseInt(retryAfter);
|
|
1041
|
-
pollerConfig.intervalInMs = isNaN(retryAfterInMs)
|
|
1042
|
-
? calculatePollingIntervalFromDate(new Date(retryAfter), pollerConfig.intervalInMs)
|
|
1043
|
-
: retryAfterInMs;
|
|
1044
|
-
}
|
|
1045
|
-
return response;
|
|
1046
|
-
});
|
|
1047
|
-
}
|
|
1048
|
-
function calculatePollingIntervalFromDate(retryAfterDate, defaultIntervalInMs) {
|
|
1049
|
-
const timeNow = Math.floor(new Date().getTime());
|
|
1050
|
-
const retryAfterTime = retryAfterDate.getTime();
|
|
1051
|
-
if (timeNow < retryAfterTime) {
|
|
1052
|
-
return retryAfterTime - timeNow;
|
|
1053
|
-
}
|
|
1054
|
-
return defaultIntervalInMs;
|
|
1055
|
-
}
|
|
1056
|
-
/**
|
|
1057
|
-
* Creates a callback to be used to initialize the polling operation state.
|
|
1058
|
-
* @param state - of the polling operation
|
|
1059
|
-
* @param operationSpec - of the LRO
|
|
1060
|
-
* @param callback - callback to be called when the operation is done
|
|
1061
|
-
* @returns callback that initializes the state of the polling operation
|
|
1062
|
-
*/
|
|
1063
|
-
function createInitializeState(state, requestPath, requestMethod) {
|
|
1064
|
-
return (rawResponse, flatResponse) => {
|
|
1065
|
-
if (isUnexpectedInitialResponse(rawResponse))
|
|
1066
|
-
;
|
|
1067
|
-
state.initialRawResponse = rawResponse;
|
|
1068
|
-
state.isStarted = true;
|
|
1069
|
-
state.pollingURL = getPollingUrl(state.initialRawResponse, requestPath);
|
|
1070
|
-
state.config = inferLroMode(requestPath, requestMethod, state.initialRawResponse);
|
|
1071
|
-
/** short circuit polling if body polling is done in the initial request */
|
|
1072
|
-
if (state.config.mode === undefined ||
|
|
1073
|
-
(state.config.mode === "Body" &&
|
|
1074
|
-
isBodyPollingDone(state.initialRawResponse))) {
|
|
1075
|
-
state.result = flatResponse;
|
|
1076
|
-
state.isCompleted = true;
|
|
1077
|
-
}
|
|
1078
|
-
return Boolean(state.isCompleted);
|
|
1079
|
-
};
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
/*
|
|
1083
|
-
* Copyright (c) Microsoft Corporation.
|
|
1084
|
-
* Licensed under the MIT License.
|
|
1085
|
-
*
|
|
1086
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1087
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1088
|
-
*/
|
|
1089
|
-
class GenericPollOperation {
|
|
1090
|
-
constructor(state, lro) {
|
|
1091
|
-
this.state = state;
|
|
1092
|
-
this.lro = lro;
|
|
1093
|
-
}
|
|
1094
|
-
setPollerConfig(pollerConfig) {
|
|
1095
|
-
this.pollerConfig = pollerConfig;
|
|
1096
|
-
}
|
|
1097
|
-
/**
|
|
1098
|
-
* General update function for LROPoller, the general process is as follows
|
|
1099
|
-
* 1. Check initial operation result to determine the strategy to use
|
|
1100
|
-
* - Strategies: Location, Azure-AsyncOperation, Original Uri
|
|
1101
|
-
* 2. Check if the operation result has a terminal state
|
|
1102
|
-
* - Terminal state will be determined by each strategy
|
|
1103
|
-
* 2.1 If it is terminal state Check if a final GET request is required, if so
|
|
1104
|
-
* send final GET request and return result from operation. If no final GET
|
|
1105
|
-
* is required, just return the result from operation.
|
|
1106
|
-
* - Determining what to call for final request is responsibility of each strategy
|
|
1107
|
-
* 2.2 If it is not terminal state, call the polling operation and go to step 1
|
|
1108
|
-
* - Determining what to call for polling is responsibility of each strategy
|
|
1109
|
-
* - Strategies will always use the latest URI for polling if provided otherwise
|
|
1110
|
-
* the last known one
|
|
1111
|
-
*/
|
|
1112
|
-
update(options) {
|
|
1113
|
-
var _a, _b;
|
|
1114
|
-
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1115
|
-
const state = this.state;
|
|
1116
|
-
if (!state.isStarted) {
|
|
1117
|
-
const initializeState = createInitializeState(state, this.lro.requestPath, this.lro.requestMethod);
|
|
1118
|
-
yield this.lro.sendInitialRequest(initializeState);
|
|
1119
|
-
}
|
|
1120
|
-
if (!state.isCompleted) {
|
|
1121
|
-
if (this.getLROStatusFromResponse === undefined) {
|
|
1122
|
-
if (state.config === undefined) {
|
|
1123
|
-
throw new Error("Bad state: LRO mode is undefined. Please check if the serialized state is well-formed.");
|
|
1124
|
-
}
|
|
1125
|
-
this.getLROStatusFromResponse = createPollForLROStatus(this.lro, state.config);
|
|
1126
|
-
}
|
|
1127
|
-
if (state.pollingURL === undefined) {
|
|
1128
|
-
throw new Error("Bad state: polling URL is undefined. Please check if the serialized state is well-formed.");
|
|
1129
|
-
}
|
|
1130
|
-
const currentState = yield this.getLROStatusFromResponse(state.pollingURL, this.pollerConfig);
|
|
1131
|
-
if (currentState.done) {
|
|
1132
|
-
state.result = currentState.flatResponse;
|
|
1133
|
-
state.isCompleted = true;
|
|
1134
|
-
}
|
|
1135
|
-
else {
|
|
1136
|
-
this.getLROStatusFromResponse =
|
|
1137
|
-
(_a = currentState.next) !== null && _a !== void 0 ? _a : this.getLROStatusFromResponse;
|
|
1138
|
-
state.pollingURL = getPollingUrl(currentState.rawResponse, state.pollingURL);
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
(_b = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _b === void 0 ? void 0 : _b.call(options, state);
|
|
1142
|
-
return this;
|
|
1143
|
-
});
|
|
1144
|
-
}
|
|
1145
|
-
cancel() {
|
|
1146
|
-
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1147
|
-
this.state.isCancelled = true;
|
|
1148
|
-
return this;
|
|
1149
|
-
});
|
|
1150
|
-
}
|
|
1151
|
-
/**
|
|
1152
|
-
* Serializes the Poller operation.
|
|
1153
|
-
*/
|
|
1154
|
-
toString() {
|
|
1155
|
-
return JSON.stringify({
|
|
1156
|
-
state: this.state
|
|
1157
|
-
});
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
/*
|
|
1162
|
-
* Copyright (c) Microsoft Corporation.
|
|
1163
|
-
* Licensed under the MIT License.
|
|
1164
|
-
*
|
|
1165
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1166
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1167
|
-
*/
|
|
1168
|
-
/**
|
|
1169
|
-
* The LRO Engine, a class that performs polling.
|
|
1170
|
-
*/
|
|
1171
|
-
class LroEngine extends coreLro.Poller {
|
|
1172
|
-
constructor(lro, options) {
|
|
1173
|
-
const { intervalInMs = 2000, resumeFrom } = options || {};
|
|
1174
|
-
function deserializeState(resumeFrom) {
|
|
1175
|
-
try {
|
|
1176
|
-
return JSON.parse(resumeFrom).state;
|
|
1177
|
-
}
|
|
1178
|
-
catch (e) {
|
|
1179
|
-
throw new Error(`LroEngine: Unable to deserialize state: ${resumeFrom}`);
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
const state = resumeFrom
|
|
1183
|
-
? deserializeState(resumeFrom)
|
|
1184
|
-
: {};
|
|
1185
|
-
const operation = new GenericPollOperation(state, lro);
|
|
1186
|
-
super(operation);
|
|
1187
|
-
this.intervalInMs = intervalInMs;
|
|
1188
|
-
operation.setPollerConfig(this);
|
|
1189
|
-
}
|
|
1190
|
-
/**
|
|
1191
|
-
* The method used by the poller to wait before attempting to update its operation.
|
|
1192
|
-
*/
|
|
1193
|
-
delay() {
|
|
1194
|
-
return new Promise((resolve) => setTimeout(() => resolve(), this.intervalInMs));
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
/*
|
|
1199
|
-
* Copyright (c) Microsoft Corporation.
|
|
1200
|
-
* Licensed under the MIT License.
|
|
1201
|
-
*
|
|
1202
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1203
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1204
|
-
*/
|
|
1205
|
-
function createPollingMethod(sendOperationFn, GetLroStatusFromResponse, args, spec, mode) {
|
|
1206
|
-
var _a;
|
|
1207
|
-
/**
|
|
1208
|
-
* Polling calls will always return a status object i.e. {"status": "success"}
|
|
1209
|
-
* these intermediate responses are not described in the swagger so we need to
|
|
1210
|
-
* pass custom mappers at runtime.
|
|
1211
|
-
* This function replaces all the existing mappers to be able to deserialize a status object
|
|
1212
|
-
* @param responses Original set of responses defined in the operation
|
|
1213
|
-
*/
|
|
1214
|
-
function getCompositeMappers(responses) {
|
|
1215
|
-
return Object.keys(responses).reduce((acc, statusCode) => {
|
|
1216
|
-
return Object.assign(Object.assign({}, acc), { [statusCode]: Object.assign(Object.assign({}, responses[statusCode]), { bodyMapper: {
|
|
1217
|
-
type: {
|
|
1218
|
-
name: "Composite",
|
|
1219
|
-
modelProperties: {
|
|
1220
|
-
status: {
|
|
1221
|
-
serializedName: "status",
|
|
1222
|
-
type: {
|
|
1223
|
-
name: "String"
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
} }) });
|
|
1229
|
-
}, {});
|
|
1230
|
-
}
|
|
1231
|
-
let response = undefined;
|
|
1232
|
-
const customerCallback = (_a = args === null || args === void 0 ? void 0 : args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1233
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: (rawResponse, flatResponse) => {
|
|
1234
|
-
response = GetLroStatusFromResponse({
|
|
1235
|
-
statusCode: rawResponse.status,
|
|
1236
|
-
body: rawResponse.parsedBody,
|
|
1237
|
-
headers: rawResponse.headers.toJSON()
|
|
1238
|
-
}, flatResponse);
|
|
1239
|
-
if (response.done) {
|
|
1240
|
-
customerCallback === null || customerCallback === void 0 ? void 0 : customerCallback(rawResponse, flatResponse);
|
|
1241
|
-
}
|
|
1242
|
-
} }) });
|
|
1243
|
-
// Make sure we don't send any body to the get request
|
|
1244
|
-
const { requestBody, responses } = spec, restSpec = tslib.__rest(spec, ["requestBody", "responses"]);
|
|
1245
|
-
if (mode === "AzureAsync") {
|
|
1246
|
-
return (path) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1247
|
-
yield sendOperationFn(updatedArgs, Object.assign(Object.assign(Object.assign({}, restSpec), { responses: getCompositeMappers(responses), httpMethod: "GET" }), (path && { path })));
|
|
1248
|
-
return response;
|
|
1249
|
-
});
|
|
1250
|
-
}
|
|
1251
|
-
return (path) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1252
|
-
yield sendOperationFn(updatedArgs, Object.assign(Object.assign(Object.assign({}, restSpec), { responses: responses, httpMethod: "GET" }), (path && { path })));
|
|
1253
|
-
return response;
|
|
1254
|
-
});
|
|
1255
|
-
}
|
|
1256
|
-
class CoreClientLro {
|
|
1257
|
-
constructor(sendOperationFn, args, spec, lroResourceLocationConfig, requestPath = spec.path, requestMethod = spec.httpMethod) {
|
|
1258
|
-
this.sendOperationFn = sendOperationFn;
|
|
1259
|
-
this.args = args;
|
|
1260
|
-
this.spec = spec;
|
|
1261
|
-
this.lroResourceLocationConfig = lroResourceLocationConfig;
|
|
1262
|
-
this.requestPath = requestPath;
|
|
1263
|
-
this.requestMethod = requestMethod;
|
|
1264
|
-
}
|
|
1265
|
-
sendInitialRequest(initializeState) {
|
|
1266
|
-
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1267
|
-
const _a = this.args.options || {}, { onResponse } = _a, restOptions = tslib.__rest(_a, ["onResponse"]);
|
|
1268
|
-
return this.sendOperationFn(Object.assign(Object.assign({}, this.args), { options: Object.assign(Object.assign({}, restOptions), { onResponse: (rawResponse, flatResponse) => {
|
|
1269
|
-
const isCompleted = initializeState({
|
|
1270
|
-
statusCode: rawResponse.status,
|
|
1271
|
-
body: rawResponse.parsedBody,
|
|
1272
|
-
headers: rawResponse.headers.toJSON()
|
|
1273
|
-
}, flatResponse);
|
|
1274
|
-
if (isCompleted) {
|
|
1275
|
-
onResponse === null || onResponse === void 0 ? void 0 : onResponse(rawResponse, flatResponse);
|
|
1276
|
-
}
|
|
1277
|
-
} }) }), this.spec);
|
|
1278
|
-
});
|
|
1279
|
-
}
|
|
1280
|
-
sendPollRequest(config, path) {
|
|
1281
|
-
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1282
|
-
const getLroStatusFromResponse = createGetLroStatusFromResponse(this, config, this.lroResourceLocationConfig);
|
|
1283
|
-
return createPollingMethod(this.sendOperationFn, getLroStatusFromResponse, this.args, this.spec, config.mode)(path);
|
|
1284
|
-
});
|
|
1285
|
-
}
|
|
1286
|
-
retrieveAzureAsyncResource(path) {
|
|
1287
|
-
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1288
|
-
const updatedArgs = Object.assign({}, this.args);
|
|
1289
|
-
if (updatedArgs.options) {
|
|
1290
|
-
updatedArgs.options.shouldDeserialize = true;
|
|
1291
|
-
}
|
|
1292
|
-
return createPollingMethod(this.sendOperationFn, (rawResponse, flatResponse) => ({
|
|
1293
|
-
rawResponse,
|
|
1294
|
-
flatResponse,
|
|
1295
|
-
done: true
|
|
1296
|
-
}), updatedArgs, this.spec)(path);
|
|
1297
|
-
});
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
/*
|
|
1302
|
-
* Copyright (c) Microsoft Corporation.
|
|
1303
|
-
* Licensed under the MIT License.
|
|
1304
|
-
*
|
|
1305
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1306
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1307
|
-
*/
|
|
1308
|
-
/// <reference lib="esnext.asynciterable" />
|
|
1309
|
-
/** Class representing a Applications. */
|
|
1310
|
-
class ApplicationsImpl {
|
|
1311
|
-
/**
|
|
1312
|
-
* Initialize a new instance of the class Applications class.
|
|
1313
|
-
* @param client Reference to the service client
|
|
1314
|
-
*/
|
|
1315
|
-
constructor(client) {
|
|
1316
|
-
this.client = client;
|
|
1317
|
-
}
|
|
1318
|
-
/**
|
|
1319
|
-
* Gets all the applications within a resource group.
|
|
1320
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1321
|
-
* @param options The options parameters.
|
|
1322
|
-
*/
|
|
1323
|
-
listByResourceGroup(resourceGroupName, options) {
|
|
1324
|
-
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
1325
|
-
return {
|
|
1326
|
-
next() {
|
|
1327
|
-
return iter.next();
|
|
1328
|
-
},
|
|
1329
|
-
[Symbol.asyncIterator]() {
|
|
1330
|
-
return this;
|
|
1331
|
-
},
|
|
1332
|
-
byPage: () => {
|
|
1333
|
-
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
|
1334
|
-
}
|
|
1335
|
-
};
|
|
1336
|
-
}
|
|
1337
|
-
listByResourceGroupPagingPage(resourceGroupName, options) {
|
|
1338
|
-
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
1339
|
-
let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
|
1340
|
-
yield yield tslib.__await(result.value || []);
|
|
1341
|
-
let continuationToken = result.nextLink;
|
|
1342
|
-
while (continuationToken) {
|
|
1343
|
-
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
|
1344
|
-
continuationToken = result.nextLink;
|
|
1345
|
-
yield yield tslib.__await(result.value || []);
|
|
1346
|
-
}
|
|
1347
|
-
});
|
|
1348
|
-
}
|
|
1349
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
1350
|
-
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
|
|
1351
|
-
var e_1, _a;
|
|
1352
|
-
try {
|
|
1353
|
-
for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1354
|
-
const page = _c.value;
|
|
1355
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1359
|
-
finally {
|
|
1360
|
-
try {
|
|
1361
|
-
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1362
|
-
}
|
|
1363
|
-
finally { if (e_1) throw e_1.error; }
|
|
1364
|
-
}
|
|
1365
|
-
});
|
|
1366
|
-
}
|
|
1367
|
-
/**
|
|
1368
|
-
* Gets all the applications within a subscription.
|
|
1369
|
-
* @param options The options parameters.
|
|
1370
|
-
*/
|
|
1371
|
-
listBySubscription(options) {
|
|
1372
|
-
const iter = this.listBySubscriptionPagingAll(options);
|
|
1373
|
-
return {
|
|
1374
|
-
next() {
|
|
1375
|
-
return iter.next();
|
|
1376
|
-
},
|
|
1377
|
-
[Symbol.asyncIterator]() {
|
|
1378
|
-
return this;
|
|
1379
|
-
},
|
|
1380
|
-
byPage: () => {
|
|
1381
|
-
return this.listBySubscriptionPagingPage(options);
|
|
1382
|
-
}
|
|
1383
|
-
};
|
|
1384
|
-
}
|
|
1385
|
-
listBySubscriptionPagingPage(options) {
|
|
1386
|
-
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
|
|
1387
|
-
let result = yield tslib.__await(this._listBySubscription(options));
|
|
1388
|
-
yield yield tslib.__await(result.value || []);
|
|
1389
|
-
let continuationToken = result.nextLink;
|
|
1390
|
-
while (continuationToken) {
|
|
1391
|
-
result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
|
|
1392
|
-
continuationToken = result.nextLink;
|
|
1393
|
-
yield yield tslib.__await(result.value || []);
|
|
1394
|
-
}
|
|
1395
|
-
});
|
|
1396
|
-
}
|
|
1397
|
-
listBySubscriptionPagingAll(options) {
|
|
1398
|
-
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
|
|
1399
|
-
var e_2, _a;
|
|
1400
|
-
try {
|
|
1401
|
-
for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1402
|
-
const page = _c.value;
|
|
1403
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1407
|
-
finally {
|
|
1408
|
-
try {
|
|
1409
|
-
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1410
|
-
}
|
|
1411
|
-
finally { if (e_2) throw e_2.error; }
|
|
1412
|
-
}
|
|
801
|
+
class LroImpl {
|
|
802
|
+
constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
|
|
803
|
+
this.sendOperationFn = sendOperationFn;
|
|
804
|
+
this.args = args;
|
|
805
|
+
this.spec = spec;
|
|
806
|
+
this.requestPath = requestPath;
|
|
807
|
+
this.requestMethod = requestMethod;
|
|
808
|
+
}
|
|
809
|
+
sendInitialRequest() {
|
|
810
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
811
|
+
return this.sendOperationFn(this.args, this.spec);
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
sendPollRequest(path) {
|
|
815
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
816
|
+
const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
|
|
817
|
+
return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
|
|
1413
818
|
});
|
|
1414
819
|
}
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
/*
|
|
823
|
+
* Copyright (c) Microsoft Corporation.
|
|
824
|
+
* Licensed under the MIT License.
|
|
825
|
+
*
|
|
826
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
827
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
828
|
+
*/
|
|
829
|
+
/// <reference lib="esnext.asynciterable" />
|
|
830
|
+
/** Class containing Applications operations. */
|
|
831
|
+
class ApplicationsImpl {
|
|
832
|
+
/**
|
|
833
|
+
* Initialize a new instance of the class Applications class.
|
|
834
|
+
* @param client Reference to the service client
|
|
835
|
+
*/
|
|
836
|
+
constructor(client) {
|
|
837
|
+
this.client = client;
|
|
838
|
+
}
|
|
1415
839
|
/**
|
|
1416
|
-
*
|
|
840
|
+
* Gets all the applications within a resource group.
|
|
1417
841
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1418
|
-
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
1419
842
|
* @param options The options parameters.
|
|
1420
843
|
*/
|
|
1421
|
-
|
|
1422
|
-
const iter = this.
|
|
844
|
+
listByResourceGroup(resourceGroupName, options) {
|
|
845
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
1423
846
|
return {
|
|
1424
847
|
next() {
|
|
1425
848
|
return iter.next();
|
|
@@ -1428,47 +851,46 @@ class ApplicationsImpl {
|
|
|
1428
851
|
return this;
|
|
1429
852
|
},
|
|
1430
853
|
byPage: () => {
|
|
1431
|
-
return this.
|
|
854
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
|
1432
855
|
}
|
|
1433
856
|
};
|
|
1434
857
|
}
|
|
1435
|
-
|
|
1436
|
-
return tslib.__asyncGenerator(this, arguments, function*
|
|
1437
|
-
let result = yield tslib.__await(this.
|
|
858
|
+
listByResourceGroupPagingPage(resourceGroupName, options) {
|
|
859
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
860
|
+
let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
|
1438
861
|
yield yield tslib.__await(result.value || []);
|
|
1439
862
|
let continuationToken = result.nextLink;
|
|
1440
863
|
while (continuationToken) {
|
|
1441
|
-
result = yield tslib.__await(this.
|
|
864
|
+
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
|
1442
865
|
continuationToken = result.nextLink;
|
|
1443
866
|
yield yield tslib.__await(result.value || []);
|
|
1444
867
|
}
|
|
1445
868
|
});
|
|
1446
869
|
}
|
|
1447
|
-
|
|
1448
|
-
return tslib.__asyncGenerator(this, arguments, function*
|
|
1449
|
-
var
|
|
870
|
+
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
871
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
|
|
872
|
+
var e_1, _a;
|
|
1450
873
|
try {
|
|
1451
|
-
for (var _b = tslib.__asyncValues(this.
|
|
874
|
+
for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1452
875
|
const page = _c.value;
|
|
1453
876
|
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1454
877
|
}
|
|
1455
878
|
}
|
|
1456
|
-
catch (
|
|
879
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1457
880
|
finally {
|
|
1458
881
|
try {
|
|
1459
882
|
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1460
883
|
}
|
|
1461
|
-
finally { if (
|
|
884
|
+
finally { if (e_1) throw e_1.error; }
|
|
1462
885
|
}
|
|
1463
886
|
});
|
|
1464
887
|
}
|
|
1465
888
|
/**
|
|
1466
|
-
*
|
|
1467
|
-
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
|
889
|
+
* Gets all the applications within a subscription.
|
|
1468
890
|
* @param options The options parameters.
|
|
1469
891
|
*/
|
|
1470
|
-
|
|
1471
|
-
const iter = this.
|
|
892
|
+
listBySubscription(options) {
|
|
893
|
+
const iter = this.listBySubscriptionPagingAll(options);
|
|
1472
894
|
return {
|
|
1473
895
|
next() {
|
|
1474
896
|
return iter.next();
|
|
@@ -1477,37 +899,37 @@ class ApplicationsImpl {
|
|
|
1477
899
|
return this;
|
|
1478
900
|
},
|
|
1479
901
|
byPage: () => {
|
|
1480
|
-
return this.
|
|
902
|
+
return this.listBySubscriptionPagingPage(options);
|
|
1481
903
|
}
|
|
1482
904
|
};
|
|
1483
905
|
}
|
|
1484
|
-
|
|
1485
|
-
return tslib.__asyncGenerator(this, arguments, function*
|
|
1486
|
-
let result = yield tslib.__await(this.
|
|
906
|
+
listBySubscriptionPagingPage(options) {
|
|
907
|
+
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
|
|
908
|
+
let result = yield tslib.__await(this._listBySubscription(options));
|
|
1487
909
|
yield yield tslib.__await(result.value || []);
|
|
1488
910
|
let continuationToken = result.nextLink;
|
|
1489
911
|
while (continuationToken) {
|
|
1490
|
-
result = yield tslib.__await(this.
|
|
912
|
+
result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
|
|
1491
913
|
continuationToken = result.nextLink;
|
|
1492
914
|
yield yield tslib.__await(result.value || []);
|
|
1493
915
|
}
|
|
1494
916
|
});
|
|
1495
917
|
}
|
|
1496
|
-
|
|
1497
|
-
return tslib.__asyncGenerator(this, arguments, function*
|
|
1498
|
-
var
|
|
918
|
+
listBySubscriptionPagingAll(options) {
|
|
919
|
+
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
|
|
920
|
+
var e_2, _a;
|
|
1499
921
|
try {
|
|
1500
|
-
for (var _b = tslib.__asyncValues(this.
|
|
922
|
+
for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1501
923
|
const page = _c.value;
|
|
1502
924
|
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1503
925
|
}
|
|
1504
926
|
}
|
|
1505
|
-
catch (
|
|
927
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1506
928
|
finally {
|
|
1507
929
|
try {
|
|
1508
930
|
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1509
931
|
}
|
|
1510
|
-
finally { if (
|
|
932
|
+
finally { if (e_2) throw e_2.error; }
|
|
1511
933
|
}
|
|
1512
934
|
});
|
|
1513
935
|
}
|
|
@@ -1550,8 +972,11 @@ class ApplicationsImpl {
|
|
|
1550
972
|
}
|
|
1551
973
|
};
|
|
1552
974
|
});
|
|
1553
|
-
const lro = new
|
|
1554
|
-
return new LroEngine(lro, {
|
|
975
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, applicationName, options }, deleteOperationSpec);
|
|
976
|
+
return new coreLro.LroEngine(lro, {
|
|
977
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
978
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
979
|
+
});
|
|
1555
980
|
});
|
|
1556
981
|
}
|
|
1557
982
|
/**
|
|
@@ -1597,8 +1022,11 @@ class ApplicationsImpl {
|
|
|
1597
1022
|
}
|
|
1598
1023
|
};
|
|
1599
1024
|
});
|
|
1600
|
-
const lro = new
|
|
1601
|
-
return new LroEngine(lro, {
|
|
1025
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, applicationName, parameters, options }, createOrUpdateOperationSpec);
|
|
1026
|
+
return new coreLro.LroEngine(lro, {
|
|
1027
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1028
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1029
|
+
});
|
|
1602
1030
|
});
|
|
1603
1031
|
}
|
|
1604
1032
|
/**
|
|
@@ -1680,8 +1108,11 @@ class ApplicationsImpl {
|
|
|
1680
1108
|
}
|
|
1681
1109
|
};
|
|
1682
1110
|
});
|
|
1683
|
-
const lro = new
|
|
1684
|
-
return new LroEngine(lro, {
|
|
1111
|
+
const lro = new LroImpl(sendOperation, { applicationId, options }, deleteByIdOperationSpec);
|
|
1112
|
+
return new coreLro.LroEngine(lro, {
|
|
1113
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1114
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1115
|
+
});
|
|
1685
1116
|
});
|
|
1686
1117
|
}
|
|
1687
1118
|
/**
|
|
@@ -1729,8 +1160,11 @@ class ApplicationsImpl {
|
|
|
1729
1160
|
}
|
|
1730
1161
|
};
|
|
1731
1162
|
});
|
|
1732
|
-
const lro = new
|
|
1733
|
-
return new LroEngine(lro, {
|
|
1163
|
+
const lro = new LroImpl(sendOperation, { applicationId, parameters, options }, createOrUpdateByIdOperationSpec);
|
|
1164
|
+
return new coreLro.LroEngine(lro, {
|
|
1165
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1166
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1167
|
+
});
|
|
1734
1168
|
});
|
|
1735
1169
|
}
|
|
1736
1170
|
/**
|
|
@@ -1775,24 +1209,6 @@ class ApplicationsImpl {
|
|
|
1775
1209
|
_listBySubscriptionNext(nextLink, options) {
|
|
1776
1210
|
return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
|
|
1777
1211
|
}
|
|
1778
|
-
/**
|
|
1779
|
-
* ListByResourceGroupNextNext
|
|
1780
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1781
|
-
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroupNext
|
|
1782
|
-
* method.
|
|
1783
|
-
* @param options The options parameters.
|
|
1784
|
-
*/
|
|
1785
|
-
_listByResourceGroupNextNext(resourceGroupName, nextLink, options) {
|
|
1786
|
-
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextNextOperationSpec);
|
|
1787
|
-
}
|
|
1788
|
-
/**
|
|
1789
|
-
* ListBySubscriptionNextNext
|
|
1790
|
-
* @param nextLink The nextLink from the previous successful call to the ListBySubscriptionNext method.
|
|
1791
|
-
* @param options The options parameters.
|
|
1792
|
-
*/
|
|
1793
|
-
_listBySubscriptionNextNext(nextLink, options) {
|
|
1794
|
-
return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextNextOperationSpec);
|
|
1795
|
-
}
|
|
1796
1212
|
}
|
|
1797
1213
|
// Operation Specifications
|
|
1798
1214
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
@@ -2051,47 +1467,6 @@ const listBySubscriptionNextOperationSpec = {
|
|
|
2051
1467
|
headerParameters: [accept],
|
|
2052
1468
|
serializer
|
|
2053
1469
|
};
|
|
2054
|
-
const listByResourceGroupNextNextOperationSpec = {
|
|
2055
|
-
path: "{nextLink}",
|
|
2056
|
-
httpMethod: "GET",
|
|
2057
|
-
responses: {
|
|
2058
|
-
200: {
|
|
2059
|
-
bodyMapper: ApplicationListResult
|
|
2060
|
-
},
|
|
2061
|
-
default: {
|
|
2062
|
-
bodyMapper: ErrorResponse
|
|
2063
|
-
}
|
|
2064
|
-
},
|
|
2065
|
-
queryParameters: [apiVersion],
|
|
2066
|
-
urlParameters: [
|
|
2067
|
-
$host,
|
|
2068
|
-
nextLink,
|
|
2069
|
-
resourceGroupName,
|
|
2070
|
-
subscriptionId
|
|
2071
|
-
],
|
|
2072
|
-
headerParameters: [accept],
|
|
2073
|
-
serializer
|
|
2074
|
-
};
|
|
2075
|
-
const listBySubscriptionNextNextOperationSpec = {
|
|
2076
|
-
path: "{nextLink}",
|
|
2077
|
-
httpMethod: "GET",
|
|
2078
|
-
responses: {
|
|
2079
|
-
200: {
|
|
2080
|
-
bodyMapper: ApplicationListResult
|
|
2081
|
-
},
|
|
2082
|
-
default: {
|
|
2083
|
-
bodyMapper: ErrorResponse
|
|
2084
|
-
}
|
|
2085
|
-
},
|
|
2086
|
-
queryParameters: [apiVersion],
|
|
2087
|
-
urlParameters: [
|
|
2088
|
-
$host,
|
|
2089
|
-
nextLink,
|
|
2090
|
-
subscriptionId
|
|
2091
|
-
],
|
|
2092
|
-
headerParameters: [accept],
|
|
2093
|
-
serializer
|
|
2094
|
-
};
|
|
2095
1470
|
|
|
2096
1471
|
/*
|
|
2097
1472
|
* Copyright (c) Microsoft Corporation.
|
|
@@ -2101,7 +1476,7 @@ const listBySubscriptionNextNextOperationSpec = {
|
|
|
2101
1476
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
2102
1477
|
*/
|
|
2103
1478
|
/// <reference lib="esnext.asynciterable" />
|
|
2104
|
-
/** Class
|
|
1479
|
+
/** Class containing ApplicationDefinitions operations. */
|
|
2105
1480
|
class ApplicationDefinitionsImpl {
|
|
2106
1481
|
/**
|
|
2107
1482
|
* Initialize a new instance of the class ApplicationDefinitions class.
|
|
@@ -2159,56 +1534,6 @@ class ApplicationDefinitionsImpl {
|
|
|
2159
1534
|
}
|
|
2160
1535
|
});
|
|
2161
1536
|
}
|
|
2162
|
-
/**
|
|
2163
|
-
* ListByResourceGroupNext
|
|
2164
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2165
|
-
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
2166
|
-
* @param options The options parameters.
|
|
2167
|
-
*/
|
|
2168
|
-
listByResourceGroupNext(resourceGroupName, nextLink, options) {
|
|
2169
|
-
const iter = this.listByResourceGroupNextPagingAll(resourceGroupName, nextLink, options);
|
|
2170
|
-
return {
|
|
2171
|
-
next() {
|
|
2172
|
-
return iter.next();
|
|
2173
|
-
},
|
|
2174
|
-
[Symbol.asyncIterator]() {
|
|
2175
|
-
return this;
|
|
2176
|
-
},
|
|
2177
|
-
byPage: () => {
|
|
2178
|
-
return this.listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options);
|
|
2179
|
-
}
|
|
2180
|
-
};
|
|
2181
|
-
}
|
|
2182
|
-
listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options) {
|
|
2183
|
-
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupNextPagingPage_1() {
|
|
2184
|
-
let result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, nextLink, options));
|
|
2185
|
-
yield yield tslib.__await(result.value || []);
|
|
2186
|
-
let continuationToken = result.nextLink;
|
|
2187
|
-
while (continuationToken) {
|
|
2188
|
-
result = yield tslib.__await(this._listByResourceGroupNextNext(resourceGroupName, continuationToken, options));
|
|
2189
|
-
continuationToken = result.nextLink;
|
|
2190
|
-
yield yield tslib.__await(result.value || []);
|
|
2191
|
-
}
|
|
2192
|
-
});
|
|
2193
|
-
}
|
|
2194
|
-
listByResourceGroupNextPagingAll(resourceGroupName, nextLink, options) {
|
|
2195
|
-
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupNextPagingAll_1() {
|
|
2196
|
-
var e_2, _a;
|
|
2197
|
-
try {
|
|
2198
|
-
for (var _b = tslib.__asyncValues(this.listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
2199
|
-
const page = _c.value;
|
|
2200
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2204
|
-
finally {
|
|
2205
|
-
try {
|
|
2206
|
-
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
2207
|
-
}
|
|
2208
|
-
finally { if (e_2) throw e_2.error; }
|
|
2209
|
-
}
|
|
2210
|
-
});
|
|
2211
|
-
}
|
|
2212
1537
|
/**
|
|
2213
1538
|
* Gets the managed application definition.
|
|
2214
1539
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
@@ -2248,8 +1573,11 @@ class ApplicationDefinitionsImpl {
|
|
|
2248
1573
|
}
|
|
2249
1574
|
};
|
|
2250
1575
|
});
|
|
2251
|
-
const lro = new
|
|
2252
|
-
return new LroEngine(lro, {
|
|
1576
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, applicationDefinitionName, options }, deleteOperationSpec$1);
|
|
1577
|
+
return new coreLro.LroEngine(lro, {
|
|
1578
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1579
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1580
|
+
});
|
|
2253
1581
|
});
|
|
2254
1582
|
}
|
|
2255
1583
|
/**
|
|
@@ -2295,8 +1623,11 @@ class ApplicationDefinitionsImpl {
|
|
|
2295
1623
|
}
|
|
2296
1624
|
};
|
|
2297
1625
|
});
|
|
2298
|
-
const lro = new
|
|
2299
|
-
return new LroEngine(lro, {
|
|
1626
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, applicationDefinitionName, parameters, options }, createOrUpdateOperationSpec$1);
|
|
1627
|
+
return new coreLro.LroEngine(lro, {
|
|
1628
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1629
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1630
|
+
});
|
|
2300
1631
|
});
|
|
2301
1632
|
}
|
|
2302
1633
|
/**
|
|
@@ -2359,8 +1690,11 @@ class ApplicationDefinitionsImpl {
|
|
|
2359
1690
|
}
|
|
2360
1691
|
};
|
|
2361
1692
|
});
|
|
2362
|
-
const lro = new
|
|
2363
|
-
return new LroEngine(lro, {
|
|
1693
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, applicationDefinitionName, options }, deleteByIdOperationSpec$1);
|
|
1694
|
+
return new coreLro.LroEngine(lro, {
|
|
1695
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1696
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1697
|
+
});
|
|
2364
1698
|
});
|
|
2365
1699
|
}
|
|
2366
1700
|
/**
|
|
@@ -2406,8 +1740,11 @@ class ApplicationDefinitionsImpl {
|
|
|
2406
1740
|
}
|
|
2407
1741
|
};
|
|
2408
1742
|
});
|
|
2409
|
-
const lro = new
|
|
2410
|
-
return new LroEngine(lro, {
|
|
1743
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, applicationDefinitionName, parameters, options }, createOrUpdateByIdOperationSpec$1);
|
|
1744
|
+
return new coreLro.LroEngine(lro, {
|
|
1745
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1746
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1747
|
+
});
|
|
2411
1748
|
});
|
|
2412
1749
|
}
|
|
2413
1750
|
/**
|
|
@@ -2432,16 +1769,6 @@ class ApplicationDefinitionsImpl {
|
|
|
2432
1769
|
_listByResourceGroupNext(resourceGroupName, nextLink, options) {
|
|
2433
1770
|
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec$1);
|
|
2434
1771
|
}
|
|
2435
|
-
/**
|
|
2436
|
-
* ListByResourceGroupNextNext
|
|
2437
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2438
|
-
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroupNext
|
|
2439
|
-
* method.
|
|
2440
|
-
* @param options The options parameters.
|
|
2441
|
-
*/
|
|
2442
|
-
_listByResourceGroupNextNext(resourceGroupName, nextLink, options) {
|
|
2443
|
-
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextNextOperationSpec$1);
|
|
2444
|
-
}
|
|
2445
1772
|
}
|
|
2446
1773
|
// Operation Specifications
|
|
2447
1774
|
const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
@@ -2638,27 +1965,6 @@ const listByResourceGroupNextOperationSpec$1 = {
|
|
|
2638
1965
|
headerParameters: [accept],
|
|
2639
1966
|
serializer: serializer$1
|
|
2640
1967
|
};
|
|
2641
|
-
const listByResourceGroupNextNextOperationSpec$1 = {
|
|
2642
|
-
path: "{nextLink}",
|
|
2643
|
-
httpMethod: "GET",
|
|
2644
|
-
responses: {
|
|
2645
|
-
200: {
|
|
2646
|
-
bodyMapper: ApplicationDefinitionListResult
|
|
2647
|
-
},
|
|
2648
|
-
default: {
|
|
2649
|
-
bodyMapper: ErrorResponse
|
|
2650
|
-
}
|
|
2651
|
-
},
|
|
2652
|
-
queryParameters: [apiVersion],
|
|
2653
|
-
urlParameters: [
|
|
2654
|
-
$host,
|
|
2655
|
-
nextLink,
|
|
2656
|
-
resourceGroupName,
|
|
2657
|
-
subscriptionId
|
|
2658
|
-
],
|
|
2659
|
-
headerParameters: [accept],
|
|
2660
|
-
serializer: serializer$1
|
|
2661
|
-
};
|
|
2662
1968
|
|
|
2663
1969
|
/*
|
|
2664
1970
|
* Copyright (c) Microsoft Corporation.
|
|
@@ -2667,9 +1973,10 @@ const listByResourceGroupNextNextOperationSpec$1 = {
|
|
|
2667
1973
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
2668
1974
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
2669
1975
|
*/
|
|
2670
|
-
|
|
1976
|
+
/// <reference lib="esnext.asynciterable" />
|
|
1977
|
+
class ApplicationClient extends coreClient.ServiceClient {
|
|
2671
1978
|
/**
|
|
2672
|
-
* Initializes a new instance of the
|
|
1979
|
+
* Initializes a new instance of the ApplicationClient class.
|
|
2673
1980
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
2674
1981
|
* @param subscriptionId The ID of the target subscription.
|
|
2675
1982
|
* @param options The parameter options
|
|
@@ -2689,7 +1996,7 @@ class ApplicationClientContext extends coreClient.ServiceClient {
|
|
|
2689
1996
|
requestContentType: "application/json; charset=utf-8",
|
|
2690
1997
|
credential: credentials
|
|
2691
1998
|
};
|
|
2692
|
-
const packageDetails = `azsdk-js-arm-managedapplications/2.0.0
|
|
1999
|
+
const packageDetails = `azsdk-js-arm-managedapplications/2.0.0`;
|
|
2693
2000
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
2694
2001
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
2695
2002
|
: `${packageDetails}`;
|
|
@@ -2705,26 +2012,6 @@ class ApplicationClientContext extends coreClient.ServiceClient {
|
|
|
2705
2012
|
// Assigning values to Constant parameters
|
|
2706
2013
|
this.$host = options.$host || "https://management.azure.com";
|
|
2707
2014
|
this.apiVersion = options.apiVersion || "2018-06-01";
|
|
2708
|
-
}
|
|
2709
|
-
}
|
|
2710
|
-
|
|
2711
|
-
/*
|
|
2712
|
-
* Copyright (c) Microsoft Corporation.
|
|
2713
|
-
* Licensed under the MIT License.
|
|
2714
|
-
*
|
|
2715
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
2716
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
2717
|
-
*/
|
|
2718
|
-
/// <reference lib="esnext.asynciterable" />
|
|
2719
|
-
class ApplicationClient extends ApplicationClientContext {
|
|
2720
|
-
/**
|
|
2721
|
-
* Initializes a new instance of the ApplicationClient class.
|
|
2722
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
2723
|
-
* @param subscriptionId The ID of the target subscription.
|
|
2724
|
-
* @param options The parameter options
|
|
2725
|
-
*/
|
|
2726
|
-
constructor(credentials, subscriptionId, options) {
|
|
2727
|
-
super(credentials, subscriptionId, options);
|
|
2728
2015
|
this.applications = new ApplicationsImpl(this);
|
|
2729
2016
|
this.applicationDefinitions = new ApplicationDefinitionsImpl(this);
|
|
2730
2017
|
}
|
|
@@ -2776,55 +2063,6 @@ class ApplicationClient extends ApplicationClientContext {
|
|
|
2776
2063
|
}
|
|
2777
2064
|
});
|
|
2778
2065
|
}
|
|
2779
|
-
/**
|
|
2780
|
-
* ListOperationsNext
|
|
2781
|
-
* @param nextLink The nextLink from the previous successful call to the ListOperations method.
|
|
2782
|
-
* @param options The options parameters.
|
|
2783
|
-
*/
|
|
2784
|
-
listOperationsNext(nextLink, options) {
|
|
2785
|
-
const iter = this.listOperationsNextPagingAll(nextLink, options);
|
|
2786
|
-
return {
|
|
2787
|
-
next() {
|
|
2788
|
-
return iter.next();
|
|
2789
|
-
},
|
|
2790
|
-
[Symbol.asyncIterator]() {
|
|
2791
|
-
return this;
|
|
2792
|
-
},
|
|
2793
|
-
byPage: () => {
|
|
2794
|
-
return this.listOperationsNextPagingPage(nextLink, options);
|
|
2795
|
-
}
|
|
2796
|
-
};
|
|
2797
|
-
}
|
|
2798
|
-
listOperationsNextPagingPage(nextLink, options) {
|
|
2799
|
-
return tslib.__asyncGenerator(this, arguments, function* listOperationsNextPagingPage_1() {
|
|
2800
|
-
let result = yield tslib.__await(this._listOperationsNext(nextLink, options));
|
|
2801
|
-
yield yield tslib.__await(result.value || []);
|
|
2802
|
-
let continuationToken = result.nextLink;
|
|
2803
|
-
while (continuationToken) {
|
|
2804
|
-
result = yield tslib.__await(this._listOperationsNextNext(continuationToken, options));
|
|
2805
|
-
continuationToken = result.nextLink;
|
|
2806
|
-
yield yield tslib.__await(result.value || []);
|
|
2807
|
-
}
|
|
2808
|
-
});
|
|
2809
|
-
}
|
|
2810
|
-
listOperationsNextPagingAll(nextLink, options) {
|
|
2811
|
-
return tslib.__asyncGenerator(this, arguments, function* listOperationsNextPagingAll_1() {
|
|
2812
|
-
var e_2, _a;
|
|
2813
|
-
try {
|
|
2814
|
-
for (var _b = tslib.__asyncValues(this.listOperationsNextPagingPage(nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
2815
|
-
const page = _c.value;
|
|
2816
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2817
|
-
}
|
|
2818
|
-
}
|
|
2819
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2820
|
-
finally {
|
|
2821
|
-
try {
|
|
2822
|
-
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
2823
|
-
}
|
|
2824
|
-
finally { if (e_2) throw e_2.error; }
|
|
2825
|
-
}
|
|
2826
|
-
});
|
|
2827
|
-
}
|
|
2828
2066
|
/**
|
|
2829
2067
|
* Lists all of the available Microsoft.Solutions REST API operations.
|
|
2830
2068
|
* @param options The options parameters.
|
|
@@ -2840,14 +2078,6 @@ class ApplicationClient extends ApplicationClientContext {
|
|
|
2840
2078
|
_listOperationsNext(nextLink, options) {
|
|
2841
2079
|
return this.sendOperationRequest({ nextLink, options }, listOperationsNextOperationSpec);
|
|
2842
2080
|
}
|
|
2843
|
-
/**
|
|
2844
|
-
* ListOperationsNextNext
|
|
2845
|
-
* @param nextLink The nextLink from the previous successful call to the ListOperationsNext method.
|
|
2846
|
-
* @param options The options parameters.
|
|
2847
|
-
*/
|
|
2848
|
-
_listOperationsNextNext(nextLink, options) {
|
|
2849
|
-
return this.sendOperationRequest({ nextLink, options }, listOperationsNextNextOperationSpec);
|
|
2850
|
-
}
|
|
2851
2081
|
}
|
|
2852
2082
|
// Operation Specifications
|
|
2853
2083
|
const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
@@ -2877,20 +2107,6 @@ const listOperationsNextOperationSpec = {
|
|
|
2877
2107
|
headerParameters: [accept],
|
|
2878
2108
|
serializer: serializer$2
|
|
2879
2109
|
};
|
|
2880
|
-
const listOperationsNextNextOperationSpec = {
|
|
2881
|
-
path: "{nextLink}",
|
|
2882
|
-
httpMethod: "GET",
|
|
2883
|
-
responses: {
|
|
2884
|
-
200: {
|
|
2885
|
-
bodyMapper: OperationListResult
|
|
2886
|
-
}
|
|
2887
|
-
},
|
|
2888
|
-
queryParameters: [apiVersion],
|
|
2889
|
-
urlParameters: [$host, nextLink],
|
|
2890
|
-
headerParameters: [accept],
|
|
2891
|
-
serializer: serializer$2
|
|
2892
|
-
};
|
|
2893
2110
|
|
|
2894
2111
|
exports.ApplicationClient = ApplicationClient;
|
|
2895
|
-
exports.ApplicationClientContext = ApplicationClientContext;
|
|
2896
2112
|
//# sourceMappingURL=index.js.map
|