@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,205 +3,258 @@
|
|
|
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 { DigitalTwins } 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
|
+
DigitalTwinsDescription,
|
|
19
|
+
DigitalTwinsListNextOptionalParams,
|
|
20
|
+
DigitalTwinsListOptionalParams,
|
|
21
|
+
DigitalTwinsListByResourceGroupNextOptionalParams,
|
|
22
|
+
DigitalTwinsListByResourceGroupOptionalParams,
|
|
23
|
+
DigitalTwinsGetOptionalParams,
|
|
24
|
+
DigitalTwinsGetResponse,
|
|
25
|
+
DigitalTwinsCreateOrUpdateOptionalParams,
|
|
26
|
+
DigitalTwinsCreateOrUpdateResponse,
|
|
27
|
+
DigitalTwinsPatchDescription,
|
|
28
|
+
DigitalTwinsUpdateOptionalParams,
|
|
29
|
+
DigitalTwinsUpdateResponse,
|
|
30
|
+
DigitalTwinsDeleteOptionalParams,
|
|
31
|
+
DigitalTwinsDeleteResponse,
|
|
32
|
+
DigitalTwinsListResponse,
|
|
33
|
+
DigitalTwinsListByResourceGroupResponse,
|
|
34
|
+
CheckNameRequest,
|
|
35
|
+
DigitalTwinsCheckNameAvailabilityOptionalParams,
|
|
36
|
+
DigitalTwinsCheckNameAvailabilityResponse,
|
|
37
|
+
DigitalTwinsListNextResponse,
|
|
38
|
+
DigitalTwinsListByResourceGroupNextResponse
|
|
39
|
+
} from "../models";
|
|
16
40
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
41
|
+
/// <reference lib="esnext.asynciterable" />
|
|
42
|
+
/** Class containing DigitalTwins operations. */
|
|
43
|
+
export class DigitalTwinsImpl implements DigitalTwins {
|
|
44
|
+
private readonly client: AzureDigitalTwinsManagementClient;
|
|
20
45
|
|
|
21
46
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
47
|
+
* Initialize a new instance of the class DigitalTwins class.
|
|
48
|
+
* @param client Reference to the service client
|
|
24
49
|
*/
|
|
25
|
-
constructor(client:
|
|
50
|
+
constructor(client: AzureDigitalTwinsManagementClient) {
|
|
26
51
|
this.client = client;
|
|
27
52
|
}
|
|
28
53
|
|
|
29
54
|
/**
|
|
30
|
-
* Get DigitalTwinsInstances
|
|
31
|
-
* @param
|
|
32
|
-
* @param resourceName The name of the DigitalTwinsInstance.
|
|
33
|
-
* @param [options] The optional parameters
|
|
34
|
-
* @returns Promise<Models.DigitalTwinsGetResponse>
|
|
35
|
-
*/
|
|
36
|
-
get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise<Models.DigitalTwinsGetResponse>;
|
|
37
|
-
/**
|
|
38
|
-
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
39
|
-
* @param resourceName The name of the DigitalTwinsInstance.
|
|
40
|
-
* @param callback The callback
|
|
41
|
-
*/
|
|
42
|
-
get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback<Models.DigitalTwinsDescription>): void;
|
|
43
|
-
/**
|
|
44
|
-
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
45
|
-
* @param resourceName The name of the DigitalTwinsInstance.
|
|
46
|
-
* @param options The optional parameters
|
|
47
|
-
* @param callback The callback
|
|
55
|
+
* Get all the DigitalTwinsInstances in a subscription.
|
|
56
|
+
* @param options The options parameters.
|
|
48
57
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
public list(
|
|
59
|
+
options?: DigitalTwinsListOptionalParams
|
|
60
|
+
): PagedAsyncIterableIterator<DigitalTwinsDescription> {
|
|
61
|
+
const iter = this.listPagingAll(options);
|
|
62
|
+
return {
|
|
63
|
+
next() {
|
|
64
|
+
return iter.next();
|
|
65
|
+
},
|
|
66
|
+
[Symbol.asyncIterator]() {
|
|
67
|
+
return this;
|
|
56
68
|
},
|
|
57
|
-
|
|
58
|
-
|
|
69
|
+
byPage: () => {
|
|
70
|
+
return this.listPagingPage(options);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
59
73
|
}
|
|
60
74
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return this.beginCreateOrUpdate(resourceGroupName,resourceName,digitalTwinsCreate,options)
|
|
73
|
-
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.DigitalTwinsCreateOrUpdateResponse>;
|
|
75
|
+
private async *listPagingPage(
|
|
76
|
+
options?: DigitalTwinsListOptionalParams
|
|
77
|
+
): AsyncIterableIterator<DigitalTwinsDescription[]> {
|
|
78
|
+
let result = await this._list(options);
|
|
79
|
+
yield result.value || [];
|
|
80
|
+
let continuationToken = result.nextLink;
|
|
81
|
+
while (continuationToken) {
|
|
82
|
+
result = await this._listNext(continuationToken, options);
|
|
83
|
+
continuationToken = result.nextLink;
|
|
84
|
+
yield result.value || [];
|
|
85
|
+
}
|
|
74
86
|
}
|
|
75
87
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
* @returns Promise<Models.DigitalTwinsUpdateResponse>
|
|
83
|
-
*/
|
|
84
|
-
update(resourceGroupName: string, resourceName: string, digitalTwinsPatchDescription: Models.DigitalTwinsPatchDescription, options?: msRest.RequestOptionsBase): Promise<Models.DigitalTwinsUpdateResponse> {
|
|
85
|
-
return this.beginUpdate(resourceGroupName,resourceName,digitalTwinsPatchDescription,options)
|
|
86
|
-
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.DigitalTwinsUpdateResponse>;
|
|
88
|
+
private async *listPagingAll(
|
|
89
|
+
options?: DigitalTwinsListOptionalParams
|
|
90
|
+
): AsyncIterableIterator<DigitalTwinsDescription> {
|
|
91
|
+
for await (const page of this.listPagingPage(options)) {
|
|
92
|
+
yield* page;
|
|
93
|
+
}
|
|
87
94
|
}
|
|
88
95
|
|
|
89
96
|
/**
|
|
90
|
-
*
|
|
97
|
+
* Get all the DigitalTwinsInstances in a resource group.
|
|
91
98
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
92
|
-
* @param
|
|
93
|
-
* @param [options] The optional parameters
|
|
94
|
-
* @returns Promise<Models.DigitalTwinsDeleteMethodResponse>
|
|
99
|
+
* @param options The options parameters.
|
|
95
100
|
*/
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
public listByResourceGroup(
|
|
102
|
+
resourceGroupName: string,
|
|
103
|
+
options?: DigitalTwinsListByResourceGroupOptionalParams
|
|
104
|
+
): PagedAsyncIterableIterator<DigitalTwinsDescription> {
|
|
105
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
106
|
+
return {
|
|
107
|
+
next() {
|
|
108
|
+
return iter.next();
|
|
109
|
+
},
|
|
110
|
+
[Symbol.asyncIterator]() {
|
|
111
|
+
return this;
|
|
112
|
+
},
|
|
113
|
+
byPage: () => {
|
|
114
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
99
117
|
}
|
|
100
118
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
* @param options The optional parameters
|
|
113
|
-
* @param callback The callback
|
|
114
|
-
*/
|
|
115
|
-
list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DigitalTwinsDescriptionListResult>): void;
|
|
116
|
-
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DigitalTwinsDescriptionListResult>, callback?: msRest.ServiceCallback<Models.DigitalTwinsDescriptionListResult>): Promise<Models.DigitalTwinsListResponse> {
|
|
117
|
-
return this.client.sendOperationRequest(
|
|
118
|
-
{
|
|
119
|
+
private async *listByResourceGroupPagingPage(
|
|
120
|
+
resourceGroupName: string,
|
|
121
|
+
options?: DigitalTwinsListByResourceGroupOptionalParams
|
|
122
|
+
): AsyncIterableIterator<DigitalTwinsDescription[]> {
|
|
123
|
+
let result = await this._listByResourceGroup(resourceGroupName, options);
|
|
124
|
+
yield result.value || [];
|
|
125
|
+
let continuationToken = result.nextLink;
|
|
126
|
+
while (continuationToken) {
|
|
127
|
+
result = await this._listByResourceGroupNext(
|
|
128
|
+
resourceGroupName,
|
|
129
|
+
continuationToken,
|
|
119
130
|
options
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
131
|
+
);
|
|
132
|
+
continuationToken = result.nextLink;
|
|
133
|
+
yield result.value || [];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
private async *listByResourceGroupPagingAll(
|
|
138
|
+
resourceGroupName: string,
|
|
139
|
+
options?: DigitalTwinsListByResourceGroupOptionalParams
|
|
140
|
+
): AsyncIterableIterator<DigitalTwinsDescription> {
|
|
141
|
+
for await (const page of this.listByResourceGroupPagingPage(
|
|
142
|
+
resourceGroupName,
|
|
143
|
+
options
|
|
144
|
+
)) {
|
|
145
|
+
yield* page;
|
|
146
|
+
}
|
|
123
147
|
}
|
|
124
148
|
|
|
125
149
|
/**
|
|
126
|
-
* Get
|
|
127
|
-
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
128
|
-
* @param [options] The optional parameters
|
|
129
|
-
* @returns Promise<Models.DigitalTwinsListByResourceGroupResponse>
|
|
130
|
-
*/
|
|
131
|
-
listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.DigitalTwinsListByResourceGroupResponse>;
|
|
132
|
-
/**
|
|
133
|
-
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
134
|
-
* @param callback The callback
|
|
135
|
-
*/
|
|
136
|
-
listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.DigitalTwinsDescriptionListResult>): void;
|
|
137
|
-
/**
|
|
150
|
+
* Get DigitalTwinsInstances resource.
|
|
138
151
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
139
|
-
* @param
|
|
140
|
-
* @param
|
|
152
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
153
|
+
* @param options The options parameters.
|
|
141
154
|
*/
|
|
142
|
-
|
|
143
|
-
|
|
155
|
+
get(
|
|
156
|
+
resourceGroupName: string,
|
|
157
|
+
resourceName: string,
|
|
158
|
+
options?: DigitalTwinsGetOptionalParams
|
|
159
|
+
): Promise<DigitalTwinsGetResponse> {
|
|
144
160
|
return this.client.sendOperationRequest(
|
|
145
|
-
{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
listByResourceGroupOperationSpec,
|
|
150
|
-
callback) as Promise<Models.DigitalTwinsListByResourceGroupResponse>;
|
|
161
|
+
{ resourceGroupName, resourceName, options },
|
|
162
|
+
getOperationSpec
|
|
163
|
+
);
|
|
151
164
|
}
|
|
152
165
|
|
|
153
166
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* @param
|
|
158
|
-
* @
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* @param location Location of DigitalTwinsInstance.
|
|
163
|
-
* @param name Resource name.
|
|
164
|
-
* @param callback The callback
|
|
165
|
-
*/
|
|
166
|
-
checkNameAvailability(location: string, name: string, callback: msRest.ServiceCallback<Models.CheckNameResult>): void;
|
|
167
|
-
/**
|
|
168
|
-
* @param location Location of DigitalTwinsInstance.
|
|
169
|
-
* @param name Resource name.
|
|
170
|
-
* @param options The optional parameters
|
|
171
|
-
* @param callback The callback
|
|
167
|
+
* Create or update the metadata of a DigitalTwinsInstance. The usual pattern to modify a property is
|
|
168
|
+
* to retrieve the DigitalTwinsInstance and security metadata, and then combine them with the modified
|
|
169
|
+
* values in a new body to update the DigitalTwinsInstance.
|
|
170
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
171
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
172
|
+
* @param digitalTwinsCreate The DigitalTwinsInstance and security metadata.
|
|
173
|
+
* @param options The options parameters.
|
|
172
174
|
*/
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
175
|
+
async beginCreateOrUpdate(
|
|
176
|
+
resourceGroupName: string,
|
|
177
|
+
resourceName: string,
|
|
178
|
+
digitalTwinsCreate: DigitalTwinsDescription,
|
|
179
|
+
options?: DigitalTwinsCreateOrUpdateOptionalParams
|
|
180
|
+
): Promise<
|
|
181
|
+
PollerLike<
|
|
182
|
+
PollOperationState<DigitalTwinsCreateOrUpdateResponse>,
|
|
183
|
+
DigitalTwinsCreateOrUpdateResponse
|
|
184
|
+
>
|
|
185
|
+
> {
|
|
186
|
+
const directSendOperation = async (
|
|
187
|
+
args: coreClient.OperationArguments,
|
|
188
|
+
spec: coreClient.OperationSpec
|
|
189
|
+
): Promise<DigitalTwinsCreateOrUpdateResponse> => {
|
|
190
|
+
return this.client.sendOperationRequest(args, spec);
|
|
191
|
+
};
|
|
192
|
+
const sendOperation = async (
|
|
193
|
+
args: coreClient.OperationArguments,
|
|
194
|
+
spec: coreClient.OperationSpec
|
|
195
|
+
) => {
|
|
196
|
+
let currentRawResponse:
|
|
197
|
+
| coreClient.FullOperationResponse
|
|
198
|
+
| undefined = undefined;
|
|
199
|
+
const providedCallback = args.options?.onResponse;
|
|
200
|
+
const callback: coreClient.RawResponseCallback = (
|
|
201
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
202
|
+
flatResponse: unknown
|
|
203
|
+
) => {
|
|
204
|
+
currentRawResponse = rawResponse;
|
|
205
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
206
|
+
};
|
|
207
|
+
const updatedArgs = {
|
|
208
|
+
...args,
|
|
209
|
+
options: {
|
|
210
|
+
...args.options,
|
|
211
|
+
onResponse: callback
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
215
|
+
return {
|
|
216
|
+
flatResponse,
|
|
217
|
+
rawResponse: {
|
|
218
|
+
statusCode: currentRawResponse!.status,
|
|
219
|
+
body: currentRawResponse!.parsedBody,
|
|
220
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
const lro = new LroImpl(
|
|
226
|
+
sendOperation,
|
|
227
|
+
{ resourceGroupName, resourceName, digitalTwinsCreate, options },
|
|
228
|
+
createOrUpdateOperationSpec
|
|
229
|
+
);
|
|
230
|
+
return new LroEngine(lro, {
|
|
231
|
+
resumeFrom: options?.resumeFrom,
|
|
232
|
+
intervalInMs: options?.updateIntervalInMs
|
|
233
|
+
});
|
|
183
234
|
}
|
|
184
235
|
|
|
185
236
|
/**
|
|
186
|
-
* Create or update the metadata of a DigitalTwinsInstance. The usual pattern to modify a property
|
|
187
|
-
*
|
|
188
|
-
*
|
|
237
|
+
* Create or update the metadata of a DigitalTwinsInstance. The usual pattern to modify a property is
|
|
238
|
+
* to retrieve the DigitalTwinsInstance and security metadata, and then combine them with the modified
|
|
239
|
+
* values in a new body to update the DigitalTwinsInstance.
|
|
189
240
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
190
241
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
191
242
|
* @param digitalTwinsCreate The DigitalTwinsInstance and security metadata.
|
|
192
|
-
* @param
|
|
193
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
243
|
+
* @param options The options parameters.
|
|
194
244
|
*/
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
245
|
+
async beginCreateOrUpdateAndWait(
|
|
246
|
+
resourceGroupName: string,
|
|
247
|
+
resourceName: string,
|
|
248
|
+
digitalTwinsCreate: DigitalTwinsDescription,
|
|
249
|
+
options?: DigitalTwinsCreateOrUpdateOptionalParams
|
|
250
|
+
): Promise<DigitalTwinsCreateOrUpdateResponse> {
|
|
251
|
+
const poller = await this.beginCreateOrUpdate(
|
|
252
|
+
resourceGroupName,
|
|
253
|
+
resourceName,
|
|
254
|
+
digitalTwinsCreate,
|
|
255
|
+
options
|
|
256
|
+
);
|
|
257
|
+
return poller.pollUntilDone();
|
|
205
258
|
}
|
|
206
259
|
|
|
207
260
|
/**
|
|
@@ -209,112 +262,263 @@ export class DigitalTwins {
|
|
|
209
262
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
210
263
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
211
264
|
* @param digitalTwinsPatchDescription The DigitalTwinsInstance and security metadata.
|
|
212
|
-
* @param
|
|
213
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
265
|
+
* @param options The options parameters.
|
|
214
266
|
*/
|
|
215
|
-
beginUpdate(
|
|
216
|
-
|
|
267
|
+
async beginUpdate(
|
|
268
|
+
resourceGroupName: string,
|
|
269
|
+
resourceName: string,
|
|
270
|
+
digitalTwinsPatchDescription: DigitalTwinsPatchDescription,
|
|
271
|
+
options?: DigitalTwinsUpdateOptionalParams
|
|
272
|
+
): Promise<
|
|
273
|
+
PollerLike<
|
|
274
|
+
PollOperationState<DigitalTwinsUpdateResponse>,
|
|
275
|
+
DigitalTwinsUpdateResponse
|
|
276
|
+
>
|
|
277
|
+
> {
|
|
278
|
+
const directSendOperation = async (
|
|
279
|
+
args: coreClient.OperationArguments,
|
|
280
|
+
spec: coreClient.OperationSpec
|
|
281
|
+
): Promise<DigitalTwinsUpdateResponse> => {
|
|
282
|
+
return this.client.sendOperationRequest(args, spec);
|
|
283
|
+
};
|
|
284
|
+
const sendOperation = async (
|
|
285
|
+
args: coreClient.OperationArguments,
|
|
286
|
+
spec: coreClient.OperationSpec
|
|
287
|
+
) => {
|
|
288
|
+
let currentRawResponse:
|
|
289
|
+
| coreClient.FullOperationResponse
|
|
290
|
+
| undefined = undefined;
|
|
291
|
+
const providedCallback = args.options?.onResponse;
|
|
292
|
+
const callback: coreClient.RawResponseCallback = (
|
|
293
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
294
|
+
flatResponse: unknown
|
|
295
|
+
) => {
|
|
296
|
+
currentRawResponse = rawResponse;
|
|
297
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
298
|
+
};
|
|
299
|
+
const updatedArgs = {
|
|
300
|
+
...args,
|
|
301
|
+
options: {
|
|
302
|
+
...args.options,
|
|
303
|
+
onResponse: callback
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
307
|
+
return {
|
|
308
|
+
flatResponse,
|
|
309
|
+
rawResponse: {
|
|
310
|
+
statusCode: currentRawResponse!.status,
|
|
311
|
+
body: currentRawResponse!.parsedBody,
|
|
312
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
const lro = new LroImpl(
|
|
318
|
+
sendOperation,
|
|
217
319
|
{
|
|
218
320
|
resourceGroupName,
|
|
219
321
|
resourceName,
|
|
220
322
|
digitalTwinsPatchDescription,
|
|
221
323
|
options
|
|
222
324
|
},
|
|
223
|
-
|
|
224
|
-
|
|
325
|
+
updateOperationSpec
|
|
326
|
+
);
|
|
327
|
+
return new LroEngine(lro, {
|
|
328
|
+
resumeFrom: options?.resumeFrom,
|
|
329
|
+
intervalInMs: options?.updateIntervalInMs
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Update metadata of DigitalTwinsInstance.
|
|
335
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
336
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
337
|
+
* @param digitalTwinsPatchDescription The DigitalTwinsInstance and security metadata.
|
|
338
|
+
* @param options The options parameters.
|
|
339
|
+
*/
|
|
340
|
+
async beginUpdateAndWait(
|
|
341
|
+
resourceGroupName: string,
|
|
342
|
+
resourceName: string,
|
|
343
|
+
digitalTwinsPatchDescription: DigitalTwinsPatchDescription,
|
|
344
|
+
options?: DigitalTwinsUpdateOptionalParams
|
|
345
|
+
): Promise<DigitalTwinsUpdateResponse> {
|
|
346
|
+
const poller = await this.beginUpdate(
|
|
347
|
+
resourceGroupName,
|
|
348
|
+
resourceName,
|
|
349
|
+
digitalTwinsPatchDescription,
|
|
350
|
+
options
|
|
351
|
+
);
|
|
352
|
+
return poller.pollUntilDone();
|
|
225
353
|
}
|
|
226
354
|
|
|
227
355
|
/**
|
|
228
356
|
* Delete a DigitalTwinsInstance.
|
|
229
357
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
230
358
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
231
|
-
* @param
|
|
232
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
359
|
+
* @param options The options parameters.
|
|
233
360
|
*/
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
361
|
+
async beginDelete(
|
|
362
|
+
resourceGroupName: string,
|
|
363
|
+
resourceName: string,
|
|
364
|
+
options?: DigitalTwinsDeleteOptionalParams
|
|
365
|
+
): Promise<
|
|
366
|
+
PollerLike<
|
|
367
|
+
PollOperationState<DigitalTwinsDeleteResponse>,
|
|
368
|
+
DigitalTwinsDeleteResponse
|
|
369
|
+
>
|
|
370
|
+
> {
|
|
371
|
+
const directSendOperation = async (
|
|
372
|
+
args: coreClient.OperationArguments,
|
|
373
|
+
spec: coreClient.OperationSpec
|
|
374
|
+
): Promise<DigitalTwinsDeleteResponse> => {
|
|
375
|
+
return this.client.sendOperationRequest(args, spec);
|
|
376
|
+
};
|
|
377
|
+
const sendOperation = async (
|
|
378
|
+
args: coreClient.OperationArguments,
|
|
379
|
+
spec: coreClient.OperationSpec
|
|
380
|
+
) => {
|
|
381
|
+
let currentRawResponse:
|
|
382
|
+
| coreClient.FullOperationResponse
|
|
383
|
+
| undefined = undefined;
|
|
384
|
+
const providedCallback = args.options?.onResponse;
|
|
385
|
+
const callback: coreClient.RawResponseCallback = (
|
|
386
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
387
|
+
flatResponse: unknown
|
|
388
|
+
) => {
|
|
389
|
+
currentRawResponse = rawResponse;
|
|
390
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
391
|
+
};
|
|
392
|
+
const updatedArgs = {
|
|
393
|
+
...args,
|
|
394
|
+
options: {
|
|
395
|
+
...args.options,
|
|
396
|
+
onResponse: callback
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
400
|
+
return {
|
|
401
|
+
flatResponse,
|
|
402
|
+
rawResponse: {
|
|
403
|
+
statusCode: currentRawResponse!.status,
|
|
404
|
+
body: currentRawResponse!.parsedBody,
|
|
405
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
const lro = new LroImpl(
|
|
411
|
+
sendOperation,
|
|
412
|
+
{ resourceGroupName, resourceName, options },
|
|
413
|
+
deleteOperationSpec
|
|
414
|
+
);
|
|
415
|
+
return new LroEngine(lro, {
|
|
416
|
+
resumeFrom: options?.resumeFrom,
|
|
417
|
+
intervalInMs: options?.updateIntervalInMs
|
|
418
|
+
});
|
|
243
419
|
}
|
|
244
420
|
|
|
245
421
|
/**
|
|
246
|
-
*
|
|
247
|
-
* @param
|
|
248
|
-
* @param
|
|
249
|
-
* @
|
|
422
|
+
* Delete a DigitalTwinsInstance.
|
|
423
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
424
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
425
|
+
* @param options The options parameters.
|
|
250
426
|
*/
|
|
251
|
-
|
|
427
|
+
async beginDeleteAndWait(
|
|
428
|
+
resourceGroupName: string,
|
|
429
|
+
resourceName: string,
|
|
430
|
+
options?: DigitalTwinsDeleteOptionalParams
|
|
431
|
+
): Promise<DigitalTwinsDeleteResponse> {
|
|
432
|
+
const poller = await this.beginDelete(
|
|
433
|
+
resourceGroupName,
|
|
434
|
+
resourceName,
|
|
435
|
+
options
|
|
436
|
+
);
|
|
437
|
+
return poller.pollUntilDone();
|
|
438
|
+
}
|
|
439
|
+
|
|
252
440
|
/**
|
|
253
|
-
*
|
|
254
|
-
* @param
|
|
441
|
+
* Get all the DigitalTwinsInstances in a subscription.
|
|
442
|
+
* @param options The options parameters.
|
|
255
443
|
*/
|
|
256
|
-
|
|
444
|
+
private _list(
|
|
445
|
+
options?: DigitalTwinsListOptionalParams
|
|
446
|
+
): Promise<DigitalTwinsListResponse> {
|
|
447
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
448
|
+
}
|
|
449
|
+
|
|
257
450
|
/**
|
|
258
|
-
*
|
|
259
|
-
* @param
|
|
260
|
-
* @param
|
|
451
|
+
* Get all the DigitalTwinsInstances in a resource group.
|
|
452
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
453
|
+
* @param options The options parameters.
|
|
261
454
|
*/
|
|
262
|
-
|
|
263
|
-
|
|
455
|
+
private _listByResourceGroup(
|
|
456
|
+
resourceGroupName: string,
|
|
457
|
+
options?: DigitalTwinsListByResourceGroupOptionalParams
|
|
458
|
+
): Promise<DigitalTwinsListByResourceGroupResponse> {
|
|
264
459
|
return this.client.sendOperationRequest(
|
|
265
|
-
{
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
},
|
|
269
|
-
listNextOperationSpec,
|
|
270
|
-
callback) as Promise<Models.DigitalTwinsListNextResponse>;
|
|
460
|
+
{ resourceGroupName, options },
|
|
461
|
+
listByResourceGroupOperationSpec
|
|
462
|
+
);
|
|
271
463
|
}
|
|
272
464
|
|
|
273
465
|
/**
|
|
274
|
-
*
|
|
275
|
-
* @param
|
|
276
|
-
* @param
|
|
277
|
-
*
|
|
466
|
+
* Check if a DigitalTwinsInstance name is available.
|
|
467
|
+
* @param location Location of DigitalTwinsInstance.
|
|
468
|
+
* @param digitalTwinsInstanceCheckName Set the name parameter in the DigitalTwinsInstanceCheckName
|
|
469
|
+
* structure to the name of the DigitalTwinsInstance to check.
|
|
470
|
+
* @param options The options parameters.
|
|
278
471
|
*/
|
|
279
|
-
|
|
472
|
+
checkNameAvailability(
|
|
473
|
+
location: string,
|
|
474
|
+
digitalTwinsInstanceCheckName: CheckNameRequest,
|
|
475
|
+
options?: DigitalTwinsCheckNameAvailabilityOptionalParams
|
|
476
|
+
): Promise<DigitalTwinsCheckNameAvailabilityResponse> {
|
|
477
|
+
return this.client.sendOperationRequest(
|
|
478
|
+
{ location, digitalTwinsInstanceCheckName, options },
|
|
479
|
+
checkNameAvailabilityOperationSpec
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
|
|
280
483
|
/**
|
|
281
|
-
*
|
|
282
|
-
* @param
|
|
484
|
+
* ListNext
|
|
485
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
486
|
+
* @param options The options parameters.
|
|
283
487
|
*/
|
|
284
|
-
|
|
488
|
+
private _listNext(
|
|
489
|
+
nextLink: string,
|
|
490
|
+
options?: DigitalTwinsListNextOptionalParams
|
|
491
|
+
): Promise<DigitalTwinsListNextResponse> {
|
|
492
|
+
return this.client.sendOperationRequest(
|
|
493
|
+
{ nextLink, options },
|
|
494
|
+
listNextOperationSpec
|
|
495
|
+
);
|
|
496
|
+
}
|
|
497
|
+
|
|
285
498
|
/**
|
|
286
|
-
*
|
|
287
|
-
* @param
|
|
288
|
-
* @param
|
|
499
|
+
* ListByResourceGroupNext
|
|
500
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
501
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
502
|
+
* @param options The options parameters.
|
|
289
503
|
*/
|
|
290
|
-
|
|
291
|
-
|
|
504
|
+
private _listByResourceGroupNext(
|
|
505
|
+
resourceGroupName: string,
|
|
506
|
+
nextLink: string,
|
|
507
|
+
options?: DigitalTwinsListByResourceGroupNextOptionalParams
|
|
508
|
+
): Promise<DigitalTwinsListByResourceGroupNextResponse> {
|
|
292
509
|
return this.client.sendOperationRequest(
|
|
293
|
-
{
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
},
|
|
297
|
-
listByResourceGroupNextOperationSpec,
|
|
298
|
-
callback) as Promise<Models.DigitalTwinsListByResourceGroupNextResponse>;
|
|
510
|
+
{ resourceGroupName, nextLink, options },
|
|
511
|
+
listByResourceGroupNextOperationSpec
|
|
512
|
+
);
|
|
299
513
|
}
|
|
300
514
|
}
|
|
301
|
-
|
|
302
515
|
// Operation Specifications
|
|
303
|
-
const serializer =
|
|
304
|
-
|
|
516
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
517
|
+
|
|
518
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
519
|
+
path:
|
|
520
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}",
|
|
305
521
|
httpMethod: "GET",
|
|
306
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}",
|
|
307
|
-
urlParameters: [
|
|
308
|
-
Parameters.subscriptionId,
|
|
309
|
-
Parameters.resourceGroupName,
|
|
310
|
-
Parameters.resourceName
|
|
311
|
-
],
|
|
312
|
-
queryParameters: [
|
|
313
|
-
Parameters.apiVersion
|
|
314
|
-
],
|
|
315
|
-
headerParameters: [
|
|
316
|
-
Parameters.acceptLanguage
|
|
317
|
-
],
|
|
318
522
|
responses: {
|
|
319
523
|
200: {
|
|
320
524
|
bodyMapper: Mappers.DigitalTwinsDescription
|
|
@@ -323,110 +527,86 @@ const getOperationSpec: msRest.OperationSpec = {
|
|
|
323
527
|
bodyMapper: Mappers.ErrorResponse
|
|
324
528
|
}
|
|
325
529
|
},
|
|
326
|
-
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
const listOperationSpec: msRest.OperationSpec = {
|
|
330
|
-
httpMethod: "GET",
|
|
331
|
-
path: "subscriptions/{subscriptionId}/providers/Microsoft.DigitalTwins/digitalTwinsInstances",
|
|
530
|
+
queryParameters: [Parameters.apiVersion],
|
|
332
531
|
urlParameters: [
|
|
333
|
-
Parameters
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
Parameters.
|
|
337
|
-
],
|
|
338
|
-
headerParameters: [
|
|
339
|
-
Parameters.acceptLanguage
|
|
532
|
+
Parameters.$host,
|
|
533
|
+
Parameters.subscriptionId,
|
|
534
|
+
Parameters.resourceGroupName,
|
|
535
|
+
Parameters.resourceName
|
|
340
536
|
],
|
|
341
|
-
|
|
342
|
-
200: {
|
|
343
|
-
bodyMapper: Mappers.DigitalTwinsDescriptionListResult
|
|
344
|
-
},
|
|
345
|
-
default: {
|
|
346
|
-
bodyMapper: Mappers.ErrorResponse
|
|
347
|
-
}
|
|
348
|
-
},
|
|
537
|
+
headerParameters: [Parameters.accept],
|
|
349
538
|
serializer
|
|
350
539
|
};
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
urlParameters: [
|
|
356
|
-
Parameters.subscriptionId,
|
|
357
|
-
Parameters.resourceGroupName
|
|
358
|
-
],
|
|
359
|
-
queryParameters: [
|
|
360
|
-
Parameters.apiVersion
|
|
361
|
-
],
|
|
362
|
-
headerParameters: [
|
|
363
|
-
Parameters.acceptLanguage
|
|
364
|
-
],
|
|
540
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
541
|
+
path:
|
|
542
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}",
|
|
543
|
+
httpMethod: "PUT",
|
|
365
544
|
responses: {
|
|
366
545
|
200: {
|
|
367
|
-
bodyMapper: Mappers.
|
|
546
|
+
bodyMapper: Mappers.DigitalTwinsDescription
|
|
547
|
+
},
|
|
548
|
+
201: {
|
|
549
|
+
bodyMapper: Mappers.DigitalTwinsDescription
|
|
550
|
+
},
|
|
551
|
+
202: {
|
|
552
|
+
bodyMapper: Mappers.DigitalTwinsDescription
|
|
553
|
+
},
|
|
554
|
+
204: {
|
|
555
|
+
bodyMapper: Mappers.DigitalTwinsDescription
|
|
368
556
|
},
|
|
369
557
|
default: {
|
|
370
558
|
bodyMapper: Mappers.ErrorResponse
|
|
371
559
|
}
|
|
372
560
|
},
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
const checkNameAvailabilityOperationSpec: msRest.OperationSpec = {
|
|
377
|
-
httpMethod: "POST",
|
|
378
|
-
path: "subscriptions/{subscriptionId}/providers/Microsoft.DigitalTwins/locations/{location}/checkNameAvailability",
|
|
561
|
+
requestBody: Parameters.digitalTwinsCreate,
|
|
562
|
+
queryParameters: [Parameters.apiVersion],
|
|
379
563
|
urlParameters: [
|
|
564
|
+
Parameters.$host,
|
|
380
565
|
Parameters.subscriptionId,
|
|
381
|
-
Parameters.
|
|
382
|
-
|
|
383
|
-
queryParameters: [
|
|
384
|
-
Parameters.apiVersion
|
|
385
|
-
],
|
|
386
|
-
headerParameters: [
|
|
387
|
-
Parameters.acceptLanguage
|
|
566
|
+
Parameters.resourceGroupName,
|
|
567
|
+
Parameters.resourceName
|
|
388
568
|
],
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
},
|
|
569
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
570
|
+
mediaType: "json",
|
|
571
|
+
serializer
|
|
572
|
+
};
|
|
573
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
574
|
+
path:
|
|
575
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}",
|
|
576
|
+
httpMethod: "PATCH",
|
|
398
577
|
responses: {
|
|
399
578
|
200: {
|
|
400
|
-
bodyMapper: Mappers.
|
|
579
|
+
bodyMapper: Mappers.DigitalTwinsDescription
|
|
580
|
+
},
|
|
581
|
+
201: {
|
|
582
|
+
bodyMapper: Mappers.DigitalTwinsDescription
|
|
583
|
+
},
|
|
584
|
+
202: {
|
|
585
|
+
bodyMapper: Mappers.DigitalTwinsDescription
|
|
586
|
+
},
|
|
587
|
+
204: {
|
|
588
|
+
bodyMapper: Mappers.DigitalTwinsDescription
|
|
401
589
|
},
|
|
402
590
|
default: {
|
|
403
591
|
bodyMapper: Mappers.ErrorResponse
|
|
404
592
|
}
|
|
405
593
|
},
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
|
|
410
|
-
httpMethod: "PUT",
|
|
411
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}",
|
|
594
|
+
requestBody: Parameters.digitalTwinsPatchDescription,
|
|
595
|
+
queryParameters: [Parameters.apiVersion],
|
|
412
596
|
urlParameters: [
|
|
597
|
+
Parameters.$host,
|
|
413
598
|
Parameters.subscriptionId,
|
|
414
599
|
Parameters.resourceGroupName,
|
|
415
600
|
Parameters.resourceName
|
|
416
601
|
],
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
mapper: {
|
|
426
|
-
...Mappers.DigitalTwinsDescription,
|
|
427
|
-
required: true
|
|
428
|
-
}
|
|
429
|
-
},
|
|
602
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
603
|
+
mediaType: "json",
|
|
604
|
+
serializer
|
|
605
|
+
};
|
|
606
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
607
|
+
path:
|
|
608
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}",
|
|
609
|
+
httpMethod: "DELETE",
|
|
430
610
|
responses: {
|
|
431
611
|
200: {
|
|
432
612
|
bodyMapper: Mappers.DigitalTwinsDescription
|
|
@@ -434,90 +614,90 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
|
|
|
434
614
|
201: {
|
|
435
615
|
bodyMapper: Mappers.DigitalTwinsDescription
|
|
436
616
|
},
|
|
617
|
+
202: {
|
|
618
|
+
bodyMapper: Mappers.DigitalTwinsDescription
|
|
619
|
+
},
|
|
620
|
+
204: {
|
|
621
|
+
bodyMapper: Mappers.DigitalTwinsDescription
|
|
622
|
+
},
|
|
437
623
|
default: {
|
|
438
624
|
bodyMapper: Mappers.ErrorResponse
|
|
439
625
|
}
|
|
440
626
|
},
|
|
441
|
-
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
const beginUpdateOperationSpec: msRest.OperationSpec = {
|
|
445
|
-
httpMethod: "PATCH",
|
|
446
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}",
|
|
627
|
+
queryParameters: [Parameters.apiVersion],
|
|
447
628
|
urlParameters: [
|
|
629
|
+
Parameters.$host,
|
|
448
630
|
Parameters.subscriptionId,
|
|
449
631
|
Parameters.resourceGroupName,
|
|
450
632
|
Parameters.resourceName
|
|
451
633
|
],
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
parameterPath: "digitalTwinsPatchDescription",
|
|
460
|
-
mapper: {
|
|
461
|
-
...Mappers.DigitalTwinsPatchDescription,
|
|
462
|
-
required: true
|
|
463
|
-
}
|
|
464
|
-
},
|
|
634
|
+
headerParameters: [Parameters.accept],
|
|
635
|
+
serializer
|
|
636
|
+
};
|
|
637
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
638
|
+
path:
|
|
639
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.DigitalTwins/digitalTwinsInstances",
|
|
640
|
+
httpMethod: "GET",
|
|
465
641
|
responses: {
|
|
466
642
|
200: {
|
|
467
|
-
bodyMapper: Mappers.
|
|
468
|
-
},
|
|
469
|
-
202: {
|
|
470
|
-
bodyMapper: Mappers.DigitalTwinsDescription
|
|
643
|
+
bodyMapper: Mappers.DigitalTwinsDescriptionListResult
|
|
471
644
|
},
|
|
472
645
|
default: {
|
|
473
646
|
bodyMapper: Mappers.ErrorResponse
|
|
474
647
|
}
|
|
475
648
|
},
|
|
649
|
+
queryParameters: [Parameters.apiVersion],
|
|
650
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
651
|
+
headerParameters: [Parameters.accept],
|
|
476
652
|
serializer
|
|
477
653
|
};
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
654
|
+
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
655
|
+
path:
|
|
656
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances",
|
|
657
|
+
httpMethod: "GET",
|
|
658
|
+
responses: {
|
|
659
|
+
200: {
|
|
660
|
+
bodyMapper: Mappers.DigitalTwinsDescriptionListResult
|
|
661
|
+
},
|
|
662
|
+
default: {
|
|
663
|
+
bodyMapper: Mappers.ErrorResponse
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
queryParameters: [Parameters.apiVersion],
|
|
482
667
|
urlParameters: [
|
|
668
|
+
Parameters.$host,
|
|
483
669
|
Parameters.subscriptionId,
|
|
484
|
-
Parameters.resourceGroupName
|
|
485
|
-
Parameters.resourceName
|
|
486
|
-
],
|
|
487
|
-
queryParameters: [
|
|
488
|
-
Parameters.apiVersion
|
|
489
|
-
],
|
|
490
|
-
headerParameters: [
|
|
491
|
-
Parameters.acceptLanguage
|
|
670
|
+
Parameters.resourceGroupName
|
|
492
671
|
],
|
|
672
|
+
headerParameters: [Parameters.accept],
|
|
673
|
+
serializer
|
|
674
|
+
};
|
|
675
|
+
const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {
|
|
676
|
+
path:
|
|
677
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.DigitalTwins/locations/{location}/checkNameAvailability",
|
|
678
|
+
httpMethod: "POST",
|
|
493
679
|
responses: {
|
|
494
680
|
200: {
|
|
495
|
-
bodyMapper: Mappers.
|
|
496
|
-
},
|
|
497
|
-
202: {
|
|
498
|
-
bodyMapper: Mappers.DigitalTwinsDescription
|
|
681
|
+
bodyMapper: Mappers.CheckNameResult
|
|
499
682
|
},
|
|
500
|
-
204: {},
|
|
501
683
|
default: {
|
|
502
684
|
bodyMapper: Mappers.ErrorResponse
|
|
503
685
|
}
|
|
504
686
|
},
|
|
687
|
+
requestBody: Parameters.digitalTwinsInstanceCheckName,
|
|
688
|
+
queryParameters: [Parameters.apiVersion],
|
|
689
|
+
urlParameters: [
|
|
690
|
+
Parameters.$host,
|
|
691
|
+
Parameters.subscriptionId,
|
|
692
|
+
Parameters.location
|
|
693
|
+
],
|
|
694
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
695
|
+
mediaType: "json",
|
|
505
696
|
serializer
|
|
506
697
|
};
|
|
507
|
-
|
|
508
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
509
|
-
httpMethod: "GET",
|
|
510
|
-
baseUrl: "https://management.azure.com",
|
|
698
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
511
699
|
path: "{nextLink}",
|
|
512
|
-
|
|
513
|
-
Parameters.nextPageLink
|
|
514
|
-
],
|
|
515
|
-
queryParameters: [
|
|
516
|
-
Parameters.apiVersion
|
|
517
|
-
],
|
|
518
|
-
headerParameters: [
|
|
519
|
-
Parameters.acceptLanguage
|
|
520
|
-
],
|
|
700
|
+
httpMethod: "GET",
|
|
521
701
|
responses: {
|
|
522
702
|
200: {
|
|
523
703
|
bodyMapper: Mappers.DigitalTwinsDescriptionListResult
|
|
@@ -526,22 +706,18 @@ const listNextOperationSpec: msRest.OperationSpec = {
|
|
|
526
706
|
bodyMapper: Mappers.ErrorResponse
|
|
527
707
|
}
|
|
528
708
|
},
|
|
709
|
+
queryParameters: [Parameters.apiVersion],
|
|
710
|
+
urlParameters: [
|
|
711
|
+
Parameters.$host,
|
|
712
|
+
Parameters.subscriptionId,
|
|
713
|
+
Parameters.nextLink
|
|
714
|
+
],
|
|
715
|
+
headerParameters: [Parameters.accept],
|
|
529
716
|
serializer
|
|
530
717
|
};
|
|
531
|
-
|
|
532
|
-
const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
|
|
533
|
-
httpMethod: "GET",
|
|
534
|
-
baseUrl: "https://management.azure.com",
|
|
718
|
+
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
535
719
|
path: "{nextLink}",
|
|
536
|
-
|
|
537
|
-
Parameters.nextPageLink
|
|
538
|
-
],
|
|
539
|
-
queryParameters: [
|
|
540
|
-
Parameters.apiVersion
|
|
541
|
-
],
|
|
542
|
-
headerParameters: [
|
|
543
|
-
Parameters.acceptLanguage
|
|
544
|
-
],
|
|
720
|
+
httpMethod: "GET",
|
|
545
721
|
responses: {
|
|
546
722
|
200: {
|
|
547
723
|
bodyMapper: Mappers.DigitalTwinsDescriptionListResult
|
|
@@ -550,5 +726,13 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
|
|
|
550
726
|
bodyMapper: Mappers.ErrorResponse
|
|
551
727
|
}
|
|
552
728
|
},
|
|
729
|
+
queryParameters: [Parameters.apiVersion],
|
|
730
|
+
urlParameters: [
|
|
731
|
+
Parameters.$host,
|
|
732
|
+
Parameters.subscriptionId,
|
|
733
|
+
Parameters.resourceGroupName,
|
|
734
|
+
Parameters.nextLink
|
|
735
|
+
],
|
|
736
|
+
headerParameters: [Parameters.accept],
|
|
553
737
|
serializer
|
|
554
738
|
};
|