@azure/arm-digitaltwins 2.1.1 → 3.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 -83
- package/dist/index.js +2613 -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/src/azureDigitalTwinsManagementClient.d.ts +22 -0
- package/dist-esm/src/azureDigitalTwinsManagementClient.d.ts.map +1 -0
- package/dist-esm/src/azureDigitalTwinsManagementClient.js +55 -0
- package/dist-esm/src/azureDigitalTwinsManagementClient.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/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 +677 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +85 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +40 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +441 -491
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +19 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +171 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/digitalTwins.d.ts +119 -0
- package/dist-esm/src/operations/digitalTwins.d.ts.map +1 -0
- package/dist-esm/src/operations/digitalTwins.js +549 -0
- package/dist-esm/src/operations/digitalTwins.js.map +1 -0
- package/dist-esm/src/operations/digitalTwinsEndpoint.d.ts +81 -0
- package/dist-esm/src/operations/digitalTwinsEndpoint.d.ts.map +1 -0
- package/dist-esm/src/operations/digitalTwinsEndpoint.js +345 -0
- package/dist-esm/src/operations/digitalTwinsEndpoint.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +1 -2
- 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 +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +63 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +264 -0
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts +28 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.js +85 -0
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/digitalTwins.d.ts +83 -0
- package/dist-esm/src/operationsInterfaces/digitalTwins.d.ts.map +1 -0
- package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/digitalTwins.js} +2 -9
- package/dist-esm/src/operationsInterfaces/digitalTwins.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/digitalTwinsEndpoint.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/digitalTwinsEndpoint.d.ts.map +1 -0
- package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/digitalTwinsEndpoint.js} +2 -2
- package/dist-esm/src/operationsInterfaces/digitalTwinsEndpoint.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -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/{esm/models/index.js → dist-esm/src/operationsInterfaces/operations.js} +2 -1
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +55 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +20 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.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 +65 -32
- package/review/arm-digitaltwins.api.md +620 -0
- package/rollup.config.js +181 -30
- package/src/azureDigitalTwinsManagementClient.ts +80 -40
- package/src/{models/privateLinkResourcesMappers.ts → index.ts} +4 -9
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +589 -1071
- package/src/models/mappers.ts +444 -492
- package/src/models/parameters.ts +119 -54
- package/src/operations/digitalTwins.ts +555 -371
- package/src/operations/digitalTwinsEndpoint.ts +338 -192
- package/src/operations/index.ts +1 -2
- package/src/operations/operations.ts +85 -73
- package/src/operations/privateEndpointConnections.ts +246 -151
- package/src/operations/privateLinkResources.ts +60 -92
- package/src/operationsInterfaces/digitalTwins.ts +164 -0
- package/src/operationsInterfaces/digitalTwinsEndpoint.ts +115 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +108 -0
- package/src/operationsInterfaces/privateLinkResources.ts +42 -0
- package/tsconfig.json +3 -3
- package/types/arm-digitaltwins.d.ts +1009 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-digitaltwins.js +0 -2418
- package/dist/arm-digitaltwins.js.map +0 -1
- package/dist/arm-digitaltwins.min.js +0 -1
- package/dist/arm-digitaltwins.min.js.map +0 -1
- package/esm/azureDigitalTwinsManagementClient.d.ts +0 -28
- package/esm/azureDigitalTwinsManagementClient.d.ts.map +0 -1
- package/esm/azureDigitalTwinsManagementClient.js +0 -41
- package/esm/azureDigitalTwinsManagementClient.js.map +0 -1
- package/esm/azureDigitalTwinsManagementClientContext.d.ts +0 -22
- package/esm/azureDigitalTwinsManagementClientContext.d.ts.map +0 -1
- package/esm/azureDigitalTwinsManagementClientContext.js +0 -60
- package/esm/azureDigitalTwinsManagementClientContext.js.map +0 -1
- package/esm/models/digitalTwinsEndpointMappers.d.ts +0 -2
- package/esm/models/digitalTwinsEndpointMappers.d.ts.map +0 -1
- package/esm/models/digitalTwinsEndpointMappers.js +0 -9
- package/esm/models/digitalTwinsEndpointMappers.js.map +0 -1
- package/esm/models/digitalTwinsMappers.d.ts +0 -2
- package/esm/models/digitalTwinsMappers.d.ts.map +0 -1
- package/esm/models/digitalTwinsMappers.js +0 -9
- package/esm/models/digitalTwinsMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -1169
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -42
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -12
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -132
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
- package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.js +0 -9
- package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
- package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
- package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
- package/esm/models/privateLinkResourcesMappers.js +0 -9
- package/esm/models/privateLinkResourcesMappers.js.map +0 -1
- package/esm/operations/digitalTwins.d.ts +0 -181
- package/esm/operations/digitalTwins.d.ts.map +0 -1
- package/esm/operations/digitalTwins.js +0 -383
- package/esm/operations/digitalTwins.js.map +0 -1
- package/esm/operations/digitalTwinsEndpoint.d.ts +0 -115
- package/esm/operations/digitalTwinsEndpoint.d.ts.map +0 -1
- package/esm/operations/digitalTwinsEndpoint.js +0 -242
- package/esm/operations/digitalTwinsEndpoint.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -79
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/privateEndpointConnections.d.ts +0 -97
- package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
- package/esm/operations/privateEndpointConnections.js +0 -209
- package/esm/operations/privateEndpointConnections.js.map +0 -1
- package/esm/operations/privateLinkResources.d.ts +0 -58
- package/esm/operations/privateLinkResources.d.ts.map +0 -1
- package/esm/operations/privateLinkResources.js +0 -90
- package/esm/operations/privateLinkResources.js.map +0 -1
- package/src/azureDigitalTwinsManagementClientContext.ts +0 -67
- package/src/models/digitalTwinsEndpointMappers.ts +0 -31
- package/src/models/digitalTwinsMappers.ts +0 -35
- package/src/models/privateEndpointConnectionsMappers.ts +0 -31
|
@@ -3,26 +3,41 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
7
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
13
|
-
import * as Mappers from "../models/
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { DigitalTwinsEndpoint } 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 { AzureDigitalTwinsManagementClient } from "../azureDigitalTwinsManagementClient";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
DigitalTwinsEndpointResource,
|
|
19
|
+
DigitalTwinsEndpointListNextOptionalParams,
|
|
20
|
+
DigitalTwinsEndpointListOptionalParams,
|
|
21
|
+
DigitalTwinsEndpointListResponse,
|
|
22
|
+
DigitalTwinsEndpointGetOptionalParams,
|
|
23
|
+
DigitalTwinsEndpointGetResponse,
|
|
24
|
+
DigitalTwinsEndpointCreateOrUpdateOptionalParams,
|
|
25
|
+
DigitalTwinsEndpointCreateOrUpdateResponse,
|
|
26
|
+
DigitalTwinsEndpointDeleteOptionalParams,
|
|
27
|
+
DigitalTwinsEndpointDeleteResponse,
|
|
28
|
+
DigitalTwinsEndpointListNextResponse
|
|
29
|
+
} from "../models";
|
|
16
30
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
31
|
+
/// <reference lib="esnext.asynciterable" />
|
|
32
|
+
/** Class containing DigitalTwinsEndpoint operations. */
|
|
33
|
+
export class DigitalTwinsEndpointImpl implements DigitalTwinsEndpoint {
|
|
34
|
+
private readonly client: AzureDigitalTwinsManagementClient;
|
|
20
35
|
|
|
21
36
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
37
|
+
* Initialize a new instance of the class DigitalTwinsEndpoint class.
|
|
38
|
+
* @param client Reference to the service client
|
|
24
39
|
*/
|
|
25
|
-
constructor(client:
|
|
40
|
+
constructor(client: AzureDigitalTwinsManagementClient) {
|
|
26
41
|
this.client = client;
|
|
27
42
|
}
|
|
28
43
|
|
|
@@ -30,68 +45,171 @@ export class DigitalTwinsEndpoint {
|
|
|
30
45
|
* Get DigitalTwinsInstance Endpoints.
|
|
31
46
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
32
47
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
33
|
-
* @param
|
|
34
|
-
* @returns Promise<Models.DigitalTwinsEndpointListResponse>
|
|
48
|
+
* @param options The options parameters.
|
|
35
49
|
*/
|
|
36
|
-
list(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
public list(
|
|
51
|
+
resourceGroupName: string,
|
|
52
|
+
resourceName: string,
|
|
53
|
+
options?: DigitalTwinsEndpointListOptionalParams
|
|
54
|
+
): PagedAsyncIterableIterator<DigitalTwinsEndpointResource> {
|
|
55
|
+
const iter = this.listPagingAll(resourceGroupName, resourceName, options);
|
|
56
|
+
return {
|
|
57
|
+
next() {
|
|
58
|
+
return iter.next();
|
|
59
|
+
},
|
|
60
|
+
[Symbol.asyncIterator]() {
|
|
61
|
+
return this;
|
|
62
|
+
},
|
|
63
|
+
byPage: () => {
|
|
64
|
+
return this.listPagingPage(resourceGroupName, resourceName, options);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private async *listPagingPage(
|
|
70
|
+
resourceGroupName: string,
|
|
71
|
+
resourceName: string,
|
|
72
|
+
options?: DigitalTwinsEndpointListOptionalParams
|
|
73
|
+
): AsyncIterableIterator<DigitalTwinsEndpointResource[]> {
|
|
74
|
+
let result = await this._list(resourceGroupName, resourceName, options);
|
|
75
|
+
yield result.value || [];
|
|
76
|
+
let continuationToken = result.nextLink;
|
|
77
|
+
while (continuationToken) {
|
|
78
|
+
result = await this._listNext(
|
|
53
79
|
resourceGroupName,
|
|
54
80
|
resourceName,
|
|
81
|
+
continuationToken,
|
|
55
82
|
options
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
83
|
+
);
|
|
84
|
+
continuationToken = result.nextLink;
|
|
85
|
+
yield result.value || [];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
private async *listPagingAll(
|
|
90
|
+
resourceGroupName: string,
|
|
91
|
+
resourceName: string,
|
|
92
|
+
options?: DigitalTwinsEndpointListOptionalParams
|
|
93
|
+
): AsyncIterableIterator<DigitalTwinsEndpointResource> {
|
|
94
|
+
for await (const page of this.listPagingPage(
|
|
95
|
+
resourceGroupName,
|
|
96
|
+
resourceName,
|
|
97
|
+
options
|
|
98
|
+
)) {
|
|
99
|
+
yield* page;
|
|
100
|
+
}
|
|
59
101
|
}
|
|
60
102
|
|
|
61
103
|
/**
|
|
62
|
-
* Get
|
|
104
|
+
* Get DigitalTwinsInstance Endpoints.
|
|
63
105
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
64
106
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
65
|
-
* @param
|
|
66
|
-
* @param [options] The optional parameters
|
|
67
|
-
* @returns Promise<Models.DigitalTwinsEndpointGetResponse>
|
|
107
|
+
* @param options The options parameters.
|
|
68
108
|
*/
|
|
69
|
-
|
|
109
|
+
private _list(
|
|
110
|
+
resourceGroupName: string,
|
|
111
|
+
resourceName: string,
|
|
112
|
+
options?: DigitalTwinsEndpointListOptionalParams
|
|
113
|
+
): Promise<DigitalTwinsEndpointListResponse> {
|
|
114
|
+
return this.client.sendOperationRequest(
|
|
115
|
+
{ resourceGroupName, resourceName, options },
|
|
116
|
+
listOperationSpec
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
70
120
|
/**
|
|
121
|
+
* Get DigitalTwinsInstances Endpoint.
|
|
71
122
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
72
123
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
73
124
|
* @param endpointName Name of Endpoint Resource.
|
|
74
|
-
* @param
|
|
125
|
+
* @param options The options parameters.
|
|
75
126
|
*/
|
|
76
|
-
get(
|
|
127
|
+
get(
|
|
128
|
+
resourceGroupName: string,
|
|
129
|
+
resourceName: string,
|
|
130
|
+
endpointName: string,
|
|
131
|
+
options?: DigitalTwinsEndpointGetOptionalParams
|
|
132
|
+
): Promise<DigitalTwinsEndpointGetResponse> {
|
|
133
|
+
return this.client.sendOperationRequest(
|
|
134
|
+
{ resourceGroupName, resourceName, endpointName, options },
|
|
135
|
+
getOperationSpec
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
77
139
|
/**
|
|
140
|
+
* Create or update DigitalTwinsInstance endpoint.
|
|
78
141
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
79
142
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
80
143
|
* @param endpointName Name of Endpoint Resource.
|
|
81
|
-
* @param
|
|
82
|
-
* @param
|
|
144
|
+
* @param endpointDescription The DigitalTwinsInstance endpoint metadata and security metadata.
|
|
145
|
+
* @param options The options parameters.
|
|
83
146
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
147
|
+
async beginCreateOrUpdate(
|
|
148
|
+
resourceGroupName: string,
|
|
149
|
+
resourceName: string,
|
|
150
|
+
endpointName: string,
|
|
151
|
+
endpointDescription: DigitalTwinsEndpointResource,
|
|
152
|
+
options?: DigitalTwinsEndpointCreateOrUpdateOptionalParams
|
|
153
|
+
): Promise<
|
|
154
|
+
PollerLike<
|
|
155
|
+
PollOperationState<DigitalTwinsEndpointCreateOrUpdateResponse>,
|
|
156
|
+
DigitalTwinsEndpointCreateOrUpdateResponse
|
|
157
|
+
>
|
|
158
|
+
> {
|
|
159
|
+
const directSendOperation = async (
|
|
160
|
+
args: coreClient.OperationArguments,
|
|
161
|
+
spec: coreClient.OperationSpec
|
|
162
|
+
): Promise<DigitalTwinsEndpointCreateOrUpdateResponse> => {
|
|
163
|
+
return this.client.sendOperationRequest(args, spec);
|
|
164
|
+
};
|
|
165
|
+
const sendOperation = async (
|
|
166
|
+
args: coreClient.OperationArguments,
|
|
167
|
+
spec: coreClient.OperationSpec
|
|
168
|
+
) => {
|
|
169
|
+
let currentRawResponse:
|
|
170
|
+
| coreClient.FullOperationResponse
|
|
171
|
+
| undefined = undefined;
|
|
172
|
+
const providedCallback = args.options?.onResponse;
|
|
173
|
+
const callback: coreClient.RawResponseCallback = (
|
|
174
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
175
|
+
flatResponse: unknown
|
|
176
|
+
) => {
|
|
177
|
+
currentRawResponse = rawResponse;
|
|
178
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
179
|
+
};
|
|
180
|
+
const updatedArgs = {
|
|
181
|
+
...args,
|
|
182
|
+
options: {
|
|
183
|
+
...args.options,
|
|
184
|
+
onResponse: callback
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
188
|
+
return {
|
|
189
|
+
flatResponse,
|
|
190
|
+
rawResponse: {
|
|
191
|
+
statusCode: currentRawResponse!.status,
|
|
192
|
+
body: currentRawResponse!.parsedBody,
|
|
193
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
const lro = new LroImpl(
|
|
199
|
+
sendOperation,
|
|
87
200
|
{
|
|
88
201
|
resourceGroupName,
|
|
89
202
|
resourceName,
|
|
90
203
|
endpointName,
|
|
204
|
+
endpointDescription,
|
|
91
205
|
options
|
|
92
206
|
},
|
|
93
|
-
|
|
94
|
-
|
|
207
|
+
createOrUpdateOperationSpec
|
|
208
|
+
);
|
|
209
|
+
return new LroEngine(lro, {
|
|
210
|
+
resumeFrom: options?.resumeFrom,
|
|
211
|
+
intervalInMs: options?.updateIntervalInMs
|
|
212
|
+
});
|
|
95
213
|
}
|
|
96
214
|
|
|
97
215
|
/**
|
|
@@ -99,13 +217,24 @@ export class DigitalTwinsEndpoint {
|
|
|
99
217
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
100
218
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
101
219
|
* @param endpointName Name of Endpoint Resource.
|
|
102
|
-
* @param
|
|
103
|
-
* @param
|
|
104
|
-
* @returns Promise<Models.DigitalTwinsEndpointCreateOrUpdateResponse>
|
|
220
|
+
* @param endpointDescription The DigitalTwinsInstance endpoint metadata and security metadata.
|
|
221
|
+
* @param options The options parameters.
|
|
105
222
|
*/
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
223
|
+
async beginCreateOrUpdateAndWait(
|
|
224
|
+
resourceGroupName: string,
|
|
225
|
+
resourceName: string,
|
|
226
|
+
endpointName: string,
|
|
227
|
+
endpointDescription: DigitalTwinsEndpointResource,
|
|
228
|
+
options?: DigitalTwinsEndpointCreateOrUpdateOptionalParams
|
|
229
|
+
): Promise<DigitalTwinsEndpointCreateOrUpdateResponse> {
|
|
230
|
+
const poller = await this.beginCreateOrUpdate(
|
|
231
|
+
resourceGroupName,
|
|
232
|
+
resourceName,
|
|
233
|
+
endpointName,
|
|
234
|
+
endpointDescription,
|
|
235
|
+
options
|
|
236
|
+
);
|
|
237
|
+
return poller.pollUntilDone();
|
|
109
238
|
}
|
|
110
239
|
|
|
111
240
|
/**
|
|
@@ -113,34 +242,67 @@ export class DigitalTwinsEndpoint {
|
|
|
113
242
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
114
243
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
115
244
|
* @param endpointName Name of Endpoint Resource.
|
|
116
|
-
* @param
|
|
117
|
-
* @returns Promise<Models.DigitalTwinsEndpointDeleteMethodResponse>
|
|
245
|
+
* @param options The options parameters.
|
|
118
246
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
247
|
+
async beginDelete(
|
|
248
|
+
resourceGroupName: string,
|
|
249
|
+
resourceName: string,
|
|
250
|
+
endpointName: string,
|
|
251
|
+
options?: DigitalTwinsEndpointDeleteOptionalParams
|
|
252
|
+
): Promise<
|
|
253
|
+
PollerLike<
|
|
254
|
+
PollOperationState<DigitalTwinsEndpointDeleteResponse>,
|
|
255
|
+
DigitalTwinsEndpointDeleteResponse
|
|
256
|
+
>
|
|
257
|
+
> {
|
|
258
|
+
const directSendOperation = async (
|
|
259
|
+
args: coreClient.OperationArguments,
|
|
260
|
+
spec: coreClient.OperationSpec
|
|
261
|
+
): Promise<DigitalTwinsEndpointDeleteResponse> => {
|
|
262
|
+
return this.client.sendOperationRequest(args, spec);
|
|
263
|
+
};
|
|
264
|
+
const sendOperation = async (
|
|
265
|
+
args: coreClient.OperationArguments,
|
|
266
|
+
spec: coreClient.OperationSpec
|
|
267
|
+
) => {
|
|
268
|
+
let currentRawResponse:
|
|
269
|
+
| coreClient.FullOperationResponse
|
|
270
|
+
| undefined = undefined;
|
|
271
|
+
const providedCallback = args.options?.onResponse;
|
|
272
|
+
const callback: coreClient.RawResponseCallback = (
|
|
273
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
274
|
+
flatResponse: unknown
|
|
275
|
+
) => {
|
|
276
|
+
currentRawResponse = rawResponse;
|
|
277
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
278
|
+
};
|
|
279
|
+
const updatedArgs = {
|
|
280
|
+
...args,
|
|
281
|
+
options: {
|
|
282
|
+
...args.options,
|
|
283
|
+
onResponse: callback
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
287
|
+
return {
|
|
288
|
+
flatResponse,
|
|
289
|
+
rawResponse: {
|
|
290
|
+
statusCode: currentRawResponse!.status,
|
|
291
|
+
body: currentRawResponse!.parsedBody,
|
|
292
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
};
|
|
123
296
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
beginCreateOrUpdate(resourceGroupName: string, resourceName: string, endpointName: string, properties: Models.DigitalTwinsEndpointResourcePropertiesUnion, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
|
|
134
|
-
return this.client.sendLRORequest(
|
|
135
|
-
{
|
|
136
|
-
resourceGroupName,
|
|
137
|
-
resourceName,
|
|
138
|
-
endpointName,
|
|
139
|
-
properties,
|
|
140
|
-
options
|
|
141
|
-
},
|
|
142
|
-
beginCreateOrUpdateOperationSpec,
|
|
143
|
-
options);
|
|
297
|
+
const lro = new LroImpl(
|
|
298
|
+
sendOperation,
|
|
299
|
+
{ resourceGroupName, resourceName, endpointName, options },
|
|
300
|
+
deleteOperationSpec
|
|
301
|
+
);
|
|
302
|
+
return new LroEngine(lro, {
|
|
303
|
+
resumeFrom: options?.resumeFrom,
|
|
304
|
+
intervalInMs: options?.updateIntervalInMs
|
|
305
|
+
});
|
|
144
306
|
}
|
|
145
307
|
|
|
146
308
|
/**
|
|
@@ -148,66 +310,49 @@ export class DigitalTwinsEndpoint {
|
|
|
148
310
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
149
311
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
150
312
|
* @param endpointName Name of Endpoint Resource.
|
|
151
|
-
* @param
|
|
152
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
313
|
+
* @param options The options parameters.
|
|
153
314
|
*/
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
315
|
+
async beginDeleteAndWait(
|
|
316
|
+
resourceGroupName: string,
|
|
317
|
+
resourceName: string,
|
|
318
|
+
endpointName: string,
|
|
319
|
+
options?: DigitalTwinsEndpointDeleteOptionalParams
|
|
320
|
+
): Promise<DigitalTwinsEndpointDeleteResponse> {
|
|
321
|
+
const poller = await this.beginDelete(
|
|
322
|
+
resourceGroupName,
|
|
323
|
+
resourceName,
|
|
324
|
+
endpointName,
|
|
325
|
+
options
|
|
326
|
+
);
|
|
327
|
+
return poller.pollUntilDone();
|
|
164
328
|
}
|
|
165
329
|
|
|
166
330
|
/**
|
|
167
|
-
*
|
|
168
|
-
* @param
|
|
169
|
-
* @param
|
|
170
|
-
* @
|
|
171
|
-
|
|
172
|
-
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.DigitalTwinsEndpointListNextResponse>;
|
|
173
|
-
/**
|
|
174
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
175
|
-
* @param callback The callback
|
|
176
|
-
*/
|
|
177
|
-
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.DigitalTwinsEndpointResourceListResult>): void;
|
|
178
|
-
/**
|
|
179
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
180
|
-
* @param options The optional parameters
|
|
181
|
-
* @param callback The callback
|
|
331
|
+
* ListNext
|
|
332
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
333
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
334
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
335
|
+
* @param options The options parameters.
|
|
182
336
|
*/
|
|
183
|
-
|
|
184
|
-
|
|
337
|
+
private _listNext(
|
|
338
|
+
resourceGroupName: string,
|
|
339
|
+
resourceName: string,
|
|
340
|
+
nextLink: string,
|
|
341
|
+
options?: DigitalTwinsEndpointListNextOptionalParams
|
|
342
|
+
): Promise<DigitalTwinsEndpointListNextResponse> {
|
|
185
343
|
return this.client.sendOperationRequest(
|
|
186
|
-
{
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
},
|
|
190
|
-
listNextOperationSpec,
|
|
191
|
-
callback) as Promise<Models.DigitalTwinsEndpointListNextResponse>;
|
|
344
|
+
{ resourceGroupName, resourceName, nextLink, options },
|
|
345
|
+
listNextOperationSpec
|
|
346
|
+
);
|
|
192
347
|
}
|
|
193
348
|
}
|
|
194
|
-
|
|
195
349
|
// Operation Specifications
|
|
196
|
-
const serializer =
|
|
197
|
-
|
|
350
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
351
|
+
|
|
352
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
353
|
+
path:
|
|
354
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints",
|
|
198
355
|
httpMethod: "GET",
|
|
199
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints",
|
|
200
|
-
urlParameters: [
|
|
201
|
-
Parameters.subscriptionId,
|
|
202
|
-
Parameters.resourceGroupName,
|
|
203
|
-
Parameters.resourceName
|
|
204
|
-
],
|
|
205
|
-
queryParameters: [
|
|
206
|
-
Parameters.apiVersion
|
|
207
|
-
],
|
|
208
|
-
headerParameters: [
|
|
209
|
-
Parameters.acceptLanguage
|
|
210
|
-
],
|
|
211
356
|
responses: {
|
|
212
357
|
200: {
|
|
213
358
|
bodyMapper: Mappers.DigitalTwinsEndpointResourceListResult
|
|
@@ -216,24 +361,20 @@ const listOperationSpec: msRest.OperationSpec = {
|
|
|
216
361
|
bodyMapper: Mappers.ErrorResponse
|
|
217
362
|
}
|
|
218
363
|
},
|
|
219
|
-
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
const getOperationSpec: msRest.OperationSpec = {
|
|
223
|
-
httpMethod: "GET",
|
|
224
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
364
|
+
queryParameters: [Parameters.apiVersion],
|
|
225
365
|
urlParameters: [
|
|
366
|
+
Parameters.$host,
|
|
226
367
|
Parameters.subscriptionId,
|
|
227
368
|
Parameters.resourceGroupName,
|
|
228
|
-
Parameters.resourceName
|
|
229
|
-
Parameters.endpointName
|
|
230
|
-
],
|
|
231
|
-
queryParameters: [
|
|
232
|
-
Parameters.apiVersion
|
|
233
|
-
],
|
|
234
|
-
headerParameters: [
|
|
235
|
-
Parameters.acceptLanguage
|
|
369
|
+
Parameters.resourceName
|
|
236
370
|
],
|
|
371
|
+
headerParameters: [Parameters.accept],
|
|
372
|
+
serializer
|
|
373
|
+
};
|
|
374
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
375
|
+
path:
|
|
376
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
377
|
+
httpMethod: "GET",
|
|
237
378
|
responses: {
|
|
238
379
|
200: {
|
|
239
380
|
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
@@ -242,33 +383,21 @@ const getOperationSpec: msRest.OperationSpec = {
|
|
|
242
383
|
bodyMapper: Mappers.ErrorResponse
|
|
243
384
|
}
|
|
244
385
|
},
|
|
245
|
-
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
|
|
249
|
-
httpMethod: "PUT",
|
|
250
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
386
|
+
queryParameters: [Parameters.apiVersion],
|
|
251
387
|
urlParameters: [
|
|
388
|
+
Parameters.$host,
|
|
252
389
|
Parameters.subscriptionId,
|
|
253
390
|
Parameters.resourceGroupName,
|
|
254
391
|
Parameters.resourceName,
|
|
255
392
|
Parameters.endpointName
|
|
256
393
|
],
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
parameterPath: {
|
|
265
|
-
properties: "properties"
|
|
266
|
-
},
|
|
267
|
-
mapper: {
|
|
268
|
-
...Mappers.DigitalTwinsEndpointResource,
|
|
269
|
-
required: true
|
|
270
|
-
}
|
|
271
|
-
},
|
|
394
|
+
headerParameters: [Parameters.accept],
|
|
395
|
+
serializer
|
|
396
|
+
};
|
|
397
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
398
|
+
path:
|
|
399
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
400
|
+
httpMethod: "PUT",
|
|
272
401
|
responses: {
|
|
273
402
|
200: {
|
|
274
403
|
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
@@ -276,56 +405,64 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
|
|
|
276
405
|
201: {
|
|
277
406
|
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
278
407
|
},
|
|
408
|
+
202: {
|
|
409
|
+
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
410
|
+
},
|
|
411
|
+
204: {
|
|
412
|
+
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
413
|
+
},
|
|
279
414
|
default: {
|
|
280
415
|
bodyMapper: Mappers.ErrorResponse
|
|
281
416
|
}
|
|
282
417
|
},
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
|
|
287
|
-
httpMethod: "DELETE",
|
|
288
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
418
|
+
requestBody: Parameters.endpointDescription,
|
|
419
|
+
queryParameters: [Parameters.apiVersion],
|
|
289
420
|
urlParameters: [
|
|
421
|
+
Parameters.$host,
|
|
290
422
|
Parameters.subscriptionId,
|
|
291
423
|
Parameters.resourceGroupName,
|
|
292
424
|
Parameters.resourceName,
|
|
293
425
|
Parameters.endpointName
|
|
294
426
|
],
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
427
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
428
|
+
mediaType: "json",
|
|
429
|
+
serializer
|
|
430
|
+
};
|
|
431
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
432
|
+
path:
|
|
433
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
434
|
+
httpMethod: "DELETE",
|
|
301
435
|
responses: {
|
|
302
436
|
200: {
|
|
303
437
|
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
304
438
|
},
|
|
439
|
+
201: {
|
|
440
|
+
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
441
|
+
},
|
|
305
442
|
202: {
|
|
306
443
|
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
307
444
|
},
|
|
308
|
-
204: {
|
|
445
|
+
204: {
|
|
446
|
+
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
447
|
+
},
|
|
309
448
|
default: {
|
|
310
449
|
bodyMapper: Mappers.ErrorResponse
|
|
311
450
|
}
|
|
312
451
|
},
|
|
452
|
+
queryParameters: [Parameters.apiVersion],
|
|
453
|
+
urlParameters: [
|
|
454
|
+
Parameters.$host,
|
|
455
|
+
Parameters.subscriptionId,
|
|
456
|
+
Parameters.resourceGroupName,
|
|
457
|
+
Parameters.resourceName,
|
|
458
|
+
Parameters.endpointName
|
|
459
|
+
],
|
|
460
|
+
headerParameters: [Parameters.accept],
|
|
313
461
|
serializer
|
|
314
462
|
};
|
|
315
|
-
|
|
316
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
317
|
-
httpMethod: "GET",
|
|
318
|
-
baseUrl: "https://management.azure.com",
|
|
463
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
319
464
|
path: "{nextLink}",
|
|
320
|
-
|
|
321
|
-
Parameters.nextPageLink
|
|
322
|
-
],
|
|
323
|
-
queryParameters: [
|
|
324
|
-
Parameters.apiVersion
|
|
325
|
-
],
|
|
326
|
-
headerParameters: [
|
|
327
|
-
Parameters.acceptLanguage
|
|
328
|
-
],
|
|
465
|
+
httpMethod: "GET",
|
|
329
466
|
responses: {
|
|
330
467
|
200: {
|
|
331
468
|
bodyMapper: Mappers.DigitalTwinsEndpointResourceListResult
|
|
@@ -334,5 +471,14 @@ const listNextOperationSpec: msRest.OperationSpec = {
|
|
|
334
471
|
bodyMapper: Mappers.ErrorResponse
|
|
335
472
|
}
|
|
336
473
|
},
|
|
474
|
+
queryParameters: [Parameters.apiVersion],
|
|
475
|
+
urlParameters: [
|
|
476
|
+
Parameters.$host,
|
|
477
|
+
Parameters.subscriptionId,
|
|
478
|
+
Parameters.resourceGroupName,
|
|
479
|
+
Parameters.resourceName,
|
|
480
|
+
Parameters.nextLink
|
|
481
|
+
],
|
|
482
|
+
headerParameters: [Parameters.accept],
|
|
337
483
|
serializer
|
|
338
484
|
};
|
package/src/operations/index.ts
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
7
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
export * from "./digitalTwins";
|