Skip to content

Commit

Permalink
CodeGen from PR 13814 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Anf 10997 NetApp Files update swagger rest api to 2021-02-01 (Azure#13814)

* Add api-version 2021-02-01 folder

* apply udpates

* Update readme

* update backaupStatus operationid

* Update account encryption settings

* Pretty

* Fix plural

* Add x-ms-pageable to AccountBackups_List

* change next link

* remove tag from backup proxy resource

* revert change to 2020-12

* remove tag from backup proxy resource

* Add x-ms-pageable to AccountBackups_List

* Pretty

* Add Snapshotpolicy to volumePatch

* Add Snapshotpolicy to volumeupdate example file

* Change subscription id in example

* Change subscription id in example

* pretty

* Remove AccountEncryption proptery, some non funcitonal validation warning fixes

* Fix example for backupoperators and securityoperators

* Remove readme.azureresourceschema.md

* Adding tags back to backuppatch, removing needs breaking change reivew

* fix prettier

Co-authored-by: Audunn Baldvinsson <audunn.baldvinsson@netapp.com>
  • Loading branch information
SDKAuto and audunn committed May 21, 2021
1 parent bb5fd9a commit e4c6170
Show file tree
Hide file tree
Showing 8 changed files with 766 additions and 1,030 deletions.
7 changes: 2 additions & 5 deletions sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import * as Mappers from "./models/mappers";
import * as operations from "./operations";
import { AzureNetAppFilesManagementClientContext } from "./azureNetAppFilesManagementClientContext";


class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientContext {
// Operation groups
operations: operations.Operations;
Expand All @@ -34,11 +35,7 @@ class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientC
* subscription. The subscription ID forms part of the URI for every service call.
* @param [options] The parameter options
*/
constructor(
credentials: msRest.ServiceClientCredentials,
subscriptionId: string,
options?: Models.AzureNetAppFilesManagementClientOptions
) {
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureNetAppFilesManagementClientOptions) {
super(credentials, subscriptionId, options);
this.operations = new operations.Operations(this);
this.netAppResource = new operations.NetAppResource(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,36 @@ export class AzureNetAppFilesManagementClientContext extends msRestAzure.AzureSe
* subscription. The subscription ID forms part of the URI for every service call.
* @param [options] The parameter options
*/
constructor(
credentials: msRest.ServiceClientCredentials,
subscriptionId: string,
options?: Models.AzureNetAppFilesManagementClientOptions
) {
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureNetAppFilesManagementClientOptions) {
if (credentials == undefined) {
throw new Error("'credentials' cannot be null.");
throw new Error('\'credentials\' cannot be null.');
}
if (subscriptionId == undefined) {
throw new Error("'subscriptionId' cannot be null.");
throw new Error('\'subscriptionId\' cannot be null.');
}

if (!options) {
options = {};
}
if (!options.userAgent) {
if(!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}

super(credentials, options);

this.apiVersion = "2021-02-01";
this.acceptLanguage = "en-US";
this.apiVersion = '2021-02-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
this.subscriptionId = subscriptionId;

if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if (
options.longRunningOperationRetryTimeout !== null &&
options.longRunningOperationRetryTimeout !== undefined
) {
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
}
Expand Down
Loading

0 comments on commit e4c6170

Please sign in to comment.