Skip to content

Commit

Permalink
CodeGen from PR 14365 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 0ceaffba972ebba0153a6c052f4336d9c918d0ba into 19e140f6f848bf9616735a7bd360edeef25c6c8d
  • Loading branch information
SDKAuto committed May 18, 2021
1 parent 3ca024f commit 22408a2
Show file tree
Hide file tree
Showing 13 changed files with 1,374 additions and 1,057 deletions.
9 changes: 4 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 @@ -23,6 +24,7 @@ class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientC
snapshots: operations.Snapshots;
snapshotPolicies: operations.SnapshotPolicies;
backups: operations.Backups;
volumeRestoreStatus: operations.VolumeRestoreStatus;
accountBackups: operations.AccountBackups;
backupPolicies: operations.BackupPolicies;
vaults: operations.Vaults;
Expand All @@ -34,11 +36,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 All @@ -48,6 +46,7 @@ class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientC
this.snapshots = new operations.Snapshots(this);
this.snapshotPolicies = new operations.SnapshotPolicies(this);
this.backups = new operations.Backups(this);
this.volumeRestoreStatus = new operations.VolumeRestoreStatus(this);
this.accountBackups = new operations.AccountBackups(this);
this.backupPolicies = new operations.BackupPolicies(this);
this.vaults = new operations.Vaults(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-04-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 22408a2

Please sign in to comment.