@azure/arm-managementpartner 1.2.1 → 2.0.0
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 +11 -0
- package/LICENSE +21 -0
- package/README.md +69 -81
- package/dist/index.js +634 -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/deletePartnerDetails.d.ts +2 -0
- package/dist-esm/samples-dev/deletePartnerDetails.d.ts.map +1 -0
- package/dist-esm/samples-dev/deletePartnerDetails.js +29 -0
- package/dist-esm/samples-dev/deletePartnerDetails.js.map +1 -0
- package/dist-esm/samples-dev/getOperations.d.ts +2 -0
- package/dist-esm/samples-dev/getOperations.d.ts.map +1 -0
- package/dist-esm/samples-dev/getOperations.js +42 -0
- package/dist-esm/samples-dev/getOperations.js.map +1 -0
- package/dist-esm/samples-dev/getPartnerDetails.d.ts +2 -0
- package/dist-esm/samples-dev/getPartnerDetails.d.ts.map +1 -0
- package/dist-esm/samples-dev/getPartnerDetails.js +28 -0
- package/dist-esm/samples-dev/getPartnerDetails.js.map +1 -0
- package/dist-esm/samples-dev/patchPartnerDetails.d.ts +2 -0
- package/dist-esm/samples-dev/patchPartnerDetails.d.ts.map +1 -0
- package/dist-esm/samples-dev/patchPartnerDetails.js +29 -0
- package/dist-esm/samples-dev/patchPartnerDetails.js.map +1 -0
- package/dist-esm/samples-dev/putPartnerDetails.d.ts +2 -0
- package/dist-esm/samples-dev/putPartnerDetails.d.ts.map +1 -0
- package/dist-esm/samples-dev/putPartnerDetails.js +29 -0
- package/dist-esm/samples-dev/putPartnerDetails.js.map +1 -0
- package/dist-esm/src/aCEProvisioningManagementPartnerAPI.d.ts +18 -0
- package/dist-esm/src/aCEProvisioningManagementPartnerAPI.d.ts.map +1 -0
- package/dist-esm/src/aCEProvisioningManagementPartnerAPI.js +47 -0
- package/dist-esm/src/aCEProvisioningManagementPartnerAPI.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +137 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +14 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +8 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +67 -66
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +7 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/parameters.js +33 -22
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +4 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +11 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operation.d.ts +32 -0
- package/dist-esm/src/operations/operation.d.ts.map +1 -0
- package/dist-esm/src/operations/operation.js +120 -0
- package/dist-esm/src/operations/operation.js.map +1 -0
- package/dist-esm/src/operations/partner.d.ts +37 -0
- package/dist-esm/src/operations/partner.d.ts.map +1 -0
- package/dist-esm/src/operations/partner.js +117 -0
- package/dist-esm/src/operations/partner.js.map +1 -0
- package/dist-esm/src/operations/partners.d.ts +18 -0
- package/dist-esm/src/operations/partners.d.ts.map +1 -0
- package/dist-esm/src/operations/partners.js +46 -0
- package/dist-esm/src/operations/partners.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +11 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operation.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operation.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operation.js +9 -0
- package/dist-esm/src/operationsInterfaces/operation.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/partner.d.ts +29 -0
- package/dist-esm/src/operationsInterfaces/partner.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/partner.js +9 -0
- package/dist-esm/src/operationsInterfaces/partner.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/partners.d.ts +10 -0
- package/dist-esm/src/operationsInterfaces/partners.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/partners.js +9 -0
- package/dist-esm/src/operationsInterfaces/partners.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 +81 -34
- package/review/arm-managementpartner.api.md +160 -0
- package/rollup.config.js +184 -27
- package/src/aCEProvisioningManagementPartnerAPI.ts +59 -37
- package/src/index.ts +12 -0
- package/src/models/index.ts +117 -250
- package/src/models/mappers.ts +68 -68
- package/src/models/parameters.ts +42 -23
- package/src/operations/index.ts +4 -5
- package/src/operations/operation.ts +87 -75
- package/src/operations/partner.ts +76 -152
- package/src/operations/partners.ts +54 -0
- package/src/operationsInterfaces/index.ts +11 -0
- package/src/operationsInterfaces/operation.ts +22 -0
- package/src/operationsInterfaces/partner.ts +57 -0
- package/src/operationsInterfaces/partners.ts +18 -0
- package/tsconfig.json +6 -5
- package/types/arm-managementpartner.d.ts +222 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-managementpartner.js +0 -686
- package/dist/arm-managementpartner.js.map +0 -1
- package/dist/arm-managementpartner.min.js +0 -1
- package/dist/arm-managementpartner.min.js.map +0 -1
- package/esm/aCEProvisioningManagementPartnerAPI.d.ts +0 -24
- package/esm/aCEProvisioningManagementPartnerAPI.d.ts.map +0 -1
- package/esm/aCEProvisioningManagementPartnerAPI.js +0 -38
- package/esm/aCEProvisioningManagementPartnerAPI.js.map +0 -1
- package/esm/aCEProvisioningManagementPartnerAPIContext.d.ts +0 -20
- package/esm/aCEProvisioningManagementPartnerAPIContext.d.ts.map +0 -1
- package/esm/aCEProvisioningManagementPartnerAPIContext.js +0 -56
- package/esm/aCEProvisioningManagementPartnerAPIContext.js.map +0 -1
- package/esm/models/index.d.ts +0 -273
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -10
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -10
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationMappers.d.ts +0 -2
- package/esm/models/operationMappers.d.ts.map +0 -1
- package/esm/models/operationMappers.js +0 -11
- package/esm/models/operationMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -6
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/partnerMappers.d.ts +0 -2
- package/esm/models/partnerMappers.d.ts.map +0 -1
- package/esm/models/partnerMappers.js +0 -11
- package/esm/models/partnerMappers.js.map +0 -1
- package/esm/operations/index.d.ts +0 -3
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js +0 -12
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operation.d.ts +0 -48
- package/esm/operations/operation.d.ts.map +0 -1
- package/esm/operations/operation.js +0 -77
- package/esm/operations/operation.js.map +0 -1
- package/esm/operations/partner.d.ts +0 -89
- package/esm/operations/partner.d.ts.map +0 -1
- package/esm/operations/partner.js +0 -137
- package/esm/operations/partner.js.map +0 -1
- package/src/aCEProvisioningManagementPartnerAPIContext.ts +0 -62
- package/src/models/operationMappers.ts +0 -18
- package/src/models/partnerMappers.ts +0 -17
package/src/models/parameters.ts
CHANGED
|
@@ -1,53 +1,72 @@
|
|
|
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
|
|
9
|
+
import {
|
|
10
|
+
OperationParameter,
|
|
11
|
+
OperationURLParameter,
|
|
12
|
+
OperationQueryParameter
|
|
13
|
+
} from "@azure/core-client";
|
|
12
14
|
|
|
13
|
-
export const
|
|
14
|
-
parameterPath: "
|
|
15
|
+
export const accept: OperationParameter = {
|
|
16
|
+
parameterPath: "accept",
|
|
15
17
|
mapper: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
defaultValue: "application/json",
|
|
19
|
+
isConstant: true,
|
|
20
|
+
serializedName: "Accept",
|
|
18
21
|
type: {
|
|
19
22
|
name: "String"
|
|
20
23
|
}
|
|
21
24
|
}
|
|
22
25
|
};
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
|
|
27
|
+
export const $host: OperationURLParameter = {
|
|
28
|
+
parameterPath: "$host",
|
|
25
29
|
mapper: {
|
|
30
|
+
serializedName: "$host",
|
|
26
31
|
required: true,
|
|
27
|
-
serializedName: "api-version",
|
|
28
32
|
type: {
|
|
29
33
|
name: "String"
|
|
30
34
|
}
|
|
31
|
-
}
|
|
35
|
+
},
|
|
36
|
+
skipEncoding: true
|
|
32
37
|
};
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
|
|
39
|
+
export const partnerId: OperationURLParameter = {
|
|
40
|
+
parameterPath: "partnerId",
|
|
35
41
|
mapper: {
|
|
42
|
+
serializedName: "partnerId",
|
|
36
43
|
required: true,
|
|
37
|
-
serializedName: "nextLink",
|
|
38
44
|
type: {
|
|
39
45
|
name: "String"
|
|
40
46
|
}
|
|
41
|
-
}
|
|
42
|
-
skipEncoding: true
|
|
47
|
+
}
|
|
43
48
|
};
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
|
|
50
|
+
export const apiVersion: OperationQueryParameter = {
|
|
51
|
+
parameterPath: "apiVersion",
|
|
46
52
|
mapper: {
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
defaultValue: "2018-02-01",
|
|
54
|
+
isConstant: true,
|
|
55
|
+
serializedName: "api-version",
|
|
49
56
|
type: {
|
|
50
57
|
name: "String"
|
|
51
58
|
}
|
|
52
59
|
}
|
|
53
60
|
};
|
|
61
|
+
|
|
62
|
+
export const nextLink: OperationURLParameter = {
|
|
63
|
+
parameterPath: "nextLink",
|
|
64
|
+
mapper: {
|
|
65
|
+
serializedName: "nextLink",
|
|
66
|
+
required: true,
|
|
67
|
+
type: {
|
|
68
|
+
name: "String"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
skipEncoding: true
|
|
72
|
+
};
|
package/src/operations/index.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
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 "./partner";
|
|
12
10
|
export * from "./operation";
|
|
11
|
+
export * from "./partners";
|
|
@@ -1,97 +1,111 @@
|
|
|
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 * as
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Operation } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
14
13
|
import * as Parameters from "../models/parameters";
|
|
15
|
-
import {
|
|
14
|
+
import { ACEProvisioningManagementPartnerAPI } from "../aCEProvisioningManagementPartnerAPI";
|
|
15
|
+
import {
|
|
16
|
+
OperationResponse,
|
|
17
|
+
OperationListNextOptionalParams,
|
|
18
|
+
OperationListOptionalParams,
|
|
19
|
+
OperationListResponse,
|
|
20
|
+
OperationListNextResponse
|
|
21
|
+
} from "../models";
|
|
16
22
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
/// <reference lib="esnext.asynciterable" />
|
|
24
|
+
/** Class containing Operation operations. */
|
|
25
|
+
export class OperationImpl implements Operation {
|
|
26
|
+
private readonly client: ACEProvisioningManagementPartnerAPI;
|
|
20
27
|
|
|
21
28
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
29
|
+
* Initialize a new instance of the class Operation class.
|
|
30
|
+
* @param client Reference to the service client
|
|
24
31
|
*/
|
|
25
|
-
constructor(client:
|
|
32
|
+
constructor(client: ACEProvisioningManagementPartnerAPI) {
|
|
26
33
|
this.client = client;
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
/**
|
|
30
37
|
* List all the operations.
|
|
31
|
-
* @
|
|
32
|
-
* @param [options] The optional parameters
|
|
33
|
-
* @returns Promise<Models.OperationListResponse>
|
|
38
|
+
* @param options The options parameters.
|
|
34
39
|
*/
|
|
35
|
-
list(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationList>, callback?: msRest.ServiceCallback<Models.OperationList>): Promise<Models.OperationListResponse> {
|
|
46
|
-
return this.client.sendOperationRequest(
|
|
47
|
-
{
|
|
48
|
-
options
|
|
40
|
+
public list(
|
|
41
|
+
options?: OperationListOptionalParams
|
|
42
|
+
): PagedAsyncIterableIterator<OperationResponse> {
|
|
43
|
+
const iter = this.listPagingAll(options);
|
|
44
|
+
return {
|
|
45
|
+
next() {
|
|
46
|
+
return iter.next();
|
|
47
|
+
},
|
|
48
|
+
[Symbol.asyncIterator]() {
|
|
49
|
+
return this;
|
|
49
50
|
},
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
byPage: () => {
|
|
52
|
+
return this.listPagingPage(options);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
private async *listPagingPage(
|
|
58
|
+
options?: OperationListOptionalParams
|
|
59
|
+
): AsyncIterableIterator<OperationResponse[]> {
|
|
60
|
+
let result = await this._list(options);
|
|
61
|
+
yield result.value || [];
|
|
62
|
+
let continuationToken = result.nextLink;
|
|
63
|
+
while (continuationToken) {
|
|
64
|
+
result = await this._listNext(continuationToken, options);
|
|
65
|
+
continuationToken = result.nextLink;
|
|
66
|
+
yield result.value || [];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private async *listPagingAll(
|
|
71
|
+
options?: OperationListOptionalParams
|
|
72
|
+
): AsyncIterableIterator<OperationResponse> {
|
|
73
|
+
for await (const page of this.listPagingPage(options)) {
|
|
74
|
+
yield* page;
|
|
75
|
+
}
|
|
52
76
|
}
|
|
53
77
|
|
|
54
78
|
/**
|
|
55
79
|
* List all the operations.
|
|
56
|
-
* @
|
|
57
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
58
|
-
* @param [options] The optional parameters
|
|
59
|
-
* @returns Promise<Models.OperationListNextResponse>
|
|
60
|
-
*/
|
|
61
|
-
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OperationListNextResponse>;
|
|
62
|
-
/**
|
|
63
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
64
|
-
* @param callback The callback
|
|
80
|
+
* @param options The options parameters.
|
|
65
81
|
*/
|
|
66
|
-
|
|
82
|
+
private _list(
|
|
83
|
+
options?: OperationListOptionalParams
|
|
84
|
+
): Promise<OperationListResponse> {
|
|
85
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
86
|
+
}
|
|
87
|
+
|
|
67
88
|
/**
|
|
68
|
-
*
|
|
69
|
-
* @param
|
|
70
|
-
* @param
|
|
89
|
+
* ListNext
|
|
90
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
91
|
+
* @param options The options parameters.
|
|
71
92
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
93
|
+
private _listNext(
|
|
94
|
+
nextLink: string,
|
|
95
|
+
options?: OperationListNextOptionalParams
|
|
96
|
+
): Promise<OperationListNextResponse> {
|
|
74
97
|
return this.client.sendOperationRequest(
|
|
75
|
-
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
listNextOperationSpec,
|
|
80
|
-
callback) as Promise<Models.OperationListNextResponse>;
|
|
98
|
+
{ nextLink, options },
|
|
99
|
+
listNextOperationSpec
|
|
100
|
+
);
|
|
81
101
|
}
|
|
82
102
|
}
|
|
83
|
-
|
|
84
103
|
// Operation Specifications
|
|
85
|
-
const serializer =
|
|
86
|
-
|
|
104
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
105
|
+
|
|
106
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
107
|
+
path: "/providers/Microsoft.ManagementPartner/operations",
|
|
87
108
|
httpMethod: "GET",
|
|
88
|
-
path: "providers/Microsoft.ManagementPartner/operations",
|
|
89
|
-
queryParameters: [
|
|
90
|
-
Parameters.apiVersion
|
|
91
|
-
],
|
|
92
|
-
headerParameters: [
|
|
93
|
-
Parameters.acceptLanguage
|
|
94
|
-
],
|
|
95
109
|
responses: {
|
|
96
110
|
200: {
|
|
97
111
|
bodyMapper: Mappers.OperationList
|
|
@@ -100,19 +114,14 @@ const listOperationSpec: msRest.OperationSpec = {
|
|
|
100
114
|
bodyMapper: Mappers.ErrorModel
|
|
101
115
|
}
|
|
102
116
|
},
|
|
117
|
+
queryParameters: [Parameters.apiVersion],
|
|
118
|
+
urlParameters: [Parameters.$host],
|
|
119
|
+
headerParameters: [Parameters.accept],
|
|
103
120
|
serializer
|
|
104
121
|
};
|
|
105
|
-
|
|
106
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
107
|
-
httpMethod: "GET",
|
|
108
|
-
baseUrl: "https://management.azure.com",
|
|
122
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
109
123
|
path: "{nextLink}",
|
|
110
|
-
|
|
111
|
-
Parameters.nextPageLink
|
|
112
|
-
],
|
|
113
|
-
headerParameters: [
|
|
114
|
-
Parameters.acceptLanguage
|
|
115
|
-
],
|
|
124
|
+
httpMethod: "GET",
|
|
116
125
|
responses: {
|
|
117
126
|
200: {
|
|
118
127
|
bodyMapper: Mappers.OperationList
|
|
@@ -121,5 +130,8 @@ const listNextOperationSpec: msRest.OperationSpec = {
|
|
|
121
130
|
bodyMapper: Mappers.ErrorModel
|
|
122
131
|
}
|
|
123
132
|
},
|
|
133
|
+
queryParameters: [Parameters.apiVersion],
|
|
134
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
135
|
+
headerParameters: [Parameters.accept],
|
|
124
136
|
serializer
|
|
125
137
|
};
|
|
@@ -1,162 +1,104 @@
|
|
|
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 * as
|
|
13
|
-
import * as Mappers from "../models/
|
|
9
|
+
import { Partner } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
14
12
|
import * as Parameters from "../models/parameters";
|
|
15
|
-
import {
|
|
13
|
+
import { ACEProvisioningManagementPartnerAPI } from "../aCEProvisioningManagementPartnerAPI";
|
|
14
|
+
import {
|
|
15
|
+
PartnerGetOptionalParams,
|
|
16
|
+
PartnerGetResponse,
|
|
17
|
+
PartnerCreateOptionalParams,
|
|
18
|
+
PartnerCreateResponse,
|
|
19
|
+
PartnerUpdateOptionalParams,
|
|
20
|
+
PartnerUpdateResponse,
|
|
21
|
+
PartnerDeleteOptionalParams
|
|
22
|
+
} from "../models";
|
|
16
23
|
|
|
17
|
-
/** Class
|
|
18
|
-
export class Partner {
|
|
19
|
-
private readonly client:
|
|
24
|
+
/** Class containing Partner operations. */
|
|
25
|
+
export class PartnerImpl implements Partner {
|
|
26
|
+
private readonly client: ACEProvisioningManagementPartnerAPI;
|
|
20
27
|
|
|
21
28
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
29
|
+
* Initialize a new instance of the class Partner class.
|
|
30
|
+
* @param client Reference to the service client
|
|
24
31
|
*/
|
|
25
|
-
constructor(client:
|
|
32
|
+
constructor(client: ACEProvisioningManagementPartnerAPI) {
|
|
26
33
|
this.client = client;
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
/**
|
|
30
37
|
* Get the management partner using the partnerId, objectId and tenantId.
|
|
31
|
-
* @summary Get a specific `Partner`.
|
|
32
38
|
* @param partnerId Id of the Partner
|
|
33
|
-
* @param
|
|
34
|
-
* @returns Promise<Models.PartnerGetResponse>
|
|
39
|
+
* @param options The options parameters.
|
|
35
40
|
*/
|
|
36
|
-
get(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*/
|
|
41
|
-
get(partnerId: string, callback: msRest.ServiceCallback<Models.PartnerResponse>): void;
|
|
42
|
-
/**
|
|
43
|
-
* @param partnerId Id of the Partner
|
|
44
|
-
* @param options The optional parameters
|
|
45
|
-
* @param callback The callback
|
|
46
|
-
*/
|
|
47
|
-
get(partnerId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PartnerResponse>): void;
|
|
48
|
-
get(partnerId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PartnerResponse>, callback?: msRest.ServiceCallback<Models.PartnerResponse>): Promise<Models.PartnerGetResponse> {
|
|
41
|
+
get(
|
|
42
|
+
partnerId: string,
|
|
43
|
+
options?: PartnerGetOptionalParams
|
|
44
|
+
): Promise<PartnerGetResponse> {
|
|
49
45
|
return this.client.sendOperationRequest(
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
getOperationSpec,
|
|
55
|
-
callback) as Promise<Models.PartnerGetResponse>;
|
|
46
|
+
{ partnerId, options },
|
|
47
|
+
getOperationSpec
|
|
48
|
+
);
|
|
56
49
|
}
|
|
57
50
|
|
|
58
51
|
/**
|
|
59
52
|
* Create a management partner for the objectId and tenantId.
|
|
60
|
-
* @summary Create a specific `Partner`.
|
|
61
53
|
* @param partnerId Id of the Partner
|
|
62
|
-
* @param
|
|
63
|
-
* @returns Promise<Models.PartnerCreateResponse>
|
|
54
|
+
* @param options The options parameters.
|
|
64
55
|
*/
|
|
65
|
-
create(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
*/
|
|
70
|
-
create(partnerId: string, callback: msRest.ServiceCallback<Models.PartnerResponse>): void;
|
|
71
|
-
/**
|
|
72
|
-
* @param partnerId Id of the Partner
|
|
73
|
-
* @param options The optional parameters
|
|
74
|
-
* @param callback The callback
|
|
75
|
-
*/
|
|
76
|
-
create(partnerId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PartnerResponse>): void;
|
|
77
|
-
create(partnerId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PartnerResponse>, callback?: msRest.ServiceCallback<Models.PartnerResponse>): Promise<Models.PartnerCreateResponse> {
|
|
56
|
+
create(
|
|
57
|
+
partnerId: string,
|
|
58
|
+
options?: PartnerCreateOptionalParams
|
|
59
|
+
): Promise<PartnerCreateResponse> {
|
|
78
60
|
return this.client.sendOperationRequest(
|
|
79
|
-
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
createOperationSpec,
|
|
84
|
-
callback) as Promise<Models.PartnerCreateResponse>;
|
|
61
|
+
{ partnerId, options },
|
|
62
|
+
createOperationSpec
|
|
63
|
+
);
|
|
85
64
|
}
|
|
86
65
|
|
|
87
66
|
/**
|
|
88
67
|
* Update the management partner for the objectId and tenantId.
|
|
89
|
-
* @summary Update a specific `Partner`.
|
|
90
|
-
* @param partnerId Id of the Partner
|
|
91
|
-
* @param [options] The optional parameters
|
|
92
|
-
* @returns Promise<Models.PartnerUpdateResponse>
|
|
93
|
-
*/
|
|
94
|
-
update(partnerId: string, options?: msRest.RequestOptionsBase): Promise<Models.PartnerUpdateResponse>;
|
|
95
|
-
/**
|
|
96
68
|
* @param partnerId Id of the Partner
|
|
97
|
-
* @param
|
|
69
|
+
* @param options The options parameters.
|
|
98
70
|
*/
|
|
99
|
-
update(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
* @param callback The callback
|
|
104
|
-
*/
|
|
105
|
-
update(partnerId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PartnerResponse>): void;
|
|
106
|
-
update(partnerId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PartnerResponse>, callback?: msRest.ServiceCallback<Models.PartnerResponse>): Promise<Models.PartnerUpdateResponse> {
|
|
71
|
+
update(
|
|
72
|
+
partnerId: string,
|
|
73
|
+
options?: PartnerUpdateOptionalParams
|
|
74
|
+
): Promise<PartnerUpdateResponse> {
|
|
107
75
|
return this.client.sendOperationRequest(
|
|
108
|
-
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
updateOperationSpec,
|
|
113
|
-
callback) as Promise<Models.PartnerUpdateResponse>;
|
|
76
|
+
{ partnerId, options },
|
|
77
|
+
updateOperationSpec
|
|
78
|
+
);
|
|
114
79
|
}
|
|
115
80
|
|
|
116
81
|
/**
|
|
117
82
|
* Delete the management partner for the objectId and tenantId.
|
|
118
|
-
* @summary Delete a specific `Partner`.
|
|
119
|
-
* @param partnerId Id of the Partner
|
|
120
|
-
* @param [options] The optional parameters
|
|
121
|
-
* @returns Promise<msRest.RestResponse>
|
|
122
|
-
*/
|
|
123
|
-
deleteMethod(partnerId: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
|
|
124
|
-
/**
|
|
125
|
-
* @param partnerId Id of the Partner
|
|
126
|
-
* @param callback The callback
|
|
127
|
-
*/
|
|
128
|
-
deleteMethod(partnerId: string, callback: msRest.ServiceCallback<void>): void;
|
|
129
|
-
/**
|
|
130
83
|
* @param partnerId Id of the Partner
|
|
131
|
-
* @param options The
|
|
132
|
-
* @param callback The callback
|
|
84
|
+
* @param options The options parameters.
|
|
133
85
|
*/
|
|
134
|
-
|
|
135
|
-
|
|
86
|
+
delete(
|
|
87
|
+
partnerId: string,
|
|
88
|
+
options?: PartnerDeleteOptionalParams
|
|
89
|
+
): Promise<void> {
|
|
136
90
|
return this.client.sendOperationRequest(
|
|
137
|
-
{
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
deleteMethodOperationSpec,
|
|
142
|
-
callback);
|
|
91
|
+
{ partnerId, options },
|
|
92
|
+
deleteOperationSpec
|
|
93
|
+
);
|
|
143
94
|
}
|
|
144
95
|
}
|
|
145
|
-
|
|
146
96
|
// Operation Specifications
|
|
147
|
-
const serializer =
|
|
148
|
-
|
|
97
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
98
|
+
|
|
99
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
100
|
+
path: "/providers/Microsoft.ManagementPartner/partners/{partnerId}",
|
|
149
101
|
httpMethod: "GET",
|
|
150
|
-
path: "providers/Microsoft.ManagementPartner/partners/{partnerId}",
|
|
151
|
-
urlParameters: [
|
|
152
|
-
Parameters.partnerId
|
|
153
|
-
],
|
|
154
|
-
queryParameters: [
|
|
155
|
-
Parameters.apiVersion
|
|
156
|
-
],
|
|
157
|
-
headerParameters: [
|
|
158
|
-
Parameters.acceptLanguage
|
|
159
|
-
],
|
|
160
102
|
responses: {
|
|
161
103
|
200: {
|
|
162
104
|
bodyMapper: Mappers.PartnerResponse
|
|
@@ -165,21 +107,14 @@ const getOperationSpec: msRest.OperationSpec = {
|
|
|
165
107
|
bodyMapper: Mappers.ErrorModel
|
|
166
108
|
}
|
|
167
109
|
},
|
|
110
|
+
queryParameters: [Parameters.apiVersion],
|
|
111
|
+
urlParameters: [Parameters.$host, Parameters.partnerId],
|
|
112
|
+
headerParameters: [Parameters.accept],
|
|
168
113
|
serializer
|
|
169
114
|
};
|
|
170
|
-
|
|
171
|
-
|
|
115
|
+
const createOperationSpec: coreClient.OperationSpec = {
|
|
116
|
+
path: "/providers/Microsoft.ManagementPartner/partners/{partnerId}",
|
|
172
117
|
httpMethod: "PUT",
|
|
173
|
-
path: "providers/Microsoft.ManagementPartner/partners/{partnerId}",
|
|
174
|
-
urlParameters: [
|
|
175
|
-
Parameters.partnerId
|
|
176
|
-
],
|
|
177
|
-
queryParameters: [
|
|
178
|
-
Parameters.apiVersion
|
|
179
|
-
],
|
|
180
|
-
headerParameters: [
|
|
181
|
-
Parameters.acceptLanguage
|
|
182
|
-
],
|
|
183
118
|
responses: {
|
|
184
119
|
200: {
|
|
185
120
|
bodyMapper: Mappers.PartnerResponse
|
|
@@ -188,21 +123,14 @@ const createOperationSpec: msRest.OperationSpec = {
|
|
|
188
123
|
bodyMapper: Mappers.ErrorModel
|
|
189
124
|
}
|
|
190
125
|
},
|
|
126
|
+
queryParameters: [Parameters.apiVersion],
|
|
127
|
+
urlParameters: [Parameters.$host, Parameters.partnerId],
|
|
128
|
+
headerParameters: [Parameters.accept],
|
|
191
129
|
serializer
|
|
192
130
|
};
|
|
193
|
-
|
|
194
|
-
|
|
131
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
132
|
+
path: "/providers/Microsoft.ManagementPartner/partners/{partnerId}",
|
|
195
133
|
httpMethod: "PATCH",
|
|
196
|
-
path: "providers/Microsoft.ManagementPartner/partners/{partnerId}",
|
|
197
|
-
urlParameters: [
|
|
198
|
-
Parameters.partnerId
|
|
199
|
-
],
|
|
200
|
-
queryParameters: [
|
|
201
|
-
Parameters.apiVersion
|
|
202
|
-
],
|
|
203
|
-
headerParameters: [
|
|
204
|
-
Parameters.acceptLanguage
|
|
205
|
-
],
|
|
206
134
|
responses: {
|
|
207
135
|
200: {
|
|
208
136
|
bodyMapper: Mappers.PartnerResponse
|
|
@@ -211,26 +139,22 @@ const updateOperationSpec: msRest.OperationSpec = {
|
|
|
211
139
|
bodyMapper: Mappers.ErrorModel
|
|
212
140
|
}
|
|
213
141
|
},
|
|
142
|
+
queryParameters: [Parameters.apiVersion],
|
|
143
|
+
urlParameters: [Parameters.$host, Parameters.partnerId],
|
|
144
|
+
headerParameters: [Parameters.accept],
|
|
214
145
|
serializer
|
|
215
146
|
};
|
|
216
|
-
|
|
217
|
-
|
|
147
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
148
|
+
path: "/providers/Microsoft.ManagementPartner/partners/{partnerId}",
|
|
218
149
|
httpMethod: "DELETE",
|
|
219
|
-
path: "providers/Microsoft.ManagementPartner/partners/{partnerId}",
|
|
220
|
-
urlParameters: [
|
|
221
|
-
Parameters.partnerId
|
|
222
|
-
],
|
|
223
|
-
queryParameters: [
|
|
224
|
-
Parameters.apiVersion
|
|
225
|
-
],
|
|
226
|
-
headerParameters: [
|
|
227
|
-
Parameters.acceptLanguage
|
|
228
|
-
],
|
|
229
150
|
responses: {
|
|
230
151
|
200: {},
|
|
231
152
|
default: {
|
|
232
153
|
bodyMapper: Mappers.ErrorModel
|
|
233
154
|
}
|
|
234
155
|
},
|
|
156
|
+
queryParameters: [Parameters.apiVersion],
|
|
157
|
+
urlParameters: [Parameters.$host, Parameters.partnerId],
|
|
158
|
+
headerParameters: [Parameters.accept],
|
|
235
159
|
serializer
|
|
236
160
|
};
|