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 11, 2021
1 parent 4d0b93f commit 20a9dcb
Show file tree
Hide file tree
Showing 12 changed files with 218 additions and 241 deletions.
6 changes: 2 additions & 4 deletions sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientC
volumes: operations.Volumes;
snapshots: operations.Snapshots;
snapshotPolicies: operations.SnapshotPolicies;
volumeBackupStatus: operations.VolumeBackupStatus;
accountBackups: operations.AccountBackups;
backups: operations.Backups;
accountBackups: operations.AccountBackups;
backupPolicies: operations.BackupPolicies;
vaults: operations.Vaults;

Expand All @@ -45,9 +44,8 @@ class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientC
this.volumes = new operations.Volumes(this);
this.snapshots = new operations.Snapshots(this);
this.snapshotPolicies = new operations.SnapshotPolicies(this);
this.volumeBackupStatus = new operations.VolumeBackupStatus(this);
this.accountBackups = new operations.AccountBackups(this);
this.backups = new operations.Backups(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 @@ -37,25 +37,25 @@ export class AzureNetAppFilesManagementClientContext extends msRestAzure.AzureSe
if (!options) {
options = {};
}
if (!options.userAgent) {
if(!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}

super(credentials, options);

this.apiVersion = '2020-12-01';
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
1 change: 1 addition & 0 deletions sdk/netapp/arm-netapp/src/models/backupsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export {
BackupPolicyDetails,
BackupPolicyPatch,
BackupsList,
BackupStatus,
BaseResource,
CapacityPool,
CapacityPoolPatch,
Expand Down
126 changes: 70 additions & 56 deletions sdk/netapp/arm-netapp/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ export interface Volume extends BaseResource {
*/
exportPolicy?: VolumePropertiesExportPolicy;
/**
* protocolTypes. Set of protocol types, default NFSv3, CIFS fro SMB protocol
* protocolTypes. Set of protocol types, default NFSv3, CIFS for SMB protocol
*/
protocolTypes?: string[];
/**
Expand Down Expand Up @@ -834,7 +834,7 @@ export interface Volume extends BaseResource {
}

/**
* An interface representing ResourceIdentity.
* Identity for the resource.
*/
export interface ResourceIdentity {
/**
Expand Down Expand Up @@ -899,6 +899,10 @@ export interface VolumePatchPropertiesDataProtection {
* Backup. Backup Properties
*/
backup?: VolumeBackupProperties;
/**
* Snapshot. Snapshot properties.
*/
snapshot?: VolumeSnapshotProperties;
}

/**
Expand Down Expand Up @@ -1395,10 +1399,10 @@ export interface Backup extends BaseResource {
*/
label?: string;
/**
* Type of backup adhoc or scheduled
* backupType. Type of backup Manual or Scheduled. Possible values include: 'Manual', 'Scheduled'
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly backupType?: string;
readonly backupType?: BackupType;
/**
* Failure reason
* **NOTE: This property will not be serialized. It can only be populated by the server.**
Expand All @@ -1409,6 +1413,11 @@ export interface Backup extends BaseResource {
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly volumeName?: string;
/**
* Manual backup an already existing snapshot. This will always be false for scheduled backups
* and true/false for manual backups. Default value: false.
*/
useExistingSnapshot?: boolean;
}

/**
Expand Down Expand Up @@ -1444,10 +1453,10 @@ export interface BackupPatch extends BaseResource {
*/
label?: string;
/**
* Type of backup adhoc or scheduled
* backupType. Type of backup Manual or Scheduled. Possible values include: 'Manual', 'Scheduled'
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly backupType?: string;
readonly backupType?: BackupType;
/**
* Failure reason
* **NOTE: This property will not be serialized. It can only be populated by the server.**
Expand All @@ -1458,6 +1467,11 @@ export interface BackupPatch extends BaseResource {
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly volumeName?: string;
/**
* Manual backup an already existing snapshot. This will always be false for scheduled backups
* and true/false for manual backups. Default value: false.
*/
useExistingSnapshot?: boolean;
}

/**
Expand Down Expand Up @@ -1801,52 +1815,24 @@ export interface VolumesBeginAuthorizeReplicationOptionalParams extends msRest.R
remoteVolumeResourceId?: string;
}

/**
* Optional Parameters.
*/
export interface BackupsCreateOptionalParams extends msRest.RequestOptionsBase {
/**
* Label for backup
*/
label?: string;
}

/**
* Optional Parameters.
*/
export interface BackupsUpdateOptionalParams extends msRest.RequestOptionsBase {
/**
* Resource tags
*/
tags?: { [propertyName: string]: string };
/**
* Label for backup
*/
label?: string;
}

/**
* Optional Parameters.
*/
export interface BackupsBeginCreateOptionalParams extends msRest.RequestOptionsBase {
/**
* Label for backup
* Backup object supplied in the body of the operation.
*/
label?: string;
body?: BackupPatch;
}

/**
* Optional Parameters.
*/
export interface BackupsBeginUpdateOptionalParams extends msRest.RequestOptionsBase {
/**
* Resource tags
*/
tags?: { [propertyName: string]: string };
/**
* Label for backup
* Backup object supplied in the body of the operation.
*/
label?: string;
body?: BackupPatch;
}

/**
Expand Down Expand Up @@ -2043,6 +2029,14 @@ export type RelationshipStatus = 'Idle' | 'Transferring';
*/
export type MirrorState = 'Uninitialized' | 'Mirrored' | 'Broken';

/**
* Defines values for BackupType.
* Possible values include: 'Manual', 'Scheduled'
* @readonly
* @enum {string}
*/
export type BackupType = 'Manual' | 'Scheduled';

/**
* Contains response data for the list operation.
*/
Expand Down Expand Up @@ -2804,9 +2798,9 @@ export type SnapshotPoliciesBeginUpdateResponse = SnapshotPolicy & {
};

/**
* Contains response data for the get operation.
* Contains response data for the getStatus operation.
*/
export type VolumeBackupStatusGetResponse = BackupStatus & {
export type BackupsGetStatusResponse = BackupStatus & {
/**
* The underlying HTTP response.
*/
Expand All @@ -2826,7 +2820,7 @@ export type VolumeBackupStatusGetResponse = BackupStatus & {
/**
* Contains response data for the list operation.
*/
export type AccountBackupsListResponse = BackupsList & {
export type BackupsListResponse = BackupsList & {
/**
* The underlying HTTP response.
*/
Expand All @@ -2846,7 +2840,7 @@ export type AccountBackupsListResponse = BackupsList & {
/**
* Contains response data for the get operation.
*/
export type AccountBackupsGetResponse = Backup & {
export type BackupsGetResponse = Backup & {
/**
* The underlying HTTP response.
*/
Expand All @@ -2864,9 +2858,9 @@ export type AccountBackupsGetResponse = Backup & {
};

/**
* Contains response data for the list operation.
* Contains response data for the create operation.
*/
export type BackupsListResponse = BackupsList & {
export type BackupsCreateResponse = Backup & {
/**
* The underlying HTTP response.
*/
Expand All @@ -2879,14 +2873,14 @@ export type BackupsListResponse = BackupsList & {
/**
* The response body as parsed JSON or XML
*/
parsedBody: BackupsList;
parsedBody: Backup;
};
};

/**
* Contains response data for the get operation.
* Contains response data for the update operation.
*/
export type BackupsGetResponse = Backup & {
export type BackupsUpdateResponse = Backup & {
/**
* The underlying HTTP response.
*/
Expand All @@ -2904,9 +2898,9 @@ export type BackupsGetResponse = Backup & {
};

/**
* Contains response data for the create operation.
* Contains response data for the beginCreate operation.
*/
export type BackupsCreateResponse = Backup & {
export type BackupsBeginCreateResponse = Backup & {
/**
* The underlying HTTP response.
*/
Expand All @@ -2924,9 +2918,9 @@ export type BackupsCreateResponse = Backup & {
};

/**
* Contains response data for the update operation.
* Contains response data for the beginUpdate operation.
*/
export type BackupsUpdateResponse = Backup & {
export type BackupsBeginUpdateResponse = Backup & {
/**
* The underlying HTTP response.
*/
Expand All @@ -2944,9 +2938,9 @@ export type BackupsUpdateResponse = Backup & {
};

/**
* Contains response data for the beginCreate operation.
* Contains response data for the list operation.
*/
export type BackupsBeginCreateResponse = Backup & {
export type AccountBackupsListResponse = BackupsList & {
/**
* The underlying HTTP response.
*/
Expand All @@ -2959,14 +2953,14 @@ export type BackupsBeginCreateResponse = Backup & {
/**
* The response body as parsed JSON or XML
*/
parsedBody: Backup;
parsedBody: BackupsList;
};
};

/**
* Contains response data for the beginUpdate operation.
* Contains response data for the get operation.
*/
export type BackupsBeginUpdateResponse = Backup & {
export type AccountBackupsGetResponse = Backup & {
/**
* The underlying HTTP response.
*/
Expand Down Expand Up @@ -3083,6 +3077,26 @@ export type BackupPoliciesBeginCreateResponse = BackupPolicy & {
};
};

/**
* Contains response data for the beginUpdate operation.
*/
export type BackupPoliciesBeginUpdateResponse = BackupPolicy & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: BackupPolicy;
};
};

/**
* Contains response data for the list operation.
*/
Expand Down
21 changes: 21 additions & 0 deletions sdk/netapp/arm-netapp/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1473,6 +1473,13 @@ export const VolumePatchPropertiesDataProtection: msRest.CompositeMapper = {
name: "Composite",
className: "VolumeBackupProperties"
}
},
snapshot: {
serializedName: "snapshot",
type: {
name: "Composite",
className: "VolumeSnapshotProperties"
}
}
}
}
Expand Down Expand Up @@ -2307,6 +2314,13 @@ export const Backup: msRest.CompositeMapper = {
type: {
name: "String"
}
},
useExistingSnapshot: {
serializedName: "properties.useExistingSnapshot",
defaultValue: false,
type: {
name: "Boolean"
}
}
}
}
Expand Down Expand Up @@ -2388,6 +2402,13 @@ export const BackupPatch: msRest.CompositeMapper = {
type: {
name: "String"
}
},
useExistingSnapshot: {
serializedName: "properties.useExistingSnapshot",
defaultValue: false,
type: {
name: "Boolean"
}
}
}
}
Expand Down
Loading

0 comments on commit 20a9dcb

Please sign in to comment.