@azure/arm-apicenter 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +1296 -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/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +58 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/servicesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/servicesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/servicesCreateOrUpdateSample.js +39 -0
- package/dist-esm/samples-dev/servicesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/servicesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/servicesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/servicesDeleteSample.js +39 -0
- package/dist-esm/samples-dev/servicesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/servicesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/servicesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/servicesGetSample.js +39 -0
- package/dist-esm/samples-dev/servicesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/servicesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/servicesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/servicesListByResourceGroupSample.js +59 -0
- package/dist-esm/samples-dev/servicesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/servicesListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/servicesListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/servicesListBySubscriptionSample.js +58 -0
- package/dist-esm/samples-dev/servicesListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/servicesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/servicesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/servicesUpdateSample.js +39 -0
- package/dist-esm/samples-dev/servicesUpdateSample.js.map +1 -0
- package/dist-esm/src/azureAPICenter.d.ts +21 -0
- package/dist-esm/src/azureAPICenter.d.ts.map +1 -0
- package/dist-esm/src/azureAPICenter.js +101 -0
- package/dist-esm/src/azureAPICenter.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +369 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +58 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +16 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +428 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +12 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +112 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +3 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +10 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +138 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/services.d.ts +81 -0
- package/dist-esm/src/operations/services.d.ts.map +1 -0
- package/dist-esm/src/operations/services.js +392 -0
- package/dist-esm/src/operations/services.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +10 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/services.d.ts +45 -0
- package/dist-esm/src/operationsInterfaces/services.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/services.js +9 -0
- package/dist-esm/src/operationsInterfaces/services.js.map +1 -0
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/apicenter_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/apicenter_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/apicenter_operations_test.spec.js +76 -0
- package/dist-esm/test/apicenter_operations_test.spec.js.map +1 -0
- package/package.json +121 -0
- package/review/arm-apicenter.api.md +274 -0
- package/rollup.config.js +122 -0
- package/src/azureAPICenter.ts +142 -0
- package/src/index.ts +13 -0
- package/src/models/index.ts +421 -0
- package/src/models/mappers.ts +451 -0
- package/src/models/parameters.ts +130 -0
- package/src/operations/index.ts +10 -0
- package/src/operations/operations.ts +149 -0
- package/src/operations/services.ts +472 -0
- package/src/operationsInterfaces/index.ts +10 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/services.ts +86 -0
- package/src/pagingHelper.ts +39 -0
- package/tsconfig.json +33 -0
- package/types/arm-apicenter.d.ts +494 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
+
import { Operations } from "../operationsInterfaces";
|
|
12
|
+
import * as coreClient from "@azure/core-client";
|
|
13
|
+
import * as Mappers from "../models/mappers";
|
|
14
|
+
import * as Parameters from "../models/parameters";
|
|
15
|
+
import { AzureAPICenter } from "../azureAPICenter";
|
|
16
|
+
import {
|
|
17
|
+
Operation,
|
|
18
|
+
OperationsListNextOptionalParams,
|
|
19
|
+
OperationsListOptionalParams,
|
|
20
|
+
OperationsListResponse,
|
|
21
|
+
OperationsListNextResponse
|
|
22
|
+
} from "../models";
|
|
23
|
+
|
|
24
|
+
/// <reference lib="esnext.asynciterable" />
|
|
25
|
+
/** Class containing Operations operations. */
|
|
26
|
+
export class OperationsImpl implements Operations {
|
|
27
|
+
private readonly client: AzureAPICenter;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Initialize a new instance of the class Operations class.
|
|
31
|
+
* @param client Reference to the service client
|
|
32
|
+
*/
|
|
33
|
+
constructor(client: AzureAPICenter) {
|
|
34
|
+
this.client = client;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* List the operations for the provider
|
|
39
|
+
* @param options The options parameters.
|
|
40
|
+
*/
|
|
41
|
+
public list(
|
|
42
|
+
options?: OperationsListOptionalParams
|
|
43
|
+
): PagedAsyncIterableIterator<Operation> {
|
|
44
|
+
const iter = this.listPagingAll(options);
|
|
45
|
+
return {
|
|
46
|
+
next() {
|
|
47
|
+
return iter.next();
|
|
48
|
+
},
|
|
49
|
+
[Symbol.asyncIterator]() {
|
|
50
|
+
return this;
|
|
51
|
+
},
|
|
52
|
+
byPage: (settings?: PageSettings) => {
|
|
53
|
+
if (settings?.maxPageSize) {
|
|
54
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
55
|
+
}
|
|
56
|
+
return this.listPagingPage(options, settings);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
private async *listPagingPage(
|
|
62
|
+
options?: OperationsListOptionalParams,
|
|
63
|
+
settings?: PageSettings
|
|
64
|
+
): AsyncIterableIterator<Operation[]> {
|
|
65
|
+
let result: OperationsListResponse;
|
|
66
|
+
let continuationToken = settings?.continuationToken;
|
|
67
|
+
if (!continuationToken) {
|
|
68
|
+
result = await this._list(options);
|
|
69
|
+
let page = result.value || [];
|
|
70
|
+
continuationToken = result.nextLink;
|
|
71
|
+
setContinuationToken(page, continuationToken);
|
|
72
|
+
yield page;
|
|
73
|
+
}
|
|
74
|
+
while (continuationToken) {
|
|
75
|
+
result = await this._listNext(continuationToken, options);
|
|
76
|
+
continuationToken = result.nextLink;
|
|
77
|
+
let page = result.value || [];
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
private async *listPagingAll(
|
|
84
|
+
options?: OperationsListOptionalParams
|
|
85
|
+
): AsyncIterableIterator<Operation> {
|
|
86
|
+
for await (const page of this.listPagingPage(options)) {
|
|
87
|
+
yield* page;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* List the operations for the provider
|
|
93
|
+
* @param options The options parameters.
|
|
94
|
+
*/
|
|
95
|
+
private _list(
|
|
96
|
+
options?: OperationsListOptionalParams
|
|
97
|
+
): Promise<OperationsListResponse> {
|
|
98
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* ListNext
|
|
103
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
104
|
+
* @param options The options parameters.
|
|
105
|
+
*/
|
|
106
|
+
private _listNext(
|
|
107
|
+
nextLink: string,
|
|
108
|
+
options?: OperationsListNextOptionalParams
|
|
109
|
+
): Promise<OperationsListNextResponse> {
|
|
110
|
+
return this.client.sendOperationRequest(
|
|
111
|
+
{ nextLink, options },
|
|
112
|
+
listNextOperationSpec
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// Operation Specifications
|
|
117
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
118
|
+
|
|
119
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
120
|
+
path: "/providers/Microsoft.ApiCenter/operations",
|
|
121
|
+
httpMethod: "GET",
|
|
122
|
+
responses: {
|
|
123
|
+
200: {
|
|
124
|
+
bodyMapper: Mappers.OperationListResult
|
|
125
|
+
},
|
|
126
|
+
default: {
|
|
127
|
+
bodyMapper: Mappers.ErrorResponse
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
queryParameters: [Parameters.apiVersion],
|
|
131
|
+
urlParameters: [Parameters.$host],
|
|
132
|
+
headerParameters: [Parameters.accept],
|
|
133
|
+
serializer
|
|
134
|
+
};
|
|
135
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
136
|
+
path: "{nextLink}",
|
|
137
|
+
httpMethod: "GET",
|
|
138
|
+
responses: {
|
|
139
|
+
200: {
|
|
140
|
+
bodyMapper: Mappers.OperationListResult
|
|
141
|
+
},
|
|
142
|
+
default: {
|
|
143
|
+
bodyMapper: Mappers.ErrorResponse
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
147
|
+
headerParameters: [Parameters.accept],
|
|
148
|
+
serializer
|
|
149
|
+
};
|
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
+
import { Services } from "../operationsInterfaces";
|
|
12
|
+
import * as coreClient from "@azure/core-client";
|
|
13
|
+
import * as Mappers from "../models/mappers";
|
|
14
|
+
import * as Parameters from "../models/parameters";
|
|
15
|
+
import { AzureAPICenter } from "../azureAPICenter";
|
|
16
|
+
import {
|
|
17
|
+
Service,
|
|
18
|
+
ServicesListBySubscriptionNextOptionalParams,
|
|
19
|
+
ServicesListBySubscriptionOptionalParams,
|
|
20
|
+
ServicesListBySubscriptionResponse,
|
|
21
|
+
ServicesListByResourceGroupNextOptionalParams,
|
|
22
|
+
ServicesListByResourceGroupOptionalParams,
|
|
23
|
+
ServicesListByResourceGroupResponse,
|
|
24
|
+
ServicesGetOptionalParams,
|
|
25
|
+
ServicesGetResponse,
|
|
26
|
+
ServicesCreateOrUpdateOptionalParams,
|
|
27
|
+
ServicesCreateOrUpdateResponse,
|
|
28
|
+
ServicesUpdateOptionalParams,
|
|
29
|
+
ServicesUpdateResponse,
|
|
30
|
+
ServicesDeleteOptionalParams,
|
|
31
|
+
ServicesListBySubscriptionNextResponse,
|
|
32
|
+
ServicesListByResourceGroupNextResponse
|
|
33
|
+
} from "../models";
|
|
34
|
+
|
|
35
|
+
/// <reference lib="esnext.asynciterable" />
|
|
36
|
+
/** Class containing Services operations. */
|
|
37
|
+
export class ServicesImpl implements Services {
|
|
38
|
+
private readonly client: AzureAPICenter;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Initialize a new instance of the class Services class.
|
|
42
|
+
* @param client Reference to the service client
|
|
43
|
+
*/
|
|
44
|
+
constructor(client: AzureAPICenter) {
|
|
45
|
+
this.client = client;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Lists services within an Azure subscription.
|
|
50
|
+
* @param options The options parameters.
|
|
51
|
+
*/
|
|
52
|
+
public listBySubscription(
|
|
53
|
+
options?: ServicesListBySubscriptionOptionalParams
|
|
54
|
+
): PagedAsyncIterableIterator<Service> {
|
|
55
|
+
const iter = this.listBySubscriptionPagingAll(options);
|
|
56
|
+
return {
|
|
57
|
+
next() {
|
|
58
|
+
return iter.next();
|
|
59
|
+
},
|
|
60
|
+
[Symbol.asyncIterator]() {
|
|
61
|
+
return this;
|
|
62
|
+
},
|
|
63
|
+
byPage: (settings?: PageSettings) => {
|
|
64
|
+
if (settings?.maxPageSize) {
|
|
65
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
66
|
+
}
|
|
67
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
private async *listBySubscriptionPagingPage(
|
|
73
|
+
options?: ServicesListBySubscriptionOptionalParams,
|
|
74
|
+
settings?: PageSettings
|
|
75
|
+
): AsyncIterableIterator<Service[]> {
|
|
76
|
+
let result: ServicesListBySubscriptionResponse;
|
|
77
|
+
let continuationToken = settings?.continuationToken;
|
|
78
|
+
if (!continuationToken) {
|
|
79
|
+
result = await this._listBySubscription(options);
|
|
80
|
+
let page = result.value || [];
|
|
81
|
+
continuationToken = result.nextLink;
|
|
82
|
+
setContinuationToken(page, continuationToken);
|
|
83
|
+
yield page;
|
|
84
|
+
}
|
|
85
|
+
while (continuationToken) {
|
|
86
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
87
|
+
continuationToken = result.nextLink;
|
|
88
|
+
let page = result.value || [];
|
|
89
|
+
setContinuationToken(page, continuationToken);
|
|
90
|
+
yield page;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
private async *listBySubscriptionPagingAll(
|
|
95
|
+
options?: ServicesListBySubscriptionOptionalParams
|
|
96
|
+
): AsyncIterableIterator<Service> {
|
|
97
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
98
|
+
yield* page;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Lists services within a resource group
|
|
104
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
105
|
+
* @param options The options parameters.
|
|
106
|
+
*/
|
|
107
|
+
public listByResourceGroup(
|
|
108
|
+
resourceGroupName: string,
|
|
109
|
+
options?: ServicesListByResourceGroupOptionalParams
|
|
110
|
+
): PagedAsyncIterableIterator<Service> {
|
|
111
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
112
|
+
return {
|
|
113
|
+
next() {
|
|
114
|
+
return iter.next();
|
|
115
|
+
},
|
|
116
|
+
[Symbol.asyncIterator]() {
|
|
117
|
+
return this;
|
|
118
|
+
},
|
|
119
|
+
byPage: (settings?: PageSettings) => {
|
|
120
|
+
if (settings?.maxPageSize) {
|
|
121
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
122
|
+
}
|
|
123
|
+
return this.listByResourceGroupPagingPage(
|
|
124
|
+
resourceGroupName,
|
|
125
|
+
options,
|
|
126
|
+
settings
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
private async *listByResourceGroupPagingPage(
|
|
133
|
+
resourceGroupName: string,
|
|
134
|
+
options?: ServicesListByResourceGroupOptionalParams,
|
|
135
|
+
settings?: PageSettings
|
|
136
|
+
): AsyncIterableIterator<Service[]> {
|
|
137
|
+
let result: ServicesListByResourceGroupResponse;
|
|
138
|
+
let continuationToken = settings?.continuationToken;
|
|
139
|
+
if (!continuationToken) {
|
|
140
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
141
|
+
let page = result.value || [];
|
|
142
|
+
continuationToken = result.nextLink;
|
|
143
|
+
setContinuationToken(page, continuationToken);
|
|
144
|
+
yield page;
|
|
145
|
+
}
|
|
146
|
+
while (continuationToken) {
|
|
147
|
+
result = await this._listByResourceGroupNext(
|
|
148
|
+
resourceGroupName,
|
|
149
|
+
continuationToken,
|
|
150
|
+
options
|
|
151
|
+
);
|
|
152
|
+
continuationToken = result.nextLink;
|
|
153
|
+
let page = result.value || [];
|
|
154
|
+
setContinuationToken(page, continuationToken);
|
|
155
|
+
yield page;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
private async *listByResourceGroupPagingAll(
|
|
160
|
+
resourceGroupName: string,
|
|
161
|
+
options?: ServicesListByResourceGroupOptionalParams
|
|
162
|
+
): AsyncIterableIterator<Service> {
|
|
163
|
+
for await (const page of this.listByResourceGroupPagingPage(
|
|
164
|
+
resourceGroupName,
|
|
165
|
+
options
|
|
166
|
+
)) {
|
|
167
|
+
yield* page;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Lists services within an Azure subscription.
|
|
173
|
+
* @param options The options parameters.
|
|
174
|
+
*/
|
|
175
|
+
private _listBySubscription(
|
|
176
|
+
options?: ServicesListBySubscriptionOptionalParams
|
|
177
|
+
): Promise<ServicesListBySubscriptionResponse> {
|
|
178
|
+
return this.client.sendOperationRequest(
|
|
179
|
+
{ options },
|
|
180
|
+
listBySubscriptionOperationSpec
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Lists services within a resource group
|
|
186
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
187
|
+
* @param options The options parameters.
|
|
188
|
+
*/
|
|
189
|
+
private _listByResourceGroup(
|
|
190
|
+
resourceGroupName: string,
|
|
191
|
+
options?: ServicesListByResourceGroupOptionalParams
|
|
192
|
+
): Promise<ServicesListByResourceGroupResponse> {
|
|
193
|
+
return this.client.sendOperationRequest(
|
|
194
|
+
{ resourceGroupName, options },
|
|
195
|
+
listByResourceGroupOperationSpec
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Get service
|
|
201
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
202
|
+
* @param serviceName Service name
|
|
203
|
+
* @param options The options parameters.
|
|
204
|
+
*/
|
|
205
|
+
get(
|
|
206
|
+
resourceGroupName: string,
|
|
207
|
+
serviceName: string,
|
|
208
|
+
options?: ServicesGetOptionalParams
|
|
209
|
+
): Promise<ServicesGetResponse> {
|
|
210
|
+
return this.client.sendOperationRequest(
|
|
211
|
+
{ resourceGroupName, serviceName, options },
|
|
212
|
+
getOperationSpec
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Create or update service
|
|
218
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
219
|
+
* @param serviceName Service name
|
|
220
|
+
* @param options The options parameters.
|
|
221
|
+
*/
|
|
222
|
+
createOrUpdate(
|
|
223
|
+
resourceGroupName: string,
|
|
224
|
+
serviceName: string,
|
|
225
|
+
options?: ServicesCreateOrUpdateOptionalParams
|
|
226
|
+
): Promise<ServicesCreateOrUpdateResponse> {
|
|
227
|
+
return this.client.sendOperationRequest(
|
|
228
|
+
{ resourceGroupName, serviceName, options },
|
|
229
|
+
createOrUpdateOperationSpec
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Update service
|
|
235
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
236
|
+
* @param serviceName Service name
|
|
237
|
+
* @param options The options parameters.
|
|
238
|
+
*/
|
|
239
|
+
update(
|
|
240
|
+
resourceGroupName: string,
|
|
241
|
+
serviceName: string,
|
|
242
|
+
options?: ServicesUpdateOptionalParams
|
|
243
|
+
): Promise<ServicesUpdateResponse> {
|
|
244
|
+
return this.client.sendOperationRequest(
|
|
245
|
+
{ resourceGroupName, serviceName, options },
|
|
246
|
+
updateOperationSpec
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Delete service
|
|
252
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
253
|
+
* @param serviceName Service name
|
|
254
|
+
* @param options The options parameters.
|
|
255
|
+
*/
|
|
256
|
+
delete(
|
|
257
|
+
resourceGroupName: string,
|
|
258
|
+
serviceName: string,
|
|
259
|
+
options?: ServicesDeleteOptionalParams
|
|
260
|
+
): Promise<void> {
|
|
261
|
+
return this.client.sendOperationRequest(
|
|
262
|
+
{ resourceGroupName, serviceName, options },
|
|
263
|
+
deleteOperationSpec
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* ListBySubscriptionNext
|
|
269
|
+
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
|
270
|
+
* @param options The options parameters.
|
|
271
|
+
*/
|
|
272
|
+
private _listBySubscriptionNext(
|
|
273
|
+
nextLink: string,
|
|
274
|
+
options?: ServicesListBySubscriptionNextOptionalParams
|
|
275
|
+
): Promise<ServicesListBySubscriptionNextResponse> {
|
|
276
|
+
return this.client.sendOperationRequest(
|
|
277
|
+
{ nextLink, options },
|
|
278
|
+
listBySubscriptionNextOperationSpec
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* ListByResourceGroupNext
|
|
284
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
285
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
286
|
+
* @param options The options parameters.
|
|
287
|
+
*/
|
|
288
|
+
private _listByResourceGroupNext(
|
|
289
|
+
resourceGroupName: string,
|
|
290
|
+
nextLink: string,
|
|
291
|
+
options?: ServicesListByResourceGroupNextOptionalParams
|
|
292
|
+
): Promise<ServicesListByResourceGroupNextResponse> {
|
|
293
|
+
return this.client.sendOperationRequest(
|
|
294
|
+
{ resourceGroupName, nextLink, options },
|
|
295
|
+
listByResourceGroupNextOperationSpec
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
// Operation Specifications
|
|
300
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
301
|
+
|
|
302
|
+
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
|
303
|
+
path:
|
|
304
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.ApiCenter/services",
|
|
305
|
+
httpMethod: "GET",
|
|
306
|
+
responses: {
|
|
307
|
+
200: {
|
|
308
|
+
bodyMapper: Mappers.ServiceCollection
|
|
309
|
+
},
|
|
310
|
+
default: {
|
|
311
|
+
bodyMapper: Mappers.ErrorResponse
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
queryParameters: [Parameters.apiVersion],
|
|
315
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
316
|
+
headerParameters: [Parameters.accept],
|
|
317
|
+
serializer
|
|
318
|
+
};
|
|
319
|
+
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
320
|
+
path:
|
|
321
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services",
|
|
322
|
+
httpMethod: "GET",
|
|
323
|
+
responses: {
|
|
324
|
+
200: {
|
|
325
|
+
bodyMapper: Mappers.ServiceCollection
|
|
326
|
+
},
|
|
327
|
+
default: {
|
|
328
|
+
bodyMapper: Mappers.ErrorResponse
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
queryParameters: [Parameters.apiVersion],
|
|
332
|
+
urlParameters: [
|
|
333
|
+
Parameters.$host,
|
|
334
|
+
Parameters.subscriptionId,
|
|
335
|
+
Parameters.resourceGroupName
|
|
336
|
+
],
|
|
337
|
+
headerParameters: [Parameters.accept],
|
|
338
|
+
serializer
|
|
339
|
+
};
|
|
340
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
341
|
+
path:
|
|
342
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}",
|
|
343
|
+
httpMethod: "GET",
|
|
344
|
+
responses: {
|
|
345
|
+
200: {
|
|
346
|
+
bodyMapper: Mappers.Service
|
|
347
|
+
},
|
|
348
|
+
default: {
|
|
349
|
+
bodyMapper: Mappers.ErrorResponse
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
queryParameters: [Parameters.apiVersion],
|
|
353
|
+
urlParameters: [
|
|
354
|
+
Parameters.$host,
|
|
355
|
+
Parameters.subscriptionId,
|
|
356
|
+
Parameters.resourceGroupName,
|
|
357
|
+
Parameters.serviceName
|
|
358
|
+
],
|
|
359
|
+
headerParameters: [Parameters.accept],
|
|
360
|
+
serializer
|
|
361
|
+
};
|
|
362
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
363
|
+
path:
|
|
364
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}",
|
|
365
|
+
httpMethod: "PUT",
|
|
366
|
+
responses: {
|
|
367
|
+
200: {
|
|
368
|
+
bodyMapper: Mappers.Service
|
|
369
|
+
},
|
|
370
|
+
201: {
|
|
371
|
+
bodyMapper: Mappers.Service
|
|
372
|
+
},
|
|
373
|
+
default: {
|
|
374
|
+
bodyMapper: Mappers.ErrorResponse
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
requestBody: Parameters.resource,
|
|
378
|
+
queryParameters: [Parameters.apiVersion],
|
|
379
|
+
urlParameters: [
|
|
380
|
+
Parameters.$host,
|
|
381
|
+
Parameters.subscriptionId,
|
|
382
|
+
Parameters.resourceGroupName,
|
|
383
|
+
Parameters.serviceName
|
|
384
|
+
],
|
|
385
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
386
|
+
mediaType: "json",
|
|
387
|
+
serializer
|
|
388
|
+
};
|
|
389
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
390
|
+
path:
|
|
391
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}",
|
|
392
|
+
httpMethod: "PATCH",
|
|
393
|
+
responses: {
|
|
394
|
+
200: {
|
|
395
|
+
bodyMapper: Mappers.Service
|
|
396
|
+
},
|
|
397
|
+
default: {
|
|
398
|
+
bodyMapper: Mappers.ErrorResponse
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
requestBody: Parameters.parameters,
|
|
402
|
+
queryParameters: [Parameters.apiVersion],
|
|
403
|
+
urlParameters: [
|
|
404
|
+
Parameters.$host,
|
|
405
|
+
Parameters.subscriptionId,
|
|
406
|
+
Parameters.resourceGroupName,
|
|
407
|
+
Parameters.serviceName
|
|
408
|
+
],
|
|
409
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
410
|
+
mediaType: "json",
|
|
411
|
+
serializer
|
|
412
|
+
};
|
|
413
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
414
|
+
path:
|
|
415
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}",
|
|
416
|
+
httpMethod: "DELETE",
|
|
417
|
+
responses: {
|
|
418
|
+
200: {},
|
|
419
|
+
204: {},
|
|
420
|
+
default: {
|
|
421
|
+
bodyMapper: Mappers.ErrorResponse
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
queryParameters: [Parameters.apiVersion],
|
|
425
|
+
urlParameters: [
|
|
426
|
+
Parameters.$host,
|
|
427
|
+
Parameters.subscriptionId,
|
|
428
|
+
Parameters.resourceGroupName,
|
|
429
|
+
Parameters.serviceName
|
|
430
|
+
],
|
|
431
|
+
headerParameters: [Parameters.accept],
|
|
432
|
+
serializer
|
|
433
|
+
};
|
|
434
|
+
const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
435
|
+
path: "{nextLink}",
|
|
436
|
+
httpMethod: "GET",
|
|
437
|
+
responses: {
|
|
438
|
+
200: {
|
|
439
|
+
bodyMapper: Mappers.ServiceCollection
|
|
440
|
+
},
|
|
441
|
+
default: {
|
|
442
|
+
bodyMapper: Mappers.ErrorResponse
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
urlParameters: [
|
|
446
|
+
Parameters.$host,
|
|
447
|
+
Parameters.nextLink,
|
|
448
|
+
Parameters.subscriptionId
|
|
449
|
+
],
|
|
450
|
+
headerParameters: [Parameters.accept],
|
|
451
|
+
serializer
|
|
452
|
+
};
|
|
453
|
+
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
454
|
+
path: "{nextLink}",
|
|
455
|
+
httpMethod: "GET",
|
|
456
|
+
responses: {
|
|
457
|
+
200: {
|
|
458
|
+
bodyMapper: Mappers.ServiceCollection
|
|
459
|
+
},
|
|
460
|
+
default: {
|
|
461
|
+
bodyMapper: Mappers.ErrorResponse
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
urlParameters: [
|
|
465
|
+
Parameters.$host,
|
|
466
|
+
Parameters.nextLink,
|
|
467
|
+
Parameters.subscriptionId,
|
|
468
|
+
Parameters.resourceGroupName
|
|
469
|
+
],
|
|
470
|
+
headerParameters: [Parameters.accept],
|
|
471
|
+
serializer
|
|
472
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export * from "./operations";
|
|
10
|
+
export * from "./services";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Operation, OperationsListOptionalParams } from "../models";
|
|
11
|
+
|
|
12
|
+
/// <reference lib="esnext.asynciterable" />
|
|
13
|
+
/** Interface representing a Operations. */
|
|
14
|
+
export interface Operations {
|
|
15
|
+
/**
|
|
16
|
+
* List the operations for the provider
|
|
17
|
+
* @param options The options parameters.
|
|
18
|
+
*/
|
|
19
|
+
list(
|
|
20
|
+
options?: OperationsListOptionalParams
|
|
21
|
+
): PagedAsyncIterableIterator<Operation>;
|
|
22
|
+
}
|