Skip to content

Commit

Permalink
CodeGen from PR 10996 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[Hub Generated] Review request for Microsoft.DigitalTwins to add version stable/2020-12-01 (Azure#10996)

* Adds base for updating Microsoft.DigitalTwins from version stable/2020-10-31 to version 2020-12-01

* Updates readme

* Updates API version in new specs and examples

* Update swagger spec

* Modify SDK build configs

* Fix example filename reference

* Rename example file

* Fix validation errors

* Updated examples

* Revert change to behavior of async op

* Modify discriminators

* Enable two discriminators

* Fix delete endpoint example

* Attempted fix with discriminator

* Added westus2, change discriminator enum type name

* Decouple allOf from properties

* Bugfixes

* Modify response to fix validation errors

* Fix examples

* Change private link type names to be smaller

* Fix validation errors in private links

* Fix validation error related to private links

* Reference private link example

* Add public network access

* Align with GA swagger

* Update private links / private endpoints

* Fix example to use actual response status code

* Remove unused example

* Unmark private endpoint connection to be an azure resource

* Add type and name to private endpoint connection resource

* Mark id as read-only

* Fix return types for endpoint connections

* Align return of DELETE

* Fix validation errors

* Fix version tag in python.md; remove body from DELETE endpoint connection DELETE responses

* Synchronize swagger with 2020-10-31 version

* Increase resource group name max length to 90 characters

* Make publicNetworkAccess nullable

* Add publicNetworkAccess flag to PATCH request

* Fixed typo

* Fix placing of example for endpoints

* Update operation ids

* Added suppression message
  • Loading branch information
SDKAuto committed Dec 16, 2020
1 parent 6c6ce54 commit 4256e7c
Show file tree
Hide file tree
Showing 18 changed files with 1,434 additions and 92 deletions.
9 changes: 4 additions & 5 deletions sdk/digitaltwins/arm-digitaltwins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-digitaltwins

### How to use

#### nodejs - Authentication, client creation and get digitalTwins as an example written in TypeScript.
#### nodejs - client creation and get digitalTwins as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0"

##### Sample code

While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { AzureDigitalTwinsManagementClient, AzureDigitalTwinsManagementModels, AzureDigitalTwinsManagementMappers } from "@azure/arm-digitaltwins";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { AzureDigitalTwinsManagementClient } = require("@azure/arm-digitaltwins");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/digitaltwins/arm-digitaltwins/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const config = {
"@azure/ms-rest-azure-js": "msRestAzure"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand All @@ -20,6 +19,8 @@ class AzureDigitalTwinsManagementClient extends AzureDigitalTwinsManagementClien
digitalTwins: operations.DigitalTwins;
digitalTwinsEndpoint: operations.DigitalTwinsEndpoint;
operations: operations.Operations;
privateLinkResources: operations.PrivateLinkResources;
privateEndpointConnections: operations.PrivateEndpointConnections;

/**
* Initializes a new instance of the AzureDigitalTwinsManagementClient class.
Expand All @@ -32,6 +33,8 @@ class AzureDigitalTwinsManagementClient extends AzureDigitalTwinsManagementClien
this.digitalTwins = new operations.DigitalTwins(this);
this.digitalTwinsEndpoint = new operations.DigitalTwinsEndpoint(this);
this.operations = new operations.Operations(this);
this.privateLinkResources = new operations.PrivateLinkResources(this);
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand Down Expand Up @@ -44,7 +43,7 @@ export class AzureDigitalTwinsManagementClientContext extends msRestAzure.AzureS

super(credentials, options);

this.apiVersion = '2020-10-31';
this.apiVersion = '2020-12-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand All @@ -9,15 +9,23 @@
export {
discriminators,
BaseResource,
ConnectionProperties,
ConnectionPropertiesPrivateEndpoint,
ConnectionPropertiesPrivateLinkServiceConnectionState,
ConnectionState,
DigitalTwinsDescription,
DigitalTwinsEndpointResource,
DigitalTwinsEndpointResourceListResult,
DigitalTwinsEndpointResourceProperties,
DigitalTwinsIdentity,
DigitalTwinsResource,
ErrorDefinition,
ErrorResponse,
EventGrid,
EventHub,
ExternalResource,
PrivateEndpoint,
PrivateEndpointConnection,
PrivateEndpointConnectionProperties,
ServiceBus
} from "../models/mappers";
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand All @@ -11,16 +11,25 @@ export {
BaseResource,
CheckNameRequest,
CheckNameResult,
ConnectionProperties,
ConnectionPropertiesPrivateEndpoint,
ConnectionPropertiesPrivateLinkServiceConnectionState,
ConnectionState,
DigitalTwinsDescription,
DigitalTwinsDescriptionListResult,
DigitalTwinsEndpointResource,
DigitalTwinsEndpointResourceProperties,
DigitalTwinsIdentity,
DigitalTwinsPatchDescription,
DigitalTwinsPatchProperties,
DigitalTwinsResource,
ErrorDefinition,
ErrorResponse,
EventGrid,
EventHub,
ExternalResource,
PrivateEndpoint,
PrivateEndpointConnection,
PrivateEndpointConnectionProperties,
ServiceBus
} from "../models/mappers";
Loading

0 comments on commit 4256e7c

Please sign in to comment.