Skip to content

Commit 87f3c92

Browse files
author
SDKAuto
committed
CodeGen from PR 12830 in Azure/azure-rest-api-specs
Merge 52ebbcb75aca2bd4fd27460517fdc1c48e5132d4 into 42fdd45e761f87132e85ed77caf30d5cac81aee5
1 parent 2d4f843 commit 87f3c92

15 files changed

+792
-314
lines changed

sdk/mixedreality/arm-mixedreality/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Microsoft
3+
Copyright (c) 2021 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/mixedreality/arm-mixedreality/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ npm install @azure/arm-mixedreality
1515

1616
### How to use
1717

18-
#### nodejs - Authentication, client creation and list operations as an example written in TypeScript.
18+
#### nodejs - client creation and list operations as an example written in TypeScript.
1919

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

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

2727
##### Sample code
2828

29+
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
2930
```typescript
30-
import * as msRest from "@azure/ms-rest-js";
31-
import * as msRestAzure from "@azure/ms-rest-azure-js";
32-
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
33-
import { MixedRealityClient, MixedRealityModels, MixedRealityMappers } from "@azure/arm-mixedreality";
31+
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
32+
const { MixedRealityClient } = require("@azure/arm-mixedreality");
3433
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
3534

3635
msRestNodeAuth.interactiveLogin().then((creds) => {

sdk/mixedreality/arm-mixedreality/rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const config = {
2121
"@azure/ms-rest-azure-js": "msRestAzure"
2222
},
2323
banner: `/*
24-
* Copyright (c) Microsoft Corporation. All rights reserved.
25-
* Licensed under the MIT License. See License.txt in the project root for license information.
24+
* Copyright (c) Microsoft Corporation.
25+
* Licensed under the MIT License.
2626
*
2727
* Code generated by Microsoft (R) AutoRest Code Generator.
2828
* Changes may cause incorrect behavior and will be lost if the code is regenerated.

sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -79,7 +78,7 @@ const checkNameAvailabilityLocalOperationSpec: msRest.OperationSpec = {
7978
Parameters.location
8079
],
8180
queryParameters: [
82-
Parameters.apiVersion0
81+
Parameters.apiVersion
8382
],
8483
headerParameters: [
8584
Parameters.acceptLanguage

sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -17,6 +16,7 @@ const packageVersion = "2.0.0";
1716

1817
export class MixedRealityClientContext extends msRestAzure.AzureServiceClient {
1918
credentials: msRest.ServiceClientCredentials;
19+
apiVersion?: string;
2020
subscriptionId: string;
2121

2222
/**
@@ -37,24 +37,25 @@ export class MixedRealityClientContext extends msRestAzure.AzureServiceClient {
3737
if (!options) {
3838
options = {};
3939
}
40-
if (!options.userAgent) {
40+
if(!options.userAgent) {
4141
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
4242
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
4343
}
4444

4545
super(credentials, options);
4646

47+
this.apiVersion = '2021-01-01';
4748
this.acceptLanguage = 'en-US';
4849
this.longRunningOperationRetryTimeout = 30;
4950
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
5051
this.requestContentType = "application/json; charset=utf-8";
5152
this.credentials = credentials;
5253
this.subscriptionId = subscriptionId;
5354

54-
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
55+
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
5556
this.acceptLanguage = options.acceptLanguage;
5657
}
57-
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
58+
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
5859
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
5960
}
6061
}

0 commit comments

Comments
 (0)