@azure/arm-servicenetworking 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 +2566 -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/associationsInterfaceCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/associationsInterfaceCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/associationsInterfaceCreateOrUpdateSample.js +44 -0
- package/dist-esm/samples-dev/associationsInterfaceCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/associationsInterfaceDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/associationsInterfaceDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/associationsInterfaceDeleteSample.js +39 -0
- package/dist-esm/samples-dev/associationsInterfaceDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/associationsInterfaceGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/associationsInterfaceGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/associationsInterfaceGetSample.js +39 -0
- package/dist-esm/samples-dev/associationsInterfaceGetSample.js.map +1 -0
- package/dist-esm/samples-dev/associationsInterfaceListByTrafficControllerSample.d.ts +2 -0
- package/dist-esm/samples-dev/associationsInterfaceListByTrafficControllerSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/associationsInterfaceListByTrafficControllerSample.js +52 -0
- package/dist-esm/samples-dev/associationsInterfaceListByTrafficControllerSample.js.map +1 -0
- package/dist-esm/samples-dev/associationsInterfaceUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/associationsInterfaceUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/associationsInterfaceUpdateSample.js +42 -0
- package/dist-esm/samples-dev/associationsInterfaceUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/frontendsInterfaceCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/frontendsInterfaceCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/frontendsInterfaceCreateOrUpdateSample.js +45 -0
- package/dist-esm/samples-dev/frontendsInterfaceCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/frontendsInterfaceDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/frontendsInterfaceDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/frontendsInterfaceDeleteSample.js +39 -0
- package/dist-esm/samples-dev/frontendsInterfaceDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/frontendsInterfaceGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/frontendsInterfaceGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/frontendsInterfaceGetSample.js +39 -0
- package/dist-esm/samples-dev/frontendsInterfaceGetSample.js.map +1 -0
- package/dist-esm/samples-dev/frontendsInterfaceListByTrafficControllerSample.d.ts +2 -0
- package/dist-esm/samples-dev/frontendsInterfaceListByTrafficControllerSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/frontendsInterfaceListByTrafficControllerSample.js +52 -0
- package/dist-esm/samples-dev/frontendsInterfaceListByTrafficControllerSample.js.map +1 -0
- package/dist-esm/samples-dev/frontendsInterfaceUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/frontendsInterfaceUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/frontendsInterfaceUpdateSample.js +46 -0
- package/dist-esm/samples-dev/frontendsInterfaceUpdateSample.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 +51 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceCreateOrUpdateSample.js +42 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceDeleteSample.js +38 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceGetSample.js +38 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceGetSample.js.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceListByResourceGroupSample.js +51 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceListBySubscriptionSample.js +50 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceUpdateSample.js +43 -0
- package/dist-esm/samples-dev/trafficControllerInterfaceUpdateSample.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +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/dist-esm/src/models/index.d.ts +541 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +54 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +31 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +760 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +18 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +154 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/associationsInterface.d.ts +91 -0
- package/dist-esm/src/operations/associationsInterface.d.ts.map +1 -0
- package/dist-esm/src/operations/associationsInterface.js +396 -0
- package/dist-esm/src/operations/associationsInterface.js.map +1 -0
- package/dist-esm/src/operations/frontendsInterface.d.ts +91 -0
- package/dist-esm/src/operations/frontendsInterface.d.ts.map +1 -0
- package/dist-esm/src/operations/frontendsInterface.js +396 -0
- package/dist-esm/src/operations/frontendsInterface.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +5 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +12 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +131 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/trafficControllerInterface.d.ts +99 -0
- package/dist-esm/src/operations/trafficControllerInterface.d.ts.map +1 -0
- package/dist-esm/src/operations/trafficControllerInterface.js +477 -0
- package/dist-esm/src/operations/trafficControllerInterface.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/associationsInterface.d.ts +65 -0
- package/dist-esm/src/operationsInterfaces/associationsInterface.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/associationsInterface.js +9 -0
- package/dist-esm/src/operationsInterfaces/associationsInterface.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/frontendsInterface.d.ts +65 -0
- package/dist-esm/src/operationsInterfaces/frontendsInterface.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/frontendsInterface.js +9 -0
- package/dist-esm/src/operationsInterfaces/frontendsInterface.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +12 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/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/trafficControllerInterface.d.ts +63 -0
- package/dist-esm/src/operationsInterfaces/trafficControllerInterface.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/trafficControllerInterface.js +9 -0
- package/dist-esm/src/operationsInterfaces/trafficControllerInterface.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/src/serviceNetworkingManagementClient.d.ts +23 -0
- package/dist-esm/src/serviceNetworkingManagementClient.d.ts.map +1 -0
- package/dist-esm/src/serviceNetworkingManagementClient.js +103 -0
- package/dist-esm/src/serviceNetworkingManagementClient.js.map +1 -0
- package/dist-esm/test/servicenetworking_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/servicenetworking_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/servicenetworking_operations_test.spec.js +107 -0
- package/dist-esm/test/servicenetworking_operations_test.spec.js.map +1 -0
- package/package.json +123 -0
- package/review/arm-servicenetworking.api.md +484 -0
- package/rollup.config.js +122 -0
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +626 -0
- package/src/models/mappers.ts +811 -0
- package/src/models/parameters.ts +182 -0
- package/src/operations/associationsInterface.ts +557 -0
- package/src/operations/frontendsInterface.ts +557 -0
- package/src/operations/index.ts +12 -0
- package/src/operations/operations.ts +149 -0
- package/src/operations/trafficControllerInterface.ts +628 -0
- package/src/operationsInterfaces/associationsInterface.ts +127 -0
- package/src/operationsInterfaces/frontendsInterface.ts +127 -0
- package/src/operationsInterfaces/index.ts +12 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/trafficControllerInterface.ts +121 -0
- package/src/pagingHelper.ts +39 -0
- package/src/serviceNetworkingManagementClient.ts +156 -0
- package/tsconfig.json +33 -0
- package/types/arm-servicenetworking.d.ts +847 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,557 @@
|
|
|
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 { FrontendsInterface } 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 { ServiceNetworkingManagementClient } from "../serviceNetworkingManagementClient";
|
|
16
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
17
|
+
import { LroImpl } from "../lroImpl";
|
|
18
|
+
import {
|
|
19
|
+
Frontend,
|
|
20
|
+
FrontendsInterfaceListByTrafficControllerNextOptionalParams,
|
|
21
|
+
FrontendsInterfaceListByTrafficControllerOptionalParams,
|
|
22
|
+
FrontendsInterfaceListByTrafficControllerResponse,
|
|
23
|
+
FrontendsInterfaceGetOptionalParams,
|
|
24
|
+
FrontendsInterfaceGetResponse,
|
|
25
|
+
FrontendsInterfaceCreateOrUpdateOptionalParams,
|
|
26
|
+
FrontendsInterfaceCreateOrUpdateResponse,
|
|
27
|
+
FrontendUpdate,
|
|
28
|
+
FrontendsInterfaceUpdateOptionalParams,
|
|
29
|
+
FrontendsInterfaceUpdateResponse,
|
|
30
|
+
FrontendsInterfaceDeleteOptionalParams,
|
|
31
|
+
FrontendsInterfaceListByTrafficControllerNextResponse
|
|
32
|
+
} from "../models";
|
|
33
|
+
|
|
34
|
+
/// <reference lib="esnext.asynciterable" />
|
|
35
|
+
/** Class containing FrontendsInterface operations. */
|
|
36
|
+
export class FrontendsInterfaceImpl implements FrontendsInterface {
|
|
37
|
+
private readonly client: ServiceNetworkingManagementClient;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Initialize a new instance of the class FrontendsInterface class.
|
|
41
|
+
* @param client Reference to the service client
|
|
42
|
+
*/
|
|
43
|
+
constructor(client: ServiceNetworkingManagementClient) {
|
|
44
|
+
this.client = client;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* List Frontend resources by TrafficController
|
|
49
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
50
|
+
* @param trafficControllerName traffic controller name for path
|
|
51
|
+
* @param options The options parameters.
|
|
52
|
+
*/
|
|
53
|
+
public listByTrafficController(
|
|
54
|
+
resourceGroupName: string,
|
|
55
|
+
trafficControllerName: string,
|
|
56
|
+
options?: FrontendsInterfaceListByTrafficControllerOptionalParams
|
|
57
|
+
): PagedAsyncIterableIterator<Frontend> {
|
|
58
|
+
const iter = this.listByTrafficControllerPagingAll(
|
|
59
|
+
resourceGroupName,
|
|
60
|
+
trafficControllerName,
|
|
61
|
+
options
|
|
62
|
+
);
|
|
63
|
+
return {
|
|
64
|
+
next() {
|
|
65
|
+
return iter.next();
|
|
66
|
+
},
|
|
67
|
+
[Symbol.asyncIterator]() {
|
|
68
|
+
return this;
|
|
69
|
+
},
|
|
70
|
+
byPage: (settings?: PageSettings) => {
|
|
71
|
+
if (settings?.maxPageSize) {
|
|
72
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
73
|
+
}
|
|
74
|
+
return this.listByTrafficControllerPagingPage(
|
|
75
|
+
resourceGroupName,
|
|
76
|
+
trafficControllerName,
|
|
77
|
+
options,
|
|
78
|
+
settings
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
private async *listByTrafficControllerPagingPage(
|
|
85
|
+
resourceGroupName: string,
|
|
86
|
+
trafficControllerName: string,
|
|
87
|
+
options?: FrontendsInterfaceListByTrafficControllerOptionalParams,
|
|
88
|
+
settings?: PageSettings
|
|
89
|
+
): AsyncIterableIterator<Frontend[]> {
|
|
90
|
+
let result: FrontendsInterfaceListByTrafficControllerResponse;
|
|
91
|
+
let continuationToken = settings?.continuationToken;
|
|
92
|
+
if (!continuationToken) {
|
|
93
|
+
result = await this._listByTrafficController(
|
|
94
|
+
resourceGroupName,
|
|
95
|
+
trafficControllerName,
|
|
96
|
+
options
|
|
97
|
+
);
|
|
98
|
+
let page = result.value || [];
|
|
99
|
+
continuationToken = result.nextLink;
|
|
100
|
+
setContinuationToken(page, continuationToken);
|
|
101
|
+
yield page;
|
|
102
|
+
}
|
|
103
|
+
while (continuationToken) {
|
|
104
|
+
result = await this._listByTrafficControllerNext(
|
|
105
|
+
resourceGroupName,
|
|
106
|
+
trafficControllerName,
|
|
107
|
+
continuationToken,
|
|
108
|
+
options
|
|
109
|
+
);
|
|
110
|
+
continuationToken = result.nextLink;
|
|
111
|
+
let page = result.value || [];
|
|
112
|
+
setContinuationToken(page, continuationToken);
|
|
113
|
+
yield page;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private async *listByTrafficControllerPagingAll(
|
|
118
|
+
resourceGroupName: string,
|
|
119
|
+
trafficControllerName: string,
|
|
120
|
+
options?: FrontendsInterfaceListByTrafficControllerOptionalParams
|
|
121
|
+
): AsyncIterableIterator<Frontend> {
|
|
122
|
+
for await (const page of this.listByTrafficControllerPagingPage(
|
|
123
|
+
resourceGroupName,
|
|
124
|
+
trafficControllerName,
|
|
125
|
+
options
|
|
126
|
+
)) {
|
|
127
|
+
yield* page;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* List Frontend resources by TrafficController
|
|
133
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
134
|
+
* @param trafficControllerName traffic controller name for path
|
|
135
|
+
* @param options The options parameters.
|
|
136
|
+
*/
|
|
137
|
+
private _listByTrafficController(
|
|
138
|
+
resourceGroupName: string,
|
|
139
|
+
trafficControllerName: string,
|
|
140
|
+
options?: FrontendsInterfaceListByTrafficControllerOptionalParams
|
|
141
|
+
): Promise<FrontendsInterfaceListByTrafficControllerResponse> {
|
|
142
|
+
return this.client.sendOperationRequest(
|
|
143
|
+
{ resourceGroupName, trafficControllerName, options },
|
|
144
|
+
listByTrafficControllerOperationSpec
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Get a Traffic Controller Frontend
|
|
150
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
151
|
+
* @param trafficControllerName traffic controller name for path
|
|
152
|
+
* @param frontendName Frontends
|
|
153
|
+
* @param options The options parameters.
|
|
154
|
+
*/
|
|
155
|
+
get(
|
|
156
|
+
resourceGroupName: string,
|
|
157
|
+
trafficControllerName: string,
|
|
158
|
+
frontendName: string,
|
|
159
|
+
options?: FrontendsInterfaceGetOptionalParams
|
|
160
|
+
): Promise<FrontendsInterfaceGetResponse> {
|
|
161
|
+
return this.client.sendOperationRequest(
|
|
162
|
+
{ resourceGroupName, trafficControllerName, frontendName, options },
|
|
163
|
+
getOperationSpec
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Create a Traffic Controller Frontend
|
|
169
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
170
|
+
* @param trafficControllerName traffic controller name for path
|
|
171
|
+
* @param frontendName Frontends
|
|
172
|
+
* @param resource Resource create parameters.
|
|
173
|
+
* @param options The options parameters.
|
|
174
|
+
*/
|
|
175
|
+
async beginCreateOrUpdate(
|
|
176
|
+
resourceGroupName: string,
|
|
177
|
+
trafficControllerName: string,
|
|
178
|
+
frontendName: string,
|
|
179
|
+
resource: Frontend,
|
|
180
|
+
options?: FrontendsInterfaceCreateOrUpdateOptionalParams
|
|
181
|
+
): Promise<
|
|
182
|
+
PollerLike<
|
|
183
|
+
PollOperationState<FrontendsInterfaceCreateOrUpdateResponse>,
|
|
184
|
+
FrontendsInterfaceCreateOrUpdateResponse
|
|
185
|
+
>
|
|
186
|
+
> {
|
|
187
|
+
const directSendOperation = async (
|
|
188
|
+
args: coreClient.OperationArguments,
|
|
189
|
+
spec: coreClient.OperationSpec
|
|
190
|
+
): Promise<FrontendsInterfaceCreateOrUpdateResponse> => {
|
|
191
|
+
return this.client.sendOperationRequest(args, spec);
|
|
192
|
+
};
|
|
193
|
+
const sendOperation = async (
|
|
194
|
+
args: coreClient.OperationArguments,
|
|
195
|
+
spec: coreClient.OperationSpec
|
|
196
|
+
) => {
|
|
197
|
+
let currentRawResponse:
|
|
198
|
+
| coreClient.FullOperationResponse
|
|
199
|
+
| undefined = undefined;
|
|
200
|
+
const providedCallback = args.options?.onResponse;
|
|
201
|
+
const callback: coreClient.RawResponseCallback = (
|
|
202
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
203
|
+
flatResponse: unknown
|
|
204
|
+
) => {
|
|
205
|
+
currentRawResponse = rawResponse;
|
|
206
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
207
|
+
};
|
|
208
|
+
const updatedArgs = {
|
|
209
|
+
...args,
|
|
210
|
+
options: {
|
|
211
|
+
...args.options,
|
|
212
|
+
onResponse: callback
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
216
|
+
return {
|
|
217
|
+
flatResponse,
|
|
218
|
+
rawResponse: {
|
|
219
|
+
statusCode: currentRawResponse!.status,
|
|
220
|
+
body: currentRawResponse!.parsedBody,
|
|
221
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
const lro = new LroImpl(
|
|
227
|
+
sendOperation,
|
|
228
|
+
{
|
|
229
|
+
resourceGroupName,
|
|
230
|
+
trafficControllerName,
|
|
231
|
+
frontendName,
|
|
232
|
+
resource,
|
|
233
|
+
options
|
|
234
|
+
},
|
|
235
|
+
createOrUpdateOperationSpec
|
|
236
|
+
);
|
|
237
|
+
const poller = new LroEngine(lro, {
|
|
238
|
+
resumeFrom: options?.resumeFrom,
|
|
239
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
240
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
241
|
+
});
|
|
242
|
+
await poller.poll();
|
|
243
|
+
return poller;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Create a Traffic Controller Frontend
|
|
248
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
249
|
+
* @param trafficControllerName traffic controller name for path
|
|
250
|
+
* @param frontendName Frontends
|
|
251
|
+
* @param resource Resource create parameters.
|
|
252
|
+
* @param options The options parameters.
|
|
253
|
+
*/
|
|
254
|
+
async beginCreateOrUpdateAndWait(
|
|
255
|
+
resourceGroupName: string,
|
|
256
|
+
trafficControllerName: string,
|
|
257
|
+
frontendName: string,
|
|
258
|
+
resource: Frontend,
|
|
259
|
+
options?: FrontendsInterfaceCreateOrUpdateOptionalParams
|
|
260
|
+
): Promise<FrontendsInterfaceCreateOrUpdateResponse> {
|
|
261
|
+
const poller = await this.beginCreateOrUpdate(
|
|
262
|
+
resourceGroupName,
|
|
263
|
+
trafficControllerName,
|
|
264
|
+
frontendName,
|
|
265
|
+
resource,
|
|
266
|
+
options
|
|
267
|
+
);
|
|
268
|
+
return poller.pollUntilDone();
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Update a Traffic Controller Frontend
|
|
273
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
274
|
+
* @param trafficControllerName traffic controller name for path
|
|
275
|
+
* @param frontendName Frontends
|
|
276
|
+
* @param properties The resource properties to be updated.
|
|
277
|
+
* @param options The options parameters.
|
|
278
|
+
*/
|
|
279
|
+
update(
|
|
280
|
+
resourceGroupName: string,
|
|
281
|
+
trafficControllerName: string,
|
|
282
|
+
frontendName: string,
|
|
283
|
+
properties: FrontendUpdate,
|
|
284
|
+
options?: FrontendsInterfaceUpdateOptionalParams
|
|
285
|
+
): Promise<FrontendsInterfaceUpdateResponse> {
|
|
286
|
+
return this.client.sendOperationRequest(
|
|
287
|
+
{
|
|
288
|
+
resourceGroupName,
|
|
289
|
+
trafficControllerName,
|
|
290
|
+
frontendName,
|
|
291
|
+
properties,
|
|
292
|
+
options
|
|
293
|
+
},
|
|
294
|
+
updateOperationSpec
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Delete a Traffic Controller Frontend
|
|
300
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
301
|
+
* @param trafficControllerName traffic controller name for path
|
|
302
|
+
* @param frontendName Frontends
|
|
303
|
+
* @param options The options parameters.
|
|
304
|
+
*/
|
|
305
|
+
async beginDelete(
|
|
306
|
+
resourceGroupName: string,
|
|
307
|
+
trafficControllerName: string,
|
|
308
|
+
frontendName: string,
|
|
309
|
+
options?: FrontendsInterfaceDeleteOptionalParams
|
|
310
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
311
|
+
const directSendOperation = async (
|
|
312
|
+
args: coreClient.OperationArguments,
|
|
313
|
+
spec: coreClient.OperationSpec
|
|
314
|
+
): Promise<void> => {
|
|
315
|
+
return this.client.sendOperationRequest(args, spec);
|
|
316
|
+
};
|
|
317
|
+
const sendOperation = async (
|
|
318
|
+
args: coreClient.OperationArguments,
|
|
319
|
+
spec: coreClient.OperationSpec
|
|
320
|
+
) => {
|
|
321
|
+
let currentRawResponse:
|
|
322
|
+
| coreClient.FullOperationResponse
|
|
323
|
+
| undefined = undefined;
|
|
324
|
+
const providedCallback = args.options?.onResponse;
|
|
325
|
+
const callback: coreClient.RawResponseCallback = (
|
|
326
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
327
|
+
flatResponse: unknown
|
|
328
|
+
) => {
|
|
329
|
+
currentRawResponse = rawResponse;
|
|
330
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
331
|
+
};
|
|
332
|
+
const updatedArgs = {
|
|
333
|
+
...args,
|
|
334
|
+
options: {
|
|
335
|
+
...args.options,
|
|
336
|
+
onResponse: callback
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
340
|
+
return {
|
|
341
|
+
flatResponse,
|
|
342
|
+
rawResponse: {
|
|
343
|
+
statusCode: currentRawResponse!.status,
|
|
344
|
+
body: currentRawResponse!.parsedBody,
|
|
345
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
const lro = new LroImpl(
|
|
351
|
+
sendOperation,
|
|
352
|
+
{ resourceGroupName, trafficControllerName, frontendName, options },
|
|
353
|
+
deleteOperationSpec
|
|
354
|
+
);
|
|
355
|
+
const poller = new LroEngine(lro, {
|
|
356
|
+
resumeFrom: options?.resumeFrom,
|
|
357
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
358
|
+
lroResourceLocationConfig: "location"
|
|
359
|
+
});
|
|
360
|
+
await poller.poll();
|
|
361
|
+
return poller;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Delete a Traffic Controller Frontend
|
|
366
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
367
|
+
* @param trafficControllerName traffic controller name for path
|
|
368
|
+
* @param frontendName Frontends
|
|
369
|
+
* @param options The options parameters.
|
|
370
|
+
*/
|
|
371
|
+
async beginDeleteAndWait(
|
|
372
|
+
resourceGroupName: string,
|
|
373
|
+
trafficControllerName: string,
|
|
374
|
+
frontendName: string,
|
|
375
|
+
options?: FrontendsInterfaceDeleteOptionalParams
|
|
376
|
+
): Promise<void> {
|
|
377
|
+
const poller = await this.beginDelete(
|
|
378
|
+
resourceGroupName,
|
|
379
|
+
trafficControllerName,
|
|
380
|
+
frontendName,
|
|
381
|
+
options
|
|
382
|
+
);
|
|
383
|
+
return poller.pollUntilDone();
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* ListByTrafficControllerNext
|
|
388
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
389
|
+
* @param trafficControllerName traffic controller name for path
|
|
390
|
+
* @param nextLink The nextLink from the previous successful call to the ListByTrafficController
|
|
391
|
+
* method.
|
|
392
|
+
* @param options The options parameters.
|
|
393
|
+
*/
|
|
394
|
+
private _listByTrafficControllerNext(
|
|
395
|
+
resourceGroupName: string,
|
|
396
|
+
trafficControllerName: string,
|
|
397
|
+
nextLink: string,
|
|
398
|
+
options?: FrontendsInterfaceListByTrafficControllerNextOptionalParams
|
|
399
|
+
): Promise<FrontendsInterfaceListByTrafficControllerNextResponse> {
|
|
400
|
+
return this.client.sendOperationRequest(
|
|
401
|
+
{ resourceGroupName, trafficControllerName, nextLink, options },
|
|
402
|
+
listByTrafficControllerNextOperationSpec
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
// Operation Specifications
|
|
407
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
408
|
+
|
|
409
|
+
const listByTrafficControllerOperationSpec: coreClient.OperationSpec = {
|
|
410
|
+
path:
|
|
411
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends",
|
|
412
|
+
httpMethod: "GET",
|
|
413
|
+
responses: {
|
|
414
|
+
200: {
|
|
415
|
+
bodyMapper: Mappers.FrontendListResult
|
|
416
|
+
},
|
|
417
|
+
default: {
|
|
418
|
+
bodyMapper: Mappers.ErrorResponse
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
queryParameters: [Parameters.apiVersion],
|
|
422
|
+
urlParameters: [
|
|
423
|
+
Parameters.$host,
|
|
424
|
+
Parameters.subscriptionId,
|
|
425
|
+
Parameters.resourceGroupName,
|
|
426
|
+
Parameters.trafficControllerName
|
|
427
|
+
],
|
|
428
|
+
headerParameters: [Parameters.accept],
|
|
429
|
+
serializer
|
|
430
|
+
};
|
|
431
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
432
|
+
path:
|
|
433
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}",
|
|
434
|
+
httpMethod: "GET",
|
|
435
|
+
responses: {
|
|
436
|
+
200: {
|
|
437
|
+
bodyMapper: Mappers.Frontend
|
|
438
|
+
},
|
|
439
|
+
default: {
|
|
440
|
+
bodyMapper: Mappers.ErrorResponse
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
queryParameters: [Parameters.apiVersion],
|
|
444
|
+
urlParameters: [
|
|
445
|
+
Parameters.$host,
|
|
446
|
+
Parameters.subscriptionId,
|
|
447
|
+
Parameters.resourceGroupName,
|
|
448
|
+
Parameters.trafficControllerName,
|
|
449
|
+
Parameters.frontendName
|
|
450
|
+
],
|
|
451
|
+
headerParameters: [Parameters.accept],
|
|
452
|
+
serializer
|
|
453
|
+
};
|
|
454
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
455
|
+
path:
|
|
456
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}",
|
|
457
|
+
httpMethod: "PUT",
|
|
458
|
+
responses: {
|
|
459
|
+
200: {
|
|
460
|
+
bodyMapper: Mappers.Frontend
|
|
461
|
+
},
|
|
462
|
+
201: {
|
|
463
|
+
bodyMapper: Mappers.Frontend
|
|
464
|
+
},
|
|
465
|
+
202: {
|
|
466
|
+
bodyMapper: Mappers.Frontend
|
|
467
|
+
},
|
|
468
|
+
204: {
|
|
469
|
+
bodyMapper: Mappers.Frontend
|
|
470
|
+
},
|
|
471
|
+
default: {
|
|
472
|
+
bodyMapper: Mappers.ErrorResponse
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
requestBody: Parameters.resource2,
|
|
476
|
+
queryParameters: [Parameters.apiVersion],
|
|
477
|
+
urlParameters: [
|
|
478
|
+
Parameters.$host,
|
|
479
|
+
Parameters.subscriptionId,
|
|
480
|
+
Parameters.resourceGroupName,
|
|
481
|
+
Parameters.trafficControllerName,
|
|
482
|
+
Parameters.frontendName
|
|
483
|
+
],
|
|
484
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
485
|
+
mediaType: "json",
|
|
486
|
+
serializer
|
|
487
|
+
};
|
|
488
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
489
|
+
path:
|
|
490
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}",
|
|
491
|
+
httpMethod: "PATCH",
|
|
492
|
+
responses: {
|
|
493
|
+
200: {
|
|
494
|
+
bodyMapper: Mappers.Frontend
|
|
495
|
+
},
|
|
496
|
+
default: {
|
|
497
|
+
bodyMapper: Mappers.ErrorResponse
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
requestBody: Parameters.properties2,
|
|
501
|
+
queryParameters: [Parameters.apiVersion],
|
|
502
|
+
urlParameters: [
|
|
503
|
+
Parameters.$host,
|
|
504
|
+
Parameters.subscriptionId,
|
|
505
|
+
Parameters.resourceGroupName,
|
|
506
|
+
Parameters.trafficControllerName,
|
|
507
|
+
Parameters.frontendName
|
|
508
|
+
],
|
|
509
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
510
|
+
mediaType: "json",
|
|
511
|
+
serializer
|
|
512
|
+
};
|
|
513
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
514
|
+
path:
|
|
515
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}",
|
|
516
|
+
httpMethod: "DELETE",
|
|
517
|
+
responses: {
|
|
518
|
+
200: {},
|
|
519
|
+
201: {},
|
|
520
|
+
202: {},
|
|
521
|
+
204: {},
|
|
522
|
+
default: {
|
|
523
|
+
bodyMapper: Mappers.ErrorResponse
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
queryParameters: [Parameters.apiVersion],
|
|
527
|
+
urlParameters: [
|
|
528
|
+
Parameters.$host,
|
|
529
|
+
Parameters.subscriptionId,
|
|
530
|
+
Parameters.resourceGroupName,
|
|
531
|
+
Parameters.trafficControllerName,
|
|
532
|
+
Parameters.frontendName
|
|
533
|
+
],
|
|
534
|
+
headerParameters: [Parameters.accept],
|
|
535
|
+
serializer
|
|
536
|
+
};
|
|
537
|
+
const listByTrafficControllerNextOperationSpec: coreClient.OperationSpec = {
|
|
538
|
+
path: "{nextLink}",
|
|
539
|
+
httpMethod: "GET",
|
|
540
|
+
responses: {
|
|
541
|
+
200: {
|
|
542
|
+
bodyMapper: Mappers.FrontendListResult
|
|
543
|
+
},
|
|
544
|
+
default: {
|
|
545
|
+
bodyMapper: Mappers.ErrorResponse
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
urlParameters: [
|
|
549
|
+
Parameters.$host,
|
|
550
|
+
Parameters.nextLink,
|
|
551
|
+
Parameters.subscriptionId,
|
|
552
|
+
Parameters.resourceGroupName,
|
|
553
|
+
Parameters.trafficControllerName
|
|
554
|
+
],
|
|
555
|
+
headerParameters: [Parameters.accept],
|
|
556
|
+
serializer
|
|
557
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 "./trafficControllerInterface";
|
|
11
|
+
export * from "./associationsInterface";
|
|
12
|
+
export * from "./frontendsInterface";
|
|
@@ -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 { ServiceNetworkingManagementClient } from "../serviceNetworkingManagementClient";
|
|
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: ServiceNetworkingManagementClient;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Initialize a new instance of the class Operations class.
|
|
31
|
+
* @param client Reference to the service client
|
|
32
|
+
*/
|
|
33
|
+
constructor(client: ServiceNetworkingManagementClient) {
|
|
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.ServiceNetworking/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
|
+
};
|