From 27219ed7d06fbbcf05905e02c496d40ae91a9b11 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 6 Jan 2022 05:33:21 +0000 Subject: [PATCH] CodeGen from PR 17258 in Azure/azure-rest-api-specs Merge 60598e02140d02fb2652b4f293e939975d793a10 into ac40996ab146d1360a4783665bb6c0b13f345aec --- common/config/rush/pnpm-lock.yaml | 27 +- rush.json | 5 + sdk/netapp/arm-netapp/CHANGELOG.md | 11 + sdk/netapp/arm-netapp/LICENSE | 21 + sdk/netapp/arm-netapp/README.md | 150 +- sdk/netapp/arm-netapp/_meta.json | 7 + sdk/netapp/arm-netapp/api-extractor.json | 18 + sdk/netapp/arm-netapp/package.json | 95 +- .../arm-netapp/review/arm-netapp.api.md | 1681 ++++++ sdk/netapp/arm-netapp/rollup.config.js | 211 +- .../src/azureNetAppFilesManagementClient.ts | 68 - ...azureNetAppFilesManagementClientContext.ts | 68 - .../netAppResourceMappers.ts => index.ts} | 11 +- sdk/netapp/arm-netapp/src/lroImpl.ts | 34 + .../src/models/accountBackupsMappers.ts | 44 - .../arm-netapp/src/models/accountsMappers.ts | 44 - .../src/models/backupPoliciesMappers.ts | 44 - .../arm-netapp/src/models/backupsMappers.ts | 46 - sdk/netapp/arm-netapp/src/models/index.ts | 4598 +++++++---------- sdk/netapp/arm-netapp/src/models/mappers.ts | 3901 ++++++++------ .../src/models/operationsMappers.ts | 17 - .../arm-netapp/src/models/parameters.ts | 332 +- .../arm-netapp/src/models/poolsMappers.ts | 44 - .../src/models/snapshotPoliciesMappers.ts | 46 - .../arm-netapp/src/models/snapshotsMappers.ts | 44 - .../arm-netapp/src/models/vaultsMappers.ts | 44 - .../arm-netapp/src/models/volumesMappers.ts | 49 - .../arm-netapp/src/netAppManagementClient.ts | 128 + .../src/operations/accountBackups.ts | 319 +- .../arm-netapp/src/operations/accounts.ts | 749 ++- .../src/operations/backupPolicies.ts | 613 ++- .../arm-netapp/src/operations/backups.ts | 799 +-- sdk/netapp/arm-netapp/src/operations/index.ts | 5 +- .../src/operations/netAppResource.ts | 316 +- .../operations/netAppResourceQuotaLimits.ts | 150 + .../arm-netapp/src/operations/operations.ts | 108 +- sdk/netapp/arm-netapp/src/operations/pools.ts | 693 ++- .../src/operations/snapshotPolicies.ts | 634 ++- .../arm-netapp/src/operations/snapshots.ts | 690 ++- .../arm-netapp/src/operations/vaults.ts | 132 +- .../arm-netapp/src/operations/volumeGroups.ts | 408 ++ .../arm-netapp/src/operations/volumes.ts | 1738 ++++--- .../operationsInterfaces/accountBackups.ts | 72 + .../src/operationsInterfaces/accounts.ts | 139 + .../operationsInterfaces/backupPolicies.ts | 147 + .../src/operationsInterfaces/backups.ts | 202 + .../src/operationsInterfaces/index.ts | 21 + .../operationsInterfaces/netAppResource.ts | 66 + .../netAppResourceQuotaLimits.ts | 40 + .../src/operationsInterfaces/operations.ts | 22 + .../src/operationsInterfaces/pools.ts | 144 + .../operationsInterfaces/snapshotPolicies.ts | 142 + .../src/operationsInterfaces/snapshots.ts | 178 + .../src/operationsInterfaces/vaults.ts | 26 + .../src/operationsInterfaces/volumeGroups.ts | 110 + .../src/operationsInterfaces/volumes.ts | 413 ++ sdk/netapp/arm-netapp/test/sampleTest.ts | 48 + sdk/netapp/arm-netapp/tsconfig.json | 6 +- sdk/netapp/ci.yml | 29 + 59 files changed, 13432 insertions(+), 7515 deletions(-) create mode 100644 sdk/netapp/arm-netapp/CHANGELOG.md create mode 100644 sdk/netapp/arm-netapp/LICENSE create mode 100644 sdk/netapp/arm-netapp/_meta.json create mode 100644 sdk/netapp/arm-netapp/api-extractor.json create mode 100644 sdk/netapp/arm-netapp/review/arm-netapp.api.md delete mode 100644 sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts delete mode 100644 sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts rename sdk/netapp/arm-netapp/src/{models/netAppResourceMappers.ts => index.ts} (56%) create mode 100644 sdk/netapp/arm-netapp/src/lroImpl.ts delete mode 100644 sdk/netapp/arm-netapp/src/models/accountBackupsMappers.ts delete mode 100644 sdk/netapp/arm-netapp/src/models/accountsMappers.ts delete mode 100644 sdk/netapp/arm-netapp/src/models/backupPoliciesMappers.ts delete mode 100644 sdk/netapp/arm-netapp/src/models/backupsMappers.ts delete mode 100644 sdk/netapp/arm-netapp/src/models/operationsMappers.ts delete mode 100644 sdk/netapp/arm-netapp/src/models/poolsMappers.ts delete mode 100644 sdk/netapp/arm-netapp/src/models/snapshotPoliciesMappers.ts delete mode 100644 sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts delete mode 100644 sdk/netapp/arm-netapp/src/models/vaultsMappers.ts delete mode 100644 sdk/netapp/arm-netapp/src/models/volumesMappers.ts create mode 100644 sdk/netapp/arm-netapp/src/netAppManagementClient.ts create mode 100644 sdk/netapp/arm-netapp/src/operations/netAppResourceQuotaLimits.ts create mode 100644 sdk/netapp/arm-netapp/src/operations/volumeGroups.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/accountBackups.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/accounts.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/backupPolicies.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/backups.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResource.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResourceQuotaLimits.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/operations.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/pools.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/snapshotPolicies.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/snapshots.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/vaults.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/volumeGroups.ts create mode 100644 sdk/netapp/arm-netapp/src/operationsInterfaces/volumes.ts create mode 100644 sdk/netapp/arm-netapp/test/sampleTest.ts create mode 100644 sdk/netapp/ci.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ffaec559068f..fdf5ca66c14d 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -51,6 +51,7 @@ specifiers: '@rush-temp/arm-monitor': file:./projects/arm-monitor.tgz '@rush-temp/arm-msi': file:./projects/arm-msi.tgz '@rush-temp/arm-mysql': file:./projects/arm-mysql.tgz + '@rush-temp/arm-netapp': file:./projects/arm-netapp.tgz '@rush-temp/arm-network': file:./projects/arm-network.tgz '@rush-temp/arm-notificationhubs': file:./projects/arm-notificationhubs.tgz '@rush-temp/arm-operationalinsights': file:./projects/arm-operationalinsights.tgz @@ -232,6 +233,7 @@ dependencies: '@rush-temp/arm-monitor': file:projects/arm-monitor.tgz '@rush-temp/arm-msi': file:projects/arm-msi.tgz '@rush-temp/arm-mysql': file:projects/arm-mysql.tgz + '@rush-temp/arm-netapp': file:projects/arm-netapp.tgz '@rush-temp/arm-network': file:projects/arm-network.tgz '@rush-temp/arm-notificationhubs': file:projects/arm-notificationhubs.tgz '@rush-temp/arm-operationalinsights': file:projects/arm-operationalinsights.tgz @@ -7821,7 +7823,7 @@ packages: dev: false file:projects/ai-metrics-advisor.tgz: - resolution: {integrity: sha512-s+dMun5WpGbbWhDl0LQ+IrlxsmxCrjL4bPHQ12W24hW1A/QjfX1BcCeEwursFC/LMPUt+vLYQhrmLT33O1o3xw==, tarball: file:projects/ai-metrics-advisor.tgz} + resolution: {integrity: sha512-U0OBdhA2UsNoYOBkp/0tnP6b3pblzKhmggJFKaC2pUrpKftVfWGTCh3c1B4pzpfA7YG4tjrp2B3A7EbuWpU83A==, tarball: file:projects/ai-metrics-advisor.tgz} name: '@rush-temp/ai-metrics-advisor' version: 0.0.0 dependencies: @@ -8854,6 +8856,27 @@ packages: uglify-js: 3.14.5 dev: false + file:projects/arm-netapp.tgz: + resolution: {integrity: sha512-TZtf4C0O7AB8trlapej7rLjV348ze9fS9pM3G9rP3oBrhhmbQYkJvmZCF2sVtFR04KtpuTRAimQTfB0kAWn2mg==, tarball: file:projects/arm-netapp.tgz} + name: '@rush-temp/arm-netapp' + version: 0.0.0 + dependencies: + '@microsoft/api-extractor': 7.19.2 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + tslib: 2.3.1 + typescript: 4.2.4 + uglify-js: 3.14.5 + dev: false + file:projects/arm-network.tgz: resolution: {integrity: sha512-J8QVJGGP8gib3NmM31KhY3xrAZVOikN3WQ0ORE5D6pol6+kD9/13usF/G0OEW6xaHZMmCTLTID2q8iBKkffOIw==, tarball: file:projects/arm-network.tgz} name: '@rush-temp/arm-network' @@ -11712,7 +11735,7 @@ packages: dev: false file:projects/monitor-query.tgz: - resolution: {integrity: sha512-F7qKV2Ge+sv8/xFVsPWmCv75v87nMDRm3Q+JuyyTQlh4PXsxpnUTz2g9Q32wYuBYqcKsov9TKc2XhSp6poIBew==, tarball: file:projects/monitor-query.tgz} + resolution: {integrity: sha512-3tAn0vXw53fi/gF+/DDq4KqenujlXI1TiQKHdzNUCzLnOmOG+ehh8H6ZOeEgkBpqq+FxTxUG1g6nF1K9rECjwA==, tarball: file:projects/monitor-query.tgz} name: '@rush-temp/monitor-query' version: 0.0.0 dependencies: diff --git a/rush.json b/rush.json index 66a9aa13703f..ca4ce827047d 100644 --- a/rush.json +++ b/rush.json @@ -1215,6 +1215,11 @@ "packageName": "@azure/arm-containerinstance", "projectFolder": "sdk/containerinstance/arm-containerinstance", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-netapp", + "projectFolder": "sdk/netapp/arm-netapp", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/netapp/arm-netapp/CHANGELOG.md b/sdk/netapp/arm-netapp/CHANGELOG.md new file mode 100644 index 000000000000..6d5110840763 --- /dev/null +++ b/sdk/netapp/arm-netapp/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 15.0.0 (2022-01-06) + +The package of @azure/arm-netapp is using our next generation design principles since version 15.0.0, which contains breaking changes. + +To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/netapp/arm-netapp/LICENSE b/sdk/netapp/arm-netapp/LICENSE new file mode 100644 index 000000000000..5d1d36e0af80 --- /dev/null +++ b/sdk/netapp/arm-netapp/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/netapp/arm-netapp/README.md b/sdk/netapp/arm-netapp/README.md index ddef6dafc283..2d9c2f1ee4ef 100644 --- a/sdk/netapp/arm-netapp/README.md +++ b/sdk/netapp/arm-netapp/README.md @@ -1,106 +1,98 @@ -## Azure AzureNetAppFilesManagementClient SDK for JavaScript +# Azure NetAppManagement client library for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureNetAppFilesManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure NetAppManagement client. + +Microsoft NetApp Files Azure Resource Provider specification + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/netapp/arm-netapp) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-netapp) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-netapp) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites -You must have an [Azure subscription](https://azure.microsoft.com/free/). +- An [Azure subscription][azure_sub]. -### How to install +### Install the `@azure/arm-netapp` package -To use this SDK in your project, you will need to install two packages. -- `@azure/arm-netapp` that contains the client. -- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. +Install the Azure NetAppManagement client library for JavaScript with `npm`: -Install both packages using the below command: ```bash -npm install --save @azure/arm-netapp @azure/identity +npm install @azure/arm-netapp ``` -> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. -If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. -### How to use +### Create and authenticate a `NetAppManagementClient` + +To create a client object to access the Azure NetAppManagement API, you will need the `endpoint` of your Azure NetAppManagement resource and a `credential`. The Azure NetAppManagement client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure NetAppManagement resource in the [Azure Portal][azure_portal]. + +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: -- If you are writing a client side browser application, - - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. - - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. -- If you are writing a server side application, - - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) - - Complete the set up steps required by the credential if any. - - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. +```bash +npm install @azure/identity +``` -In the below samples, we pass the credential and the Azure subscription id to instantiate the client. -Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. -#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. +You will also need to **register a new AAD application and grant access to Azure NetAppManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. -##### Sample code +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). ```javascript +const { NetAppManagementClient } = require("@azure/arm-netapp"); const { DefaultAzureCredential } = require("@azure/identity"); -const { AzureNetAppFilesManagementClient } = require("@azure/arm-netapp"); -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples -// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. -const creds = new DefaultAzureCredential(); -const client = new AzureNetAppFilesManagementClient(creds, subscriptionId); -client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); -}).catch((err) => { - console.log("An error occurred:"); - console.error(err); -}); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new NetAppManagementClient(new DefaultAzureCredential(), subscriptionId); ``` -#### browser - Authentication, client creation, and list operations as an example written in JavaScript. - -In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. - - Note down the client Id from the previous step and use it in the browser sample below. - -##### Sample code - -- index.html - -```html - - - - @azure/arm-netapp sample - - - - - - - + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### NetAppManagementClient + +`NetAppManagementClient` is the primary interface for developers using the Azure NetAppManagement client library. Explore the methods on this client object to understand the different features of the Azure NetAppManagement service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); ``` +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + ## Related projects -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fnetapp%2Farm-netapp%2FREADME.png) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/netapp/arm-netapp/README.png) +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/netapp/arm-netapp/_meta.json b/sdk/netapp/arm-netapp/_meta.json new file mode 100644 index 000000000000..0199ff4fddc4 --- /dev/null +++ b/sdk/netapp/arm-netapp/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "178fe404f9cc585b0708f59efb830d5180340a36", + "readme": "specification/netapp/resource-manager/readme.md", + "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/netapp/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" +} \ No newline at end of file diff --git a/sdk/netapp/arm-netapp/api-extractor.json b/sdk/netapp/arm-netapp/api-extractor.json new file mode 100644 index 000000000000..0f53b33ec840 --- /dev/null +++ b/sdk/netapp/arm-netapp/api-extractor.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-netapp.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/netapp/arm-netapp/package.json b/sdk/netapp/arm-netapp/package.json index 2bd722c709bc..be936478e955 100644 --- a/sdk/netapp/arm-netapp/package.json +++ b/sdk/netapp/arm-netapp/package.json @@ -1,58 +1,91 @@ { "name": "@azure/arm-netapp", + "sdk-type": "mgmt", "author": "Microsoft Corporation", - "description": "AzureNetAppFilesManagementClient Library with typescript type definitions for node.js and browser.", - "version": "14.1.0", + "description": "A generated SDK for NetAppManagementClient.", + "version": "15.0.0", + "engines": { "node": ">=12.0.0" }, "dependencies": { - "@azure/ms-rest-azure-js": "^2.1.0", - "@azure/ms-rest-js": "^2.2.0", - "@azure/core-auth": "^1.1.4", - "tslib": "^1.10.0" + "@azure/core-lro": "^2.2.0", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.1.0", + "tslib": "^2.2.0" }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], + "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], "license": "MIT", - "main": "./dist/arm-netapp.js", - "module": "./esm/azureNetAppFilesManagementClient.js", - "types": "./esm/azureNetAppFilesManagementClient.d.ts", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-netapp.d.ts", "devDependencies": { - "typescript": "^3.6.0", - "rollup": "^1.18.0", - "rollup-plugin-node-resolve": "^5.2.0", + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "mkdirp": "^1.0.4", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.6.0" + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/netapp/arm-netapp", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, + "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", "dist/**/*.d.ts.map", - "esm/**/*.js", - "esm/**/*.js.map", - "esm/**/*.d.ts", - "esm/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", "src/**/*.ts", "README.md", + "LICENSE", "rollup.config.js", - "tsconfig.json" + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" ], "scripts": { - "build": "tsc && rollup -c rollup.config.js && npm run minify", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-netapp.js.map'\" -o ./dist/arm-netapp.min.js ./dist/arm-netapp.js", - "prepack": "npm install && npm run build" + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" }, "sideEffects": false, "autoPublish": true diff --git a/sdk/netapp/arm-netapp/review/arm-netapp.api.md b/sdk/netapp/arm-netapp/review/arm-netapp.api.md new file mode 100644 index 000000000000..70cb8f73718a --- /dev/null +++ b/sdk/netapp/arm-netapp/review/arm-netapp.api.md @@ -0,0 +1,1681 @@ +## API Report File for "@azure/arm-netapp" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; + +// @public +export interface AccountBackups { + beginDelete(resourceGroupName: string, accountName: string, backupName: string, options?: AccountBackupsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, backupName: string, options?: AccountBackupsDeleteOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, backupName: string, options?: AccountBackupsGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: AccountBackupsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AccountBackupsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface AccountBackupsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountBackupsGetResponse = Backup; + +// @public +export interface AccountBackupsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountBackupsListResponse = BackupsList; + +// @public +export interface AccountEncryption { + keySource?: string; +} + +// @public +export interface Accounts { + beginCreateOrUpdate(resourceGroupName: string, accountName: string, body: NetAppAccount, options?: AccountsCreateOrUpdateOptionalParams): Promise, AccountsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, accountName: string, body: NetAppAccount, options?: AccountsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, options?: AccountsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, options?: AccountsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, body: NetAppAccountPatch, options?: AccountsUpdateOptionalParams): Promise, AccountsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, body: NetAppAccountPatch, options?: AccountsUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, options?: AccountsGetOptionalParams): Promise; + list(resourceGroupName: string, options?: AccountsListOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: AccountsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AccountsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AccountsCreateOrUpdateResponse = NetAppAccount; + +// @public +export interface AccountsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface AccountsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsGetResponse = NetAppAccount; + +// @public +export interface AccountsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsListBySubscriptionNextResponse = NetAppAccountList; + +// @public +export interface AccountsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsListBySubscriptionResponse = NetAppAccountList; + +// @public +export interface AccountsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsListNextResponse = NetAppAccountList; + +// @public +export interface AccountsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccountsListResponse = NetAppAccountList; + +// @public +export interface AccountsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AccountsUpdateResponse = NetAppAccount; + +// @public +export interface ActiveDirectory { + activeDirectoryId?: string; + administrators?: string[]; + adName?: string; + aesEncryption?: boolean; + allowLocalNfsUsersWithLdap?: boolean; + backupOperators?: string[]; + dns?: string; + domain?: string; + encryptDCConnections?: boolean; + kdcIP?: string; + ldapOverTLS?: boolean; + ldapSigning?: boolean; + organizationalUnit?: string; + password?: string; + securityOperators?: string[]; + serverRootCACertificate?: string; + site?: string; + smbServerName?: string; + readonly status?: ActiveDirectoryStatus; + readonly statusDetails?: string; + username?: string; +} + +// @public +export type ActiveDirectoryStatus = string; + +// @public +export type ApplicationType = string; + +// @public +export interface AuthorizeRequest { + remoteVolumeResourceId?: string; +} + +// @public +export type AvsDataStore = string; + +// @public +export interface Backup { + readonly backupId?: string; + readonly backupType?: BackupType; + readonly creationDate?: Date; + readonly failureReason?: string; + readonly id?: string; + label?: string; + location: string; + readonly name?: string; + readonly provisioningState?: string; + readonly size?: number; + readonly type?: string; + useExistingSnapshot?: boolean; + readonly volumeName?: string; +} + +// @public +export interface BackupPatch { + readonly backupId?: string; + readonly backupType?: BackupType; + readonly creationDate?: Date; + readonly failureReason?: string; + label?: string; + readonly provisioningState?: string; + readonly size?: number; + tags?: { + [propertyName: string]: string; + }; + useExistingSnapshot?: boolean; + readonly volumeName?: string; +} + +// @public +export interface BackupPolicies { + beginCreate(resourceGroupName: string, accountName: string, backupPolicyName: string, body: BackupPolicy, options?: BackupPoliciesCreateOptionalParams): Promise, BackupPoliciesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, accountName: string, backupPolicyName: string, body: BackupPolicy, options?: BackupPoliciesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, backupPolicyName: string, options?: BackupPoliciesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, backupPolicyName: string, options?: BackupPoliciesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, backupPolicyName: string, body: BackupPolicyPatch, options?: BackupPoliciesUpdateOptionalParams): Promise, BackupPoliciesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, backupPolicyName: string, body: BackupPolicyPatch, options?: BackupPoliciesUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, backupPolicyName: string, options?: BackupPoliciesGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: BackupPoliciesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface BackupPoliciesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BackupPoliciesCreateResponse = BackupPolicy; + +// @public +export interface BackupPoliciesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BackupPoliciesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BackupPoliciesGetResponse = BackupPolicy; + +// @public +export interface BackupPoliciesList { + value?: BackupPolicy[]; +} + +// @public +export interface BackupPoliciesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BackupPoliciesListResponse = BackupPoliciesList; + +// @public +export interface BackupPoliciesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BackupPoliciesUpdateResponse = BackupPolicy; + +// @public +export interface BackupPolicy { + readonly backupPolicyId?: string; + dailyBackupsToKeep?: number; + enabled?: boolean; + readonly etag?: string; + readonly id?: string; + location: string; + monthlyBackupsToKeep?: number; + readonly name?: string; + readonly provisioningState?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; + readonly volumeBackups?: VolumeBackups[]; + readonly volumesAssigned?: number; + weeklyBackupsToKeep?: number; +} + +// @public +export interface BackupPolicyDetails { + readonly backupPolicyId?: string; + dailyBackupsToKeep?: number; + enabled?: boolean; + readonly id?: string; + location?: string; + monthlyBackupsToKeep?: number; + readonly name?: string; + readonly provisioningState?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; + readonly volumeBackups?: VolumeBackups[]; + readonly volumesAssigned?: number; + weeklyBackupsToKeep?: number; +} + +// @public +export interface BackupPolicyPatch { + readonly backupPolicyId?: string; + dailyBackupsToKeep?: number; + enabled?: boolean; + readonly id?: string; + location?: string; + monthlyBackupsToKeep?: number; + readonly name?: string; + readonly provisioningState?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; + readonly volumeBackups?: VolumeBackups[]; + readonly volumesAssigned?: number; + weeklyBackupsToKeep?: number; +} + +// @public +export interface Backups { + beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, body: Backup, options?: BackupsCreateOptionalParams): Promise, BackupsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, body: Backup, options?: BackupsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: BackupsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: BackupsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: BackupsUpdateOptionalParams): Promise, BackupsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: BackupsUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: BackupsGetOptionalParams): Promise; + getStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: BackupsGetStatusOptionalParams): Promise; + getVolumeRestoreStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: BackupsGetVolumeRestoreStatusOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: BackupsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface BackupsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BackupsCreateResponse = Backup; + +// @public +export interface BackupsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BackupsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BackupsGetResponse = Backup; + +// @public +export interface BackupsGetStatusOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BackupsGetStatusResponse = BackupStatus; + +// @public +export interface BackupsGetVolumeRestoreStatusOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BackupsGetVolumeRestoreStatusResponse = RestoreStatus; + +// @public +export interface BackupsList { + value?: Backup[]; +} + +// @public +export interface BackupsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BackupsListResponse = BackupsList; + +// @public +export interface BackupStatus { + readonly errorMessage?: string; + readonly healthy?: boolean; + readonly lastTransferSize?: number; + readonly lastTransferType?: string; + readonly mirrorState?: MirrorState; + readonly relationshipStatus?: RelationshipStatus; + readonly totalTransferBytes?: number; + readonly unhealthyReason?: string; +} + +// @public +export interface BackupsUpdateOptionalParams extends coreClient.OperationOptions { + body?: BackupPatch; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BackupsUpdateResponse = Backup; + +// @public +export type BackupType = string; + +// @public +export interface BreakReplicationRequest { + forceBreakReplication?: boolean; +} + +// @public +export interface CapacityPool { + coolAccess?: boolean; + encryptionType?: EncryptionType; + readonly etag?: string; + readonly id?: string; + location: string; + readonly name?: string; + readonly poolId?: string; + readonly provisioningState?: string; + qosType?: QosType; + serviceLevel: ServiceLevel; + size: number; + tags?: { + [propertyName: string]: string; + }; + readonly totalThroughputMibps?: number; + readonly type?: string; + readonly utilizedThroughputMibps?: number; +} + +// @public +export interface CapacityPoolList { + nextLink?: string; + value?: CapacityPool[]; +} + +// @public +export interface CapacityPoolPatch { + readonly id?: string; + location?: string; + readonly name?: string; + qosType?: QosType; + size?: number; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface CheckAvailabilityResponse { + isAvailable?: boolean; + message?: string; + reason?: InAvailabilityReasonType; +} + +// @public +export type CheckNameResourceTypes = string; + +// @public +export type CheckQuotaNameResourceTypes = string; + +// @public +export type ChownMode = string; + +// @public +export interface CloudError { + error?: CloudErrorBody; +} + +// @public +export interface CloudErrorBody { + code?: string; + message?: string; +} + +// @public +export type CreatedByType = string; + +// @public +export interface DailySchedule { + hour?: number; + minute?: number; + snapshotsToKeep?: number; + usedBytes?: number; +} + +// @public +export interface Dimension { + displayName?: string; + name?: string; +} + +// @public +export type EncryptionType = string; + +// @public +export type EndpointType = string; + +// @public +export interface ExportPolicyRule { + allowedClients?: string; + chownMode?: ChownMode; + cifs?: boolean; + hasRootAccess?: boolean; + kerberos5IReadOnly?: boolean; + kerberos5IReadWrite?: boolean; + kerberos5PReadOnly?: boolean; + kerberos5PReadWrite?: boolean; + kerberos5ReadOnly?: boolean; + kerberos5ReadWrite?: boolean; + nfsv3?: boolean; + nfsv41?: boolean; + ruleIndex?: number; + unixReadOnly?: boolean; + unixReadWrite?: boolean; +} + +// @public +export interface FilePathAvailabilityRequest { + name: string; + subnetId: string; +} + +// @public +export interface HourlySchedule { + minute?: number; + snapshotsToKeep?: number; + usedBytes?: number; +} + +// @public +export type InAvailabilityReasonType = string; + +// @public +export enum KnownActiveDirectoryStatus { + Created = "Created", + Deleted = "Deleted", + Error = "Error", + InUse = "InUse", + Updating = "Updating" +} + +// @public +export enum KnownApplicationType { + // (undocumented) + SAPHana = "SAP-HANA" +} + +// @public +export enum KnownAvsDataStore { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownBackupType { + Manual = "Manual", + Scheduled = "Scheduled" +} + +// @public +export enum KnownCheckNameResourceTypes { + // (undocumented) + MicrosoftNetAppNetAppAccounts = "Microsoft.NetApp/netAppAccounts", + // (undocumented) + MicrosoftNetAppNetAppAccountsCapacityPools = "Microsoft.NetApp/netAppAccounts/capacityPools", + // (undocumented) + MicrosoftNetAppNetAppAccountsCapacityPoolsVolumes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes", + // (undocumented) + MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" +} + +// @public +export enum KnownCheckQuotaNameResourceTypes { + // (undocumented) + MicrosoftNetAppNetAppAccounts = "Microsoft.NetApp/netAppAccounts", + // (undocumented) + MicrosoftNetAppNetAppAccountsCapacityPools = "Microsoft.NetApp/netAppAccounts/capacityPools", + // (undocumented) + MicrosoftNetAppNetAppAccountsCapacityPoolsVolumes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes", + // (undocumented) + MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" +} + +// @public +export enum KnownChownMode { + // (undocumented) + Restricted = "Restricted", + // (undocumented) + Unrestricted = "Unrestricted" +} + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownEncryptionType { + Double = "Double", + Single = "Single" +} + +// @public +export enum KnownEndpointType { + // (undocumented) + Dst = "dst", + // (undocumented) + Src = "src" +} + +// @public +export enum KnownInAvailabilityReasonType { + // (undocumented) + AlreadyExists = "AlreadyExists", + // (undocumented) + Invalid = "Invalid" +} + +// @public +export enum KnownMetricAggregationType { + // (undocumented) + Average = "Average" +} + +// @public +export enum KnownMirrorState { + // (undocumented) + Broken = "Broken", + // (undocumented) + Mirrored = "Mirrored", + // (undocumented) + Uninitialized = "Uninitialized" +} + +// @public +export enum KnownNetworkFeatures { + Basic = "Basic", + Standard = "Standard" +} + +// @public +export enum KnownQosType { + Auto = "Auto", + Manual = "Manual" +} + +// @public +export enum KnownRelationshipStatus { + // (undocumented) + Idle = "Idle", + // (undocumented) + Transferring = "Transferring" +} + +// @public +export enum KnownReplicationSchedule { + // (undocumented) + "10Minutely" = "_10minutely", + // (undocumented) + Daily = "daily", + // (undocumented) + Hourly = "hourly" +} + +// @public +export enum KnownSecurityStyle { + // (undocumented) + Ntfs = "ntfs", + // (undocumented) + Unix = "unix" +} + +// @public +export enum KnownServiceLevel { + Premium = "Premium", + Standard = "Standard", + StandardZRS = "StandardZRS", + Ultra = "Ultra" +} + +// @public +export enum KnownVolumeStorageToNetworkProximity { + Default = "Default", + T1 = "T1", + T2 = "T2" +} + +// @public +export interface LogSpecification { + displayName?: string; + name?: string; +} + +// @public +export type MetricAggregationType = string; + +// @public +export interface MetricSpecification { + aggregationType?: string; + category?: string; + dimensions?: Dimension[]; + displayDescription?: string; + displayName?: string; + enableRegionalMdmAccount?: boolean; + fillGapWithZero?: boolean; + internalMetricName?: string; + isInternal?: boolean; + name?: string; + resourceIdDimensionNameOverride?: string; + sourceMdmAccount?: string; + sourceMdmNamespace?: string; + supportedAggregationTypes?: MetricAggregationType[]; + supportedTimeGrainTypes?: string[]; + unit?: string; +} + +// @public +export type MirrorState = string; + +// @public +export interface MonthlySchedule { + daysOfMonth?: string; + hour?: number; + minute?: number; + snapshotsToKeep?: number; + usedBytes?: number; +} + +// @public +export interface MountTarget { + fileSystemId: string; + readonly id?: string; + readonly ipAddress?: string; + location: string; + readonly mountTargetId?: string; + readonly name?: string; + smbServerFqdn?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface MountTargetProperties { + fileSystemId: string; + readonly ipAddress?: string; + readonly mountTargetId?: string; + smbServerFqdn?: string; +} + +// @public +export interface NetAppAccount { + activeDirectories?: ActiveDirectory[]; + encryption?: AccountEncryption; + readonly etag?: string; + readonly id?: string; + location: string; + readonly name?: string; + readonly provisioningState?: string; + readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface NetAppAccountList { + nextLink?: string; + value?: NetAppAccount[]; +} + +// @public +export interface NetAppAccountPatch { + activeDirectories?: ActiveDirectory[]; + encryption?: AccountEncryption; + readonly id?: string; + location?: string; + readonly name?: string; + readonly provisioningState?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public (undocumented) +export class NetAppManagementClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: NetAppManagementClientOptionalParams); + // (undocumented) + accountBackups: AccountBackups; + // (undocumented) + accounts: Accounts; + // (undocumented) + apiVersion: string; + // (undocumented) + backupPolicies: BackupPolicies; + // (undocumented) + backups: Backups; + // (undocumented) + netAppResource: NetAppResource; + // (undocumented) + netAppResourceQuotaLimits: NetAppResourceQuotaLimits; + // (undocumented) + operations: Operations; + // (undocumented) + pools: Pools; + // (undocumented) + snapshotPolicies: SnapshotPolicies; + // (undocumented) + snapshots: Snapshots; + // (undocumented) + subscriptionId: string; + // (undocumented) + vaults: Vaults; + // (undocumented) + volumeGroups: VolumeGroups; + // (undocumented) + volumes: Volumes; +} + +// @public +export interface NetAppManagementClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export interface NetAppResource { + checkFilePathAvailability(location: string, name: string, subnetId: string, options?: NetAppResourceCheckFilePathAvailabilityOptionalParams): Promise; + checkNameAvailability(location: string, name: string, resourceGroup: string, typeParam: CheckNameResourceTypes, options?: NetAppResourceCheckNameAvailabilityOptionalParams): Promise; + checkQuotaAvailability(location: string, name: string, resourceGroup: string, typeParam: CheckQuotaNameResourceTypes, options?: NetAppResourceCheckQuotaAvailabilityOptionalParams): Promise; +} + +// @public +export interface NetAppResourceCheckFilePathAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetAppResourceCheckFilePathAvailabilityResponse = CheckAvailabilityResponse; + +// @public +export interface NetAppResourceCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetAppResourceCheckNameAvailabilityResponse = CheckAvailabilityResponse; + +// @public +export interface NetAppResourceCheckQuotaAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetAppResourceCheckQuotaAvailabilityResponse = CheckAvailabilityResponse; + +// @public +export interface NetAppResourceQuotaLimits { + get(location: string, quotaLimitName: string, options?: NetAppResourceQuotaLimitsGetOptionalParams): Promise; + list(location: string, options?: NetAppResourceQuotaLimitsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetAppResourceQuotaLimitsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetAppResourceQuotaLimitsGetResponse = SubscriptionQuotaItem; + +// @public +export interface NetAppResourceQuotaLimitsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetAppResourceQuotaLimitsListResponse = SubscriptionQuotaItemList; + +// @public +export type NetworkFeatures = string; + +// @public +export interface Operation { + display?: OperationDisplay; + name?: string; + origin?: string; + serviceSpecification?: ServiceSpecification; +} + +// @public +export interface OperationDisplay { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface OperationListResult { + value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export interface PlacementKeyValuePairs { + key: string; + value: string; +} + +// @public +export interface PoolChangeRequest { + newPoolResourceId: string; +} + +// @public +export interface Pools { + beginCreateOrUpdate(resourceGroupName: string, accountName: string, poolName: string, body: CapacityPool, options?: PoolsCreateOrUpdateOptionalParams): Promise, PoolsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, body: CapacityPool, options?: PoolsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, poolName: string, options?: PoolsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, poolName: string, options?: PoolsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, poolName: string, body: CapacityPoolPatch, options?: PoolsUpdateOptionalParams): Promise, PoolsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, body: CapacityPoolPatch, options?: PoolsUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, poolName: string, options?: PoolsGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: PoolsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PoolsCreateOrUpdateResponse = CapacityPool; + +// @public +export interface PoolsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PoolsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PoolsGetResponse = CapacityPool; + +// @public +export interface PoolsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PoolsListNextResponse = CapacityPoolList; + +// @public +export interface PoolsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PoolsListResponse = CapacityPoolList; + +// @public +export interface PoolsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PoolsUpdateResponse = CapacityPool; + +// @public +export type ProxyResource = Resource & {}; + +// @public +export type QosType = string; + +// @public +export interface QuotaAvailabilityRequest { + name: string; + resourceGroup: string; + type: CheckQuotaNameResourceTypes; +} + +// @public +export type RelationshipStatus = string; + +// @public +export interface ReplicationObject { + endpointType?: EndpointType; + remoteVolumeRegion?: string; + remoteVolumeResourceId: string; + replicationId?: string; + replicationSchedule?: ReplicationSchedule; +} + +// @public +export type ReplicationSchedule = string; + +// @public +export interface ReplicationStatus { + errorMessage?: string; + healthy?: boolean; + mirrorState?: MirrorState; + relationshipStatus?: RelationshipStatus; + totalProgress?: string; +} + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface ResourceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type?: string; +} + +// @public +export interface ResourceNameAvailabilityRequest { + name: string; + resourceGroup: string; + type: CheckNameResourceTypes; +} + +// @public +export interface RestoreStatus { + readonly errorMessage?: string; + readonly healthy?: boolean; + readonly mirrorState?: MirrorState; + readonly relationshipStatus?: RelationshipStatus; + readonly totalTransferBytes?: number; + readonly unhealthyReason?: string; +} + +// @public +export type SecurityStyle = string; + +// @public +export type ServiceLevel = string; + +// @public +export interface ServiceSpecification { + logSpecifications?: LogSpecification[]; + metricSpecifications?: MetricSpecification[]; +} + +// @public +export interface Snapshot { + readonly created?: Date; + readonly id?: string; + location: string; + readonly name?: string; + readonly provisioningState?: string; + readonly snapshotId?: string; + readonly type?: string; +} + +// @public +export interface SnapshotPolicies { + beginDelete(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: SnapshotPoliciesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: SnapshotPoliciesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, snapshotPolicyName: string, body: SnapshotPolicyPatch, options?: SnapshotPoliciesUpdateOptionalParams): Promise, SnapshotPoliciesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, snapshotPolicyName: string, body: SnapshotPolicyPatch, options?: SnapshotPoliciesUpdateOptionalParams): Promise; + create(resourceGroupName: string, accountName: string, snapshotPolicyName: string, body: SnapshotPolicy, options?: SnapshotPoliciesCreateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: SnapshotPoliciesGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: SnapshotPoliciesListOptionalParams): PagedAsyncIterableIterator; + listVolumes(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: SnapshotPoliciesListVolumesOptionalParams): Promise; +} + +// @public +export interface SnapshotPoliciesCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotPoliciesCreateResponse = SnapshotPolicy; + +// @public +export interface SnapshotPoliciesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface SnapshotPoliciesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotPoliciesGetResponse = SnapshotPolicy; + +// @public +export interface SnapshotPoliciesList { + value?: SnapshotPolicy[]; +} + +// @public +export interface SnapshotPoliciesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotPoliciesListResponse = SnapshotPoliciesList; + +// @public +export interface SnapshotPoliciesListVolumesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotPoliciesListVolumesResponse = SnapshotPolicyVolumeList; + +// @public +export interface SnapshotPoliciesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SnapshotPoliciesUpdateResponse = SnapshotPolicy; + +// @public +export interface SnapshotPolicy { + dailySchedule?: DailySchedule; + enabled?: boolean; + readonly etag?: string; + hourlySchedule?: HourlySchedule; + readonly id?: string; + location: string; + monthlySchedule?: MonthlySchedule; + readonly name?: string; + readonly provisioningState?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; + weeklySchedule?: WeeklySchedule; +} + +// @public +export interface SnapshotPolicyDetails { + dailySchedule?: DailySchedule; + enabled?: boolean; + hourlySchedule?: HourlySchedule; + readonly id?: string; + location?: string; + monthlySchedule?: MonthlySchedule; + readonly name?: string; + readonly provisioningState?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; + weeklySchedule?: WeeklySchedule; +} + +// @public +export interface SnapshotPolicyPatch { + dailySchedule?: DailySchedule; + enabled?: boolean; + hourlySchedule?: HourlySchedule; + readonly id?: string; + location?: string; + monthlySchedule?: MonthlySchedule; + readonly name?: string; + readonly provisioningState?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; + weeklySchedule?: WeeklySchedule; +} + +// @public +export interface SnapshotPolicyVolumeList { + value?: Volume[]; +} + +// @public +export interface Snapshots { + beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Snapshot, options?: SnapshotsCreateOptionalParams): Promise, SnapshotsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Snapshot, options?: SnapshotsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Record, options?: SnapshotsUpdateOptionalParams): Promise, SnapshotsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Record, options?: SnapshotsUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: SnapshotsGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: SnapshotsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SnapshotsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SnapshotsCreateResponse = Snapshot; + +// @public +export interface SnapshotsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface SnapshotsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotsGetResponse = Snapshot; + +// @public +export interface SnapshotsList { + value?: Snapshot[]; +} + +// @public +export interface SnapshotsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotsListResponse = SnapshotsList; + +// @public +export interface SnapshotsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SnapshotsUpdateResponse = Snapshot; + +// @public +export type SubscriptionQuotaItem = ProxyResource & { + readonly systemData?: SystemData; + readonly current?: number; + readonly default?: number; +}; + +// @public +export interface SubscriptionQuotaItemList { + value?: SubscriptionQuotaItem[]; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface Vault { + readonly id?: string; + location: string; + readonly name?: string; + readonly type?: string; + vaultName?: string; +} + +// @public +export interface VaultList { + value?: Vault[]; +} + +// @public +export interface Vaults { + list(resourceGroupName: string, accountName: string, options?: VaultsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VaultsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VaultsListResponse = VaultList; + +// @public +export interface Volume { + avsDataStore?: AvsDataStore; + backupId?: string; + readonly baremetalTenantId?: string; + capacityPoolResourceId?: string; + readonly cloneProgress?: number; + coolAccess?: boolean; + coolnessPeriod?: number; + creationToken: string; + dataProtection?: VolumePropertiesDataProtection; + defaultGroupQuotaInKiBs?: number; + defaultUserQuotaInKiBs?: number; + encryptionKeySource?: string; + readonly etag?: string; + exportPolicy?: VolumePropertiesExportPolicy; + readonly fileSystemId?: string; + readonly id?: string; + isDefaultQuotaEnabled?: boolean; + isRestoring?: boolean; + kerberosEnabled?: boolean; + ldapEnabled?: boolean; + location: string; + readonly mountTargets?: MountTargetProperties[]; + readonly name?: string; + networkFeatures?: NetworkFeatures; + readonly networkSiblingSetId?: string; + placementRules?: PlacementKeyValuePairs[]; + protocolTypes?: string[]; + readonly provisioningState?: string; + proximityPlacementGroup?: string; + securityStyle?: SecurityStyle; + serviceLevel?: ServiceLevel; + smbContinuouslyAvailable?: boolean; + smbEncryption?: boolean; + snapshotDirectoryVisible?: boolean; + snapshotId?: string; + readonly storageToNetworkProximity?: VolumeStorageToNetworkProximity; + subnetId: string; + readonly t2Network?: string; + tags?: { + [propertyName: string]: string; + }; + throughputMibps?: number; + readonly type?: string; + unixPermissions?: string; + usageThreshold: number; + readonly volumeGroupName?: string; + volumeSpecName?: string; + volumeType?: string; +} + +// @public +export interface VolumeBackupProperties { + backupEnabled?: boolean; + backupPolicyId?: string; + policyEnforced?: boolean; + vaultId?: string; +} + +// @public +export interface VolumeBackups { + backupsCount?: number; + policyEnabled?: boolean; + volumeName?: string; +} + +// @public +export interface VolumeGroup { + groupMetaData?: VolumeGroupMetaData; + readonly id?: string; + location?: string; + readonly name?: string; + readonly provisioningState?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface VolumeGroupDetails { + groupMetaData?: VolumeGroupMetaData; + readonly id?: string; + location?: string; + readonly name?: string; + readonly provisioningState?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; + volumes?: VolumeGroupVolumeProperties[]; +} + +// @public +export interface VolumeGroupList { + value?: VolumeGroup[]; +} + +// @public +export interface VolumeGroupMetaData { + applicationIdentifier?: string; + applicationType?: ApplicationType; + deploymentSpecId?: string; + globalPlacementRules?: PlacementKeyValuePairs[]; + groupDescription?: string; + readonly volumesCount?: number; +} + +// @public +export interface VolumeGroups { + beginCreate(resourceGroupName: string, accountName: string, volumeGroupName: string, body: VolumeGroupDetails, options?: VolumeGroupsCreateOptionalParams): Promise, VolumeGroupsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, accountName: string, volumeGroupName: string, body: VolumeGroupDetails, options?: VolumeGroupsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, volumeGroupName: string, options?: VolumeGroupsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, volumeGroupName: string, options?: VolumeGroupsDeleteOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, volumeGroupName: string, options?: VolumeGroupsGetOptionalParams): Promise; + listByNetAppAccount(resourceGroupName: string, accountName: string, options?: VolumeGroupsListByNetAppAccountOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VolumeGroupsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VolumeGroupsCreateResponse = VolumeGroupDetails; + +// @public +export interface VolumeGroupsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VolumeGroupsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VolumeGroupsGetResponse = VolumeGroupDetails; + +// @public +export interface VolumeGroupsListByNetAppAccountOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VolumeGroupsListByNetAppAccountResponse = VolumeGroupList; + +// @public +export interface VolumeGroupVolumeProperties { + avsDataStore?: AvsDataStore; + backupId?: string; + readonly baremetalTenantId?: string; + capacityPoolResourceId?: string; + readonly cloneProgress?: number; + coolAccess?: boolean; + coolnessPeriod?: number; + creationToken: string; + dataProtection?: VolumePropertiesDataProtection; + defaultGroupQuotaInKiBs?: number; + defaultUserQuotaInKiBs?: number; + encryptionKeySource?: string; + exportPolicy?: VolumePropertiesExportPolicy; + readonly fileSystemId?: string; + readonly id?: string; + isDefaultQuotaEnabled?: boolean; + isRestoring?: boolean; + kerberosEnabled?: boolean; + ldapEnabled?: boolean; + readonly mountTargets?: MountTargetProperties[]; + name?: string; + networkFeatures?: NetworkFeatures; + readonly networkSiblingSetId?: string; + placementRules?: PlacementKeyValuePairs[]; + protocolTypes?: string[]; + readonly provisioningState?: string; + proximityPlacementGroup?: string; + securityStyle?: SecurityStyle; + serviceLevel?: ServiceLevel; + smbContinuouslyAvailable?: boolean; + smbEncryption?: boolean; + snapshotDirectoryVisible?: boolean; + snapshotId?: string; + readonly storageToNetworkProximity?: VolumeStorageToNetworkProximity; + subnetId: string; + readonly t2Network?: string; + tags?: { + [propertyName: string]: string; + }; + throughputMibps?: number; + readonly type?: string; + unixPermissions?: string; + usageThreshold: number; + readonly volumeGroupName?: string; + volumeSpecName?: string; + volumeType?: string; +} + +// @public +export interface VolumeList { + nextLink?: string; + value?: Volume[]; +} + +// @public +export interface VolumePatch { + dataProtection?: VolumePatchPropertiesDataProtection; + defaultGroupQuotaInKiBs?: number; + defaultUserQuotaInKiBs?: number; + exportPolicy?: VolumePatchPropertiesExportPolicy; + readonly id?: string; + isDefaultQuotaEnabled?: boolean; + location?: string; + readonly name?: string; + serviceLevel?: ServiceLevel; + tags?: { + [propertyName: string]: string; + }; + throughputMibps?: number; + readonly type?: string; + usageThreshold?: number; +} + +// @public +export interface VolumePatchPropertiesDataProtection { + backup?: VolumeBackupProperties; + snapshot?: VolumeSnapshotProperties; +} + +// @public +export interface VolumePatchPropertiesExportPolicy { + rules?: ExportPolicyRule[]; +} + +// @public +export interface VolumePropertiesDataProtection { + backup?: VolumeBackupProperties; + replication?: ReplicationObject; + snapshot?: VolumeSnapshotProperties; +} + +// @public +export interface VolumePropertiesExportPolicy { + rules?: ExportPolicyRule[]; +} + +// @public +export interface VolumeRevert { + snapshotId?: string; +} + +// @public +export interface Volumes { + beginAuthorizeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: AuthorizeRequest, options?: VolumesAuthorizeReplicationOptionalParams): Promise, void>>; + beginAuthorizeReplicationAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: AuthorizeRequest, options?: VolumesAuthorizeReplicationOptionalParams): Promise; + beginBreakReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesBreakReplicationOptionalParams): Promise, void>>; + beginBreakReplicationAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesBreakReplicationOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: Volume, options?: VolumesCreateOrUpdateOptionalParams): Promise, VolumesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: Volume, options?: VolumesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesDeleteOptionalParams): Promise; + beginDeleteReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesDeleteReplicationOptionalParams): Promise, void>>; + beginDeleteReplicationAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesDeleteReplicationOptionalParams): Promise; + beginPoolChange(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: PoolChangeRequest, options?: VolumesPoolChangeOptionalParams): Promise, void>>; + beginPoolChangeAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: PoolChangeRequest, options?: VolumesPoolChangeOptionalParams): Promise; + beginReInitializeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesReInitializeReplicationOptionalParams): Promise, void>>; + beginReInitializeReplicationAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesReInitializeReplicationOptionalParams): Promise; + beginResyncReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesResyncReplicationOptionalParams): Promise, void>>; + beginResyncReplicationAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesResyncReplicationOptionalParams): Promise; + beginRevert(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: VolumeRevert, options?: VolumesRevertOptionalParams): Promise, void>>; + beginRevertAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: VolumeRevert, options?: VolumesRevertOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: VolumePatch, options?: VolumesUpdateOptionalParams): Promise, VolumesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, body: VolumePatch, options?: VolumesUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, poolName: string, options?: VolumesListOptionalParams): PagedAsyncIterableIterator; + replicationStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: VolumesReplicationStatusOptionalParams): Promise; +} + +// @public +export interface VolumesAuthorizeReplicationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VolumesBreakReplicationOptionalParams extends coreClient.OperationOptions { + body?: BreakReplicationRequest; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VolumesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VolumesCreateOrUpdateResponse = Volume; + +// @public +export interface VolumesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VolumesDeleteReplicationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VolumesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VolumesGetResponse = Volume; + +// @public +export interface VolumesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VolumesListNextResponse = VolumeList; + +// @public +export interface VolumesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VolumesListResponse = VolumeList; + +// @public +export interface VolumeSnapshotProperties { + snapshotPolicyId?: string; +} + +// @public +export interface VolumesPoolChangeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VolumesReInitializeReplicationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VolumesReplicationStatusOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VolumesReplicationStatusResponse = ReplicationStatus; + +// @public +export interface VolumesResyncReplicationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VolumesRevertOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VolumeStorageToNetworkProximity = string; + +// @public +export interface VolumesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VolumesUpdateResponse = Volume; + +// @public +export interface WeeklySchedule { + day?: string; + hour?: number; + minute?: number; + snapshotsToKeep?: number; + usedBytes?: number; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/netapp/arm-netapp/rollup.config.js b/sdk/netapp/arm-netapp/rollup.config.js index 2d751f3c76a5..9be1955eb7f1 100644 --- a/sdk/netapp/arm-netapp/rollup.config.js +++ b/sdk/netapp/arm-netapp/rollup.config.js @@ -1,37 +1,188 @@ -import rollup from "rollup"; -import nodeResolve from "rollup-plugin-node-resolve"; -import sourcemaps from "rollup-plugin-sourcemaps"; - -/** - * @type {rollup.RollupFileOptions} - */ -const config = { - input: "./esm/azureNetAppFilesManagementClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/arm-netapp.js", - format: "umd", - name: "Azure.ArmNetapp", - sourcemap: true, - globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" - }, - banner: `/* +/* * 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. - */` - }, - plugins: [ - nodeResolve({ mainFields: ['module', 'main'] }), - sourcemaps() - ] + */ + +import nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + +// #region Warning Handler + +/** + * A function that can determine whether a rollupwarning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEvalWarnings(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependencyWarnings(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false }; -export default config; +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve(), cjs()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts deleted file mode 100644 index 2eac024bfb72..000000000000 --- a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { AzureNetAppFilesManagementClientContext } from "./azureNetAppFilesManagementClientContext"; - - -class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientContext { - // Operation groups - operations: operations.Operations; - netAppResource: operations.NetAppResource; - accounts: operations.Accounts; - pools: operations.Pools; - volumes: operations.Volumes; - snapshots: operations.Snapshots; - snapshotPolicies: operations.SnapshotPolicies; - backups: operations.Backups; - accountBackups: operations.AccountBackups; - backupPolicies: operations.BackupPolicies; - vaults: operations.Vaults; - - /** - * Initializes a new instance of the AzureNetAppFilesManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. Credentials - * implementing the TokenCredential interface from the @azure/identity package are recommended. For - * more information about these credentials, see - * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the - * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and - * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureNetAppFilesManagementClientOptions) { - super(credentials, subscriptionId, options); - this.operations = new operations.Operations(this); - this.netAppResource = new operations.NetAppResource(this); - this.accounts = new operations.Accounts(this); - this.pools = new operations.Pools(this); - this.volumes = new operations.Volumes(this); - this.snapshots = new operations.Snapshots(this); - this.snapshotPolicies = new operations.SnapshotPolicies(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); - } -} - -// Operation Specifications - -export { - AzureNetAppFilesManagementClient, - AzureNetAppFilesManagementClientContext, - Models as AzureNetAppFilesManagementModels, - Mappers as AzureNetAppFilesManagementMappers -}; -export * from "./operations"; diff --git a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts deleted file mode 100644 index 75b906d565ee..000000000000 --- a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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. - */ - -import * as Models from "./models"; -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import { TokenCredential } from "@azure/core-auth"; - -const packageName = "@azure/arm-netapp"; -const packageVersion = "14.1.0"; - -export class AzureNetAppFilesManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials | TokenCredential; - subscriptionId: string; - apiVersion?: string; - - /** - * Initializes a new instance of the AzureNetAppFilesManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. Credentials - * implementing the TokenCredential interface from the @azure/identity package are recommended. For - * more information about these credentials, see - * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the - * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and - * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureNetAppFilesManagementClientOptions) { - if (credentials == undefined) { - throw new Error('\'credentials\' cannot be null.'); - } - if (subscriptionId == undefined) { - throw new Error('\'subscriptionId\' cannot be null.'); - } - - if (!options) { - options = {}; - } - if (!options.userAgent) { - const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } - - super(credentials, options); - - 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) { - this.acceptLanguage = options.acceptLanguage; - } - if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { - this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; - } - } -} diff --git a/sdk/netapp/arm-netapp/src/models/netAppResourceMappers.ts b/sdk/netapp/arm-netapp/src/index.ts similarity index 56% rename from sdk/netapp/arm-netapp/src/models/netAppResourceMappers.ts rename to sdk/netapp/arm-netapp/src/index.ts index 7a342d68c8c3..cb8b872ff966 100644 --- a/sdk/netapp/arm-netapp/src/models/netAppResourceMappers.ts +++ b/sdk/netapp/arm-netapp/src/index.ts @@ -6,10 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export { - CheckAvailabilityResponse, - CloudError, - FilePathAvailabilityRequest, - QuotaAvailabilityRequest, - ResourceNameAvailabilityRequest -} from "../models/mappers"; +/// +export * from "./models"; +export { NetAppManagementClient } from "./netAppManagementClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/netapp/arm-netapp/src/lroImpl.ts b/sdk/netapp/arm-netapp/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/netapp/arm-netapp/src/lroImpl.ts @@ -0,0 +1,34 @@ +/* + * 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. + */ + +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export class LroImpl implements LongRunningOperation { + constructor( + private sendOperationFn: (args: any, spec: any) => Promise>, + private args: Record, + private spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record, + public requestPath: string = spec.path!, + public requestMethod: string = spec.httpMethod + ) {} + public async sendInitialRequest(): Promise> { + return this.sendOperationFn(this.args, this.spec); + } + public async sendPollRequest(path: string): Promise> { + const { requestBody, ...restSpec } = this.spec; + return this.sendOperationFn(this.args, { + ...restSpec, + path, + httpMethod: "GET" + }); + } +} diff --git a/sdk/netapp/arm-netapp/src/models/accountBackupsMappers.ts b/sdk/netapp/arm-netapp/src/models/accountBackupsMappers.ts deleted file mode 100644 index de742c81ab8d..000000000000 --- a/sdk/netapp/arm-netapp/src/models/accountBackupsMappers.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -export { - AccountEncryption, - ActiveDirectory, - Backup, - BackupPatch, - BackupPolicy, - BackupPolicyDetails, - BackupPolicyPatch, - BackupsList, - BaseResource, - CapacityPool, - CapacityPoolPatch, - CloudError, - DailySchedule, - ExportPolicyRule, - HourlySchedule, - MonthlySchedule, - MountTargetProperties, - NetAppAccount, - NetAppAccountPatch, - ReplicationObject, - Snapshot, - SnapshotPolicy, - SystemData, - Vault, - Volume, - VolumeBackupProperties, - VolumeBackups, - VolumePatch, - VolumePatchPropertiesDataProtection, - VolumePatchPropertiesExportPolicy, - VolumePropertiesDataProtection, - VolumePropertiesExportPolicy, - VolumeSnapshotProperties, - WeeklySchedule -} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/accountsMappers.ts b/sdk/netapp/arm-netapp/src/models/accountsMappers.ts deleted file mode 100644 index ecf21f05abbf..000000000000 --- a/sdk/netapp/arm-netapp/src/models/accountsMappers.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -export { - AccountEncryption, - ActiveDirectory, - Backup, - BackupPatch, - BackupPolicy, - BackupPolicyDetails, - BackupPolicyPatch, - BaseResource, - CapacityPool, - CapacityPoolPatch, - CloudError, - DailySchedule, - ExportPolicyRule, - HourlySchedule, - MonthlySchedule, - MountTargetProperties, - NetAppAccount, - NetAppAccountList, - NetAppAccountPatch, - ReplicationObject, - Snapshot, - SnapshotPolicy, - SystemData, - Vault, - Volume, - VolumeBackupProperties, - VolumeBackups, - VolumePatch, - VolumePatchPropertiesDataProtection, - VolumePatchPropertiesExportPolicy, - VolumePropertiesDataProtection, - VolumePropertiesExportPolicy, - VolumeSnapshotProperties, - WeeklySchedule -} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/backupPoliciesMappers.ts b/sdk/netapp/arm-netapp/src/models/backupPoliciesMappers.ts deleted file mode 100644 index 7d1c1a293c6e..000000000000 --- a/sdk/netapp/arm-netapp/src/models/backupPoliciesMappers.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -export { - AccountEncryption, - ActiveDirectory, - Backup, - BackupPatch, - BackupPoliciesList, - BackupPolicy, - BackupPolicyDetails, - BackupPolicyPatch, - BaseResource, - CapacityPool, - CapacityPoolPatch, - CloudError, - DailySchedule, - ExportPolicyRule, - HourlySchedule, - MonthlySchedule, - MountTargetProperties, - NetAppAccount, - NetAppAccountPatch, - ReplicationObject, - Snapshot, - SnapshotPolicy, - SystemData, - Vault, - Volume, - VolumeBackupProperties, - VolumeBackups, - VolumePatch, - VolumePatchPropertiesDataProtection, - VolumePatchPropertiesExportPolicy, - VolumePropertiesDataProtection, - VolumePropertiesExportPolicy, - VolumeSnapshotProperties, - WeeklySchedule -} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/backupsMappers.ts b/sdk/netapp/arm-netapp/src/models/backupsMappers.ts deleted file mode 100644 index 2f48ce40762e..000000000000 --- a/sdk/netapp/arm-netapp/src/models/backupsMappers.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -export { - AccountEncryption, - ActiveDirectory, - Backup, - BackupPatch, - BackupPolicy, - BackupPolicyDetails, - BackupPolicyPatch, - BackupsList, - BackupStatus, - BaseResource, - CapacityPool, - CapacityPoolPatch, - CloudError, - DailySchedule, - ExportPolicyRule, - HourlySchedule, - MonthlySchedule, - MountTargetProperties, - NetAppAccount, - NetAppAccountPatch, - ReplicationObject, - RestoreStatus, - Snapshot, - SnapshotPolicy, - SystemData, - Vault, - Volume, - VolumeBackupProperties, - VolumeBackups, - VolumePatch, - VolumePatchPropertiesDataProtection, - VolumePatchPropertiesExportPolicy, - VolumePropertiesDataProtection, - VolumePropertiesExportPolicy, - VolumeSnapshotProperties, - WeeklySchedule -} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/index.ts b/sdk/netapp/arm-netapp/src/models/index.ts index 9adc686414fc..7c71e6ebbceb 100644 --- a/sdk/netapp/arm-netapp/src/models/index.ts +++ b/sdk/netapp/arm-netapp/src/models/index.ts @@ -6,3239 +6,2595 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import * as coreClient from "@azure/core-client"; -export { BaseResource, CloudError }; +/** Result of the request to list Cloud Volume operations. It contains a list of operations and a URL link to get the next set of results. */ +export interface OperationListResult { + /** List of Storage operations supported by the Storage resource provider. */ + value?: Operation[]; +} -/** - * Display metadata associated with the operation. - */ +/** Microsoft.NetApp REST API operation definition. */ +export interface Operation { + /** Operation name: {provider}/{resource}/{operation} */ + name?: string; + /** Display metadata associated with the operation. */ + display?: OperationDisplay; + /** The origin of operations. */ + origin?: string; + /** One property of operation, include metric specifications. */ + serviceSpecification?: ServiceSpecification; +} + +/** Display metadata associated with the operation. */ export interface OperationDisplay { - /** - * Service provider: Microsoft NetApp. - */ + /** Service provider: Microsoft NetApp. */ provider?: string; - /** - * Resource on which the operation is performed etc. - */ + /** Resource on which the operation is performed etc. */ resource?: string; - /** - * Type of operation: get, read, delete, etc. - */ + /** Type of operation: get, read, delete, etc. */ operation?: string; - /** - * Operation description. - */ + /** Operation description. */ description?: string; } -/** - * Dimension of blobs, possibly be blob type or access tier. - */ -export interface Dimension { - /** - * Display name of dimension. - */ - name?: string; - /** - * Display name of dimension. - */ - displayName?: string; +/** One property of operation, include metric specifications. */ +export interface ServiceSpecification { + /** Metric specifications of operation. */ + metricSpecifications?: MetricSpecification[]; + /** Log specification of operation. */ + logSpecifications?: LogSpecification[]; } -/** - * Metric specification of operation. - */ +/** Metric specification of operation. */ export interface MetricSpecification { - /** - * Name of metric specification. - */ + /** Name of metric specification. */ name?: string; - /** - * Display name of metric specification. - */ + /** Display name of metric specification. */ displayName?: string; - /** - * Display description of metric specification. - */ + /** Display description of metric specification. */ displayDescription?: string; - /** - * Unit could be Bytes or Count. - */ + /** Unit could be Bytes or Count. */ unit?: string; - /** - * Dimensions of blobs, including blob type and access tier. - */ + /** Support metric aggregation type. */ + supportedAggregationTypes?: MetricAggregationType[]; + /** The supported time grain types for the metrics. */ + supportedTimeGrainTypes?: string[]; + /** The internal metric name. */ + internalMetricName?: string; + /** Whether or not the service is using regional MDM accounts. */ + enableRegionalMdmAccount?: boolean; + /** The source MDM account. */ + sourceMdmAccount?: string; + /** The source MDM namespace. */ + sourceMdmNamespace?: string; + /** Dimensions of blobs, including blob type and access tier. */ dimensions?: Dimension[]; - /** - * Aggregation type could be Average. - */ + /** Aggregation type could be Average. */ aggregationType?: string; - /** - * The property to decide fill gap with zero or not. - */ + /** The property to decide fill gap with zero or not. */ fillGapWithZero?: boolean; - /** - * The category this metric specification belong to, could be Capacity. - */ + /** The category this metric specification belong to, could be Capacity. */ category?: string; - /** - * Account Resource Id. - */ + /** Account Resource Id. */ resourceIdDimensionNameOverride?: string; + /** Whether the metric is internal. */ + isInternal?: boolean; } -/** - * One property of operation, include metric specifications. - */ -export interface ServiceSpecification { - /** - * Metric specifications of operation. - */ - metricSpecifications?: MetricSpecification[]; +/** Dimension of blobs, possibly be blob type or access tier. */ +export interface Dimension { + /** Display name of dimension. */ + name?: string; + /** Display name of dimension. */ + displayName?: string; } -/** - * Microsoft.NetApp REST API operation definition. - */ -export interface Operation { - /** - * Operation name: {provider}/{resource}/{operation} - */ +/** Log Definition of a single resource metric. */ +export interface LogSpecification { + /** Name of log specification. */ name?: string; - /** - * Display metadata associated with the operation. - */ - display?: OperationDisplay; - /** - * The origin of operations. - */ - origin?: string; - /** - * One property of operation, include metric specifications. - */ - serviceSpecification?: ServiceSpecification; + /** Display name of log specification. */ + displayName?: string; } -/** - * Information regarding availability of a resource. - */ +/** Resource name availability request content. */ +export interface ResourceNameAvailabilityRequest { + /** Resource name to verify. */ + name: string; + /** Resource type used for verification. */ + type: CheckNameResourceTypes; + /** Resource group name. */ + resourceGroup: string; +} + +/** Information regarding availability of a resource. */ export interface CheckAvailabilityResponse { - /** - * true indicates name is valid and available. false indicates the name - * is invalid, unavailable, or both. - */ + /** true indicates name is valid and available. false indicates the name is invalid, unavailable, or both. */ isAvailable?: boolean; - /** - * Invalid indicates the name provided does not match Azure App Service naming - * requirements. AlreadyExists indicates that the name is already in use and is - * therefore unavailable. Possible values include: 'Invalid', 'AlreadyExists' - */ + /** Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable. */ reason?: InAvailabilityReasonType; - /** - * If reason == invalid, provide the user with the reason why the given name is invalid, and - * provide the resource naming requirements so that the user can select a valid name. If reason - * == AlreadyExists, explain that resource name is already in use, and direct them to select a - * different name. - */ + /** If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. */ message?: string; } -/** - * Resource name availability request content. - */ -export interface ResourceNameAvailabilityRequest { +/** File path availability request content - availability is based on the name and the subnetId. */ +export interface FilePathAvailabilityRequest { + /** File path to verify. */ + name: string; + /** The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes */ + subnetId: string; +} + +/** Quota availability request content. */ +export interface QuotaAvailabilityRequest { + /** Name of the resource to verify. */ + name: string; + /** Resource type used for verification. */ + type: CheckQuotaNameResourceTypes; + /** Resource group name. */ + resourceGroup: string; +} + +/** List of Subscription Quota Items */ +export interface SubscriptionQuotaItemList { + /** A list of SubscriptionQuotaItems */ + value?: SubscriptionQuotaItem[]; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { /** - * Resource name to verify. + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name: string; + readonly id?: string; /** - * Resource type used for verification. Possible values include: - * 'Microsoft.NetApp/netAppAccounts', 'Microsoft.NetApp/netAppAccounts/capacityPools', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - type: CheckNameResourceTypes; + readonly name?: string; /** - * Resource group name. + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. */ - resourceGroup: string; + readonly type?: string; } -/** - * File path availability request content - availability is based on the name and the subnetId. - */ -export interface FilePathAvailabilityRequest { +/** List of NetApp account resources */ +export interface NetAppAccountList { + /** Multiple NetApp accounts */ + value?: NetAppAccount[]; + /** URL to get the next set of results. */ + nextLink?: string; +} + +/** NetApp account resource */ +export interface NetAppAccount { + /** Resource location */ + location: string; /** - * File path to verify. + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name: string; + readonly id?: string; /** - * The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - subnetId: string; -} - -/** - * Quota availability request content. - */ -export interface QuotaAvailabilityRequest { + readonly name?: string; /** - * Name of the resource to verify. + * A unique read-only string that changes whenever the resource is updated. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name: string; + readonly etag?: string; /** - * Resource type used for verification. Possible values include: - * 'Microsoft.NetApp/netAppAccounts', 'Microsoft.NetApp/netAppAccounts/capacityPools', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - type: CheckQuotaNameResourceTypes; + readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; /** - * Resource group name. + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - resourceGroup: string; + readonly systemData?: SystemData; + /** + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** Active Directories */ + activeDirectories?: ActiveDirectory[]; + /** Encryption settings */ + encryption?: AccountEncryption; } -/** - * Active Directory - */ +/** Active Directory */ export interface ActiveDirectory { - /** - * Id of the Active Directory - */ + /** Id of the Active Directory */ activeDirectoryId?: string; - /** - * Username of Active Directory domain administrator - */ + /** Username of Active Directory domain administrator */ username?: string; - /** - * Plain text password of Active Directory domain administrator, value is masked in the response - */ + /** Plain text password of Active Directory domain administrator, value is masked in the response */ password?: string; - /** - * Name of the Active Directory domain - */ + /** Name of the Active Directory domain */ domain?: string; - /** - * Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain - */ + /** Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain */ dns?: string; /** - * Status of the Active Directory. Possible values include: 'Created', 'InUse', 'Deleted', - * 'Error', 'Updating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Status of the Active Directory + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: ActiveDirectoryStatus; /** * Any details in regards to the Status of the Active Directory - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly statusDetails?: string; - /** - * NetBIOS name of the SMB server. This name will be registered as a computer account in the AD - * and used to mount volumes - */ + /** NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes */ smbServerName?: string; - /** - * The Organizational Unit (OU) within the Windows Active Directory. Default value: - * 'CN=Computers'. - */ + /** The Organizational Unit (OU) within the Windows Active Directory */ organizationalUnit?: string; - /** - * The Active Directory site the service will limit Domain Controller discovery to - */ + /** The Active Directory site the service will limit Domain Controller discovery to */ site?: string; - /** - * Users to be added to the Built-in Backup Operator active directory group. A list of unique - * usernames without domain specifier - */ + /** Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier */ backupOperators?: string[]; - /** - * Users to be added to the Built-in Administrators active directory group. A list of unique - * usernames without domain specifier - */ + /** Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier */ administrators?: string[]; - /** - * kdc server IP addresses for the active directory machine. This optional parameter is used only - * while creating kerberos volume. - */ + /** kdc server IP addresses for the active directory machine. This optional parameter is used only while creating kerberos volume. */ kdcIP?: string; - /** - * Name of the active directory machine. This optional parameter is used only while creating - * kerberos volume - */ + /** Name of the active directory machine. This optional parameter is used only while creating kerberos volume */ adName?: string; - /** - * When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active - * Directory Certificate Service's self-signed root CA certificate, this optional parameter is - * used only for dual protocol with LDAP user-mapping volumes. - */ + /** When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes. */ serverRootCACertificate?: string; - /** - * If enabled, AES encryption will be enabled for SMB communication. - */ + /** If enabled, AES encryption will be enabled for SMB communication. */ aesEncryption?: boolean; - /** - * Specifies whether or not the LDAP traffic needs to be signed. - */ + /** Specifies whether or not the LDAP traffic needs to be signed. */ ldapSigning?: boolean; - /** - * Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB - * Continuously available shares for SQL). A list of unique usernames without domain specifier - */ + /** Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier */ securityOperators?: string[]; - /** - * Specifies whether or not the LDAP traffic needs to be secured via TLS. - */ + /** Specifies whether or not the LDAP traffic needs to be secured via TLS. */ ldapOverTLS?: boolean; - /** - * If enabled, NFS client local users can also (in addition to LDAP users) access the NFS - * volumes. - */ + /** If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. */ allowLocalNfsUsersWithLdap?: boolean; + /** If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted. */ + encryptDCConnections?: boolean; } -/** - * Encryption settings - */ +/** Encryption settings */ export interface AccountEncryption { - /** - * Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - */ + /** Encryption Key Source. Possible values are: 'Microsoft.NetApp'. */ keySource?: string; } -/** - * Metadata pertaining to creation and last modification of the resource. - */ -export interface SystemData { - /** - * The identity that created the resource. - */ - createdBy?: string; - /** - * The type of identity that created the resource. Possible values include: 'User', - * 'Application', 'ManagedIdentity', 'Key' - */ - createdByType?: CreatedByType; +/** NetApp account patch resource */ +export interface NetAppAccountPatch { + /** Resource location */ + location?: string; /** - * The timestamp of resource creation (UTC). + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - createdAt?: Date; + readonly id?: string; /** - * The identity that last modified the resource. + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - lastModifiedBy?: string; + readonly name?: string; /** - * The type of identity that last modified the resource. Possible values include: 'User', - * 'Application', 'ManagedIdentity', 'Key' + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - lastModifiedByType?: CreatedByType; + readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; /** - * The timestamp of resource last modification (UTC) + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. */ - lastModifiedAt?: Date; + readonly provisioningState?: string; + /** Active Directories */ + activeDirectories?: ActiveDirectory[]; + /** Encryption settings */ + encryption?: AccountEncryption; } -/** - * NetApp account resource - */ -export interface NetAppAccount extends BaseResource { - /** - * Resource location - */ +/** An error response from the service. */ +export interface CloudError { + /** Cloud error body. */ + error?: CloudErrorBody; +} + +/** An error response from the service. */ +export interface CloudErrorBody { + /** An identifier for the error. Codes are invariant and are intended to be consumed programmatically. */ + code?: string; + /** A message describing the error, intended to be suitable for display in a user interface. */ + message?: string; +} + +/** List of capacity pool resources */ +export interface CapacityPoolList { + /** List of Capacity pools */ + value?: CapacityPool[]; + /** URL to get the next set of results. */ + nextLink?: string; +} + +/** Capacity pool resource */ +export interface CapacityPool { + /** Resource location */ location: string; /** * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; + /** + * A unique read-only string that changes whenever the resource is updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; /** * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; /** - * Resource tags + * UUID v4 used to identify the Pool + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tags?: { [propertyName: string]: string }; + readonly poolId?: string; + /** Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104). */ + size: number; + /** The service level of the file system */ + serviceLevel: ServiceLevel; /** * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; /** - * Active Directories - */ - activeDirectories?: ActiveDirectory[]; - /** - * Encryption settings + * Total throughput of pool in Mibps + * NOTE: This property will not be serialized. It can only be populated by the server. */ - encryption?: AccountEncryption; + readonly totalThroughputMibps?: number; /** - * The system meta data relating to this resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Utilized throughput of pool in Mibps + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly utilizedThroughputMibps?: number; + /** The qos type of the pool */ + qosType?: QosType; + /** If enabled (true) the pool can contain cool Access enabled volumes. */ + coolAccess?: boolean; + /** Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. */ + encryptionType?: EncryptionType; } -/** - * NetApp account patch resource - */ -export interface NetAppAccountPatch extends BaseResource { - /** - * Resource location - */ +/** Capacity pool patch resource */ +export interface CapacityPoolPatch { + /** Resource location */ location?: string; /** * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; - /** - * Resource tags - */ + /** Resource tags */ tags?: { [propertyName: string]: string }; - /** - * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Active Directories - */ - activeDirectories?: ActiveDirectory[]; - /** - * Encryption settings - */ - encryption?: AccountEncryption; + /** Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104). */ + size?: number; + /** The qos type of the pool */ + qosType?: QosType; } -/** - * Capacity pool resource - */ -export interface CapacityPool extends BaseResource { - /** - * Resource location - */ +/** List of volume resources */ +export interface VolumeList { + /** List of volumes */ + value?: Volume[]; + /** URL to get the next set of results. */ + nextLink?: string; +} + +/** Volume resource */ +export interface Volume { + /** Resource location */ location: string; /** * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A unique read-only string that changes whenever the resource is updated. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly etag?: string; /** - * Resource tags + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly type?: string; + /** Resource tags */ tags?: { [propertyName: string]: string }; /** - * poolId. UUID v4 used to identify the Pool - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly poolId?: string; - /** - * size. Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must - * be multiply of 4398046511104). + * Unique FileSystem Identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - size: number; - /** - * serviceLevel. The service level of the file system. Possible values include: 'Standard', - * 'Premium', 'Ultra'. Default value: 'Premium'. - */ - serviceLevel: ServiceLevel; + readonly fileSystemId?: string; + /** A unique file path for the volume. Used when creating mount targets */ + creationToken: string; + /** The service level of the file system */ + serviceLevel?: ServiceLevel; + /** Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. */ + usageThreshold: number; + /** Set of export policy rules */ + exportPolicy?: VolumePropertiesExportPolicy; + /** Set of protocol types, default NFSv3, CIFS for SMB protocol */ + protocolTypes?: string[]; /** * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; + /** UUID v4 or resource identifier used to identify the Snapshot. */ + snapshotId?: string; + /** UUID v4 or resource identifier used to identify the Backup. */ + backupId?: string; /** - * Total throughput of pool in Mibps - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Unique Baremetal Tenant Identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly totalThroughputMibps?: number; + readonly baremetalTenantId?: string; + /** The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes */ + subnetId: string; + /** Basic network, or Standard features available to the volume. */ + networkFeatures?: NetworkFeatures; /** - * Utilized throughput of pool in Mibps - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Network Sibling Set ID for the the group of volumes sharing networking resources. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly utilizedThroughputMibps?: number; + readonly networkSiblingSetId?: string; /** - * qosType. The qos type of the pool. Possible values include: 'Auto', 'Manual'. Default value: - * 'Auto'. + * Provides storage to network proximity information for the volume. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - qosType?: QosType; + readonly storageToNetworkProximity?: VolumeStorageToNetworkProximity; /** - * If enabled (true) the pool can contain cool Access enabled volumes. Default value: false. + * List of mount targets + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly mountTargets?: MountTargetProperties[]; + /** What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection */ + volumeType?: string; + /** DataProtection type volumes include an object containing details of the replication */ + dataProtection?: VolumePropertiesDataProtection; + /** Restoring */ + isRestoring?: boolean; + /** If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (default to true). */ + snapshotDirectoryVisible?: boolean; + /** Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later */ + kerberosEnabled?: boolean; + /** The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol */ + securityStyle?: SecurityStyle; + /** Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later */ + smbEncryption?: boolean; + /** Enables continuously available share property for smb volume. Only applicable for SMB volume */ + smbContinuouslyAvailable?: boolean; + /** Maximum throughput in Mibps that can be achieved by this volume and this will be accepted as input only for manual qosType volume */ + throughputMibps?: number; + /** Encryption Key Source. Possible values are: 'Microsoft.NetApp' */ + encryptionKeySource?: string; + /** Specifies whether LDAP is enabled or not for a given NFS volume. */ + ldapEnabled?: boolean; + /** Specifies whether Cool Access(tiering) is enabled for the volume. */ coolAccess?: boolean; -} - -/** - * Capacity pool patch resource - */ -export interface CapacityPoolPatch extends BaseResource { - /** - * Resource location - */ - location?: string; - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; + /** Specifies the number of days after which data that is not accessed by clients will be tiered. */ + coolnessPeriod?: number; + /** UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. */ + unixPermissions?: string; /** - * Resource tags + * When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tags?: { [propertyName: string]: string }; + readonly cloneProgress?: number; + /** Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose */ + avsDataStore?: AvsDataStore; + /** Specifies if default quota is enabled for the volume. */ + isDefaultQuotaEnabled?: boolean; + /** Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . */ + defaultUserQuotaInKiBs?: number; + /** Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. */ + defaultGroupQuotaInKiBs?: number; /** - * size. Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must - * be multiply of 4398046511104). Default value: 4398046511104. + * Volume Group Name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - size?: number; + readonly volumeGroupName?: string; + /** Pool Resource Id used in case of creating a volume through volume group */ + capacityPoolResourceId?: string; + /** Proximity placement group associated with the volume */ + proximityPlacementGroup?: string; /** - * qosType. The qos type of the pool. Possible values include: 'Auto', 'Manual'. Default value: - * 'Auto'. + * T2 network information + * NOTE: This property will not be serialized. It can only be populated by the server. */ - qosType?: QosType; + readonly t2Network?: string; + /** Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log */ + volumeSpecName?: string; + /** Application specific placement rules for the particular volume */ + placementRules?: PlacementKeyValuePairs[]; } -/** - * Volume Export Policy Rule - */ +/** Set of export policy rules */ +export interface VolumePropertiesExportPolicy { + /** Export policy rule */ + rules?: ExportPolicyRule[]; +} + +/** Volume Export Policy Rule */ export interface ExportPolicyRule { - /** - * Order index - */ + /** Order index */ ruleIndex?: number; - /** - * Read only access - */ + /** Read only access */ unixReadOnly?: boolean; - /** - * Read and write access - */ + /** Read and write access */ unixReadWrite?: boolean; - /** - * Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later. Default value: - * false. - */ + /** Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later */ kerberos5ReadOnly?: boolean; - /** - * Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later. Default - * value: false. - */ + /** Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later */ kerberos5ReadWrite?: boolean; - /** - * Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later. Default - * value: false. - */ - kerberos5iReadOnly?: boolean; - /** - * Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later. Default - * value: false. - */ - kerberos5iReadWrite?: boolean; - /** - * Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later. Default - * value: false. - */ - kerberos5pReadOnly?: boolean; - /** - * Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later. Default - * value: false. - */ - kerberos5pReadWrite?: boolean; - /** - * Allows CIFS protocol - */ + /** Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later */ + kerberos5IReadOnly?: boolean; + /** Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later */ + kerberos5IReadWrite?: boolean; + /** Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later */ + kerberos5PReadOnly?: boolean; + /** Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later */ + kerberos5PReadWrite?: boolean; + /** Allows CIFS protocol */ cifs?: boolean; - /** - * Allows NFSv3 protocol. Enable only for NFSv3 type volumes - */ + /** Allows NFSv3 protocol. Enable only for NFSv3 type volumes */ nfsv3?: boolean; - /** - * Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes - */ + /** Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes */ nfsv41?: boolean; - /** - * Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses - * and host names - */ + /** Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names */ allowedClients?: string; - /** - * Has root access to volume. Default value: true. - */ + /** Has root access to volume */ hasRootAccess?: boolean; - /** - * This parameter specifies who is authorized to change the ownership of a file. restricted - - * Only root user can change the ownership of the file. unrestricted - Non-root users can change - * ownership of files that they own. Possible values include: 'Restricted', 'Unrestricted'. - * Default value: 'Restricted'. - */ + /** This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. */ chownMode?: ChownMode; } -/** - * Set of export policy rules - * @summary exportPolicy - */ -export interface VolumePropertiesExportPolicy { - /** - * Export policy rule. Export policy rule - */ - rules?: ExportPolicyRule[]; -} - -/** - * Mount target properties - */ +/** Mount target properties */ export interface MountTargetProperties { /** - * mountTargetId. UUID v4 used to identify the MountTarget - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * UUID v4 used to identify the MountTarget + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly mountTargetId?: string; - /** - * fileSystemId. UUID v4 used to identify the MountTarget - */ + /** UUID v4 used to identify the MountTarget */ fileSystemId: string; /** - * ipAddress. The mount target's IPv4 address - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The mount target's IPv4 address + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly ipAddress?: string; - /** - * smbServerFQDN. The SMB server's Fully Qualified Domain Name, FQDN - */ + /** The SMB server's Fully Qualified Domain Name, FQDN */ smbServerFqdn?: string; } -/** - * Volume Backup Properties - */ +/** DataProtection type volumes include an object containing details of the replication */ +export interface VolumePropertiesDataProtection { + /** Backup Properties */ + backup?: VolumeBackupProperties; + /** Replication properties */ + replication?: ReplicationObject; + /** Snapshot properties. */ + snapshot?: VolumeSnapshotProperties; +} + +/** Volume Backup Properties */ export interface VolumeBackupProperties { - /** - * Backup Policy Resource ID - */ + /** Backup Policy Resource ID */ backupPolicyId?: string; - /** - * Policy Enforced - */ + /** Policy Enforced */ policyEnforced?: boolean; - /** - * Vault Resource ID - */ + /** Vault Resource ID */ vaultId?: string; - /** - * Backup Enabled - */ + /** Backup Enabled */ backupEnabled?: boolean; } -/** - * Replication properties - */ +/** Replication properties */ export interface ReplicationObject { - /** - * Id - */ + /** Id */ replicationId?: string; - /** - * Indicates whether the local volume is the source or destination for the Volume Replication. - * Possible values include: 'src', 'dst' - */ + /** Indicates whether the local volume is the source or destination for the Volume Replication */ endpointType?: EndpointType; - /** - * Schedule. Possible values include: '_10minutely', 'hourly', 'daily' - */ - replicationSchedule: ReplicationSchedule; - /** - * The resource ID of the remote volume. - */ + /** Schedule */ + replicationSchedule?: ReplicationSchedule; + /** The resource ID of the remote volume. */ remoteVolumeResourceId: string; - /** - * The remote region for the other end of the Volume Replication. - */ + /** The remote region for the other end of the Volume Replication. */ remoteVolumeRegion?: string; } -/** - * Volume Snapshot Properties - */ +/** Volume Snapshot Properties */ export interface VolumeSnapshotProperties { - /** - * Snapshot Policy ResourceId - */ + /** Snapshot Policy ResourceId */ snapshotPolicyId?: string; } -/** - * DataProtection type volumes include an object containing details of the replication - * @summary DataProtection - */ -export interface VolumePropertiesDataProtection { +/** Application specific parameters for the placement of volumes in the volume group */ +export interface PlacementKeyValuePairs { + /** Key for an application specific parameter for the placement of volumes in the volume group */ + key: string; + /** Value for an application specific parameter for the placement of volumes in the volume group */ + value: string; +} + +/** Volume patch resource */ +export interface VolumePatch { + /** Resource location */ + location?: string; /** - * Backup. Backup Properties + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - backup?: VolumeBackupProperties; + readonly id?: string; /** - * Replication. Replication properties + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - replication?: ReplicationObject; + readonly name?: string; /** - * Snapshot. Snapshot properties. + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** The service level of the file system */ + serviceLevel?: ServiceLevel; + /** Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. */ + usageThreshold?: number; + /** Set of export policy rules */ + exportPolicy?: VolumePatchPropertiesExportPolicy; + /** Maximum throughput in Mibps that can be achieved by this volume and this will be accepted as input only for manual qosType volume */ + throughputMibps?: number; + /** DataProtection type volumes include an object containing details of the replication */ + dataProtection?: VolumePatchPropertiesDataProtection; + /** Specifies if default quota is enabled for the volume. */ + isDefaultQuotaEnabled?: boolean; + /** Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . */ + defaultUserQuotaInKiBs?: number; + /** Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. */ + defaultGroupQuotaInKiBs?: number; +} + +/** Set of export policy rules */ +export interface VolumePatchPropertiesExportPolicy { + /** Export policy rule */ + rules?: ExportPolicyRule[]; +} + +/** DataProtection type volumes include an object containing details of the replication */ +export interface VolumePatchPropertiesDataProtection { + /** Backup Properties */ + backup?: VolumeBackupProperties; + /** Snapshot properties. */ snapshot?: VolumeSnapshotProperties; } -/** - * Volume resource - */ -export interface Volume extends BaseResource { - /** - * Resource location - */ +/** revert a volume to the snapshot */ +export interface VolumeRevert { + /** Resource id of the snapshot */ + snapshotId?: string; +} + +/** Break replication request */ +export interface BreakReplicationRequest { + /** If replication is in status transferring and you want to force break the replication, set to true */ + forceBreakReplication?: boolean; +} + +/** Replication status */ +export interface ReplicationStatus { + /** Replication health check */ + healthy?: boolean; + /** Status of the mirror relationship */ + relationshipStatus?: RelationshipStatus; + /** The status of the replication */ + mirrorState?: MirrorState; + /** The progress of the replication */ + totalProgress?: string; + /** Displays error message if the replication is in an error state */ + errorMessage?: string; +} + +/** Authorize request */ +export interface AuthorizeRequest { + /** Resource id of the remote volume */ + remoteVolumeResourceId?: string; +} + +/** Pool change request */ +export interface PoolChangeRequest { + /** Resource id of the pool to move volume to */ + newPoolResourceId: string; +} + +/** List of Snapshots */ +export interface SnapshotsList { + /** A list of Snapshots */ + value?: Snapshot[]; +} + +/** Snapshot of a Volume */ +export interface Snapshot { + /** Resource location */ location: string; /** * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; /** - * Resource tags + * UUID v4 used to identify the Snapshot + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tags?: { [propertyName: string]: string }; + readonly snapshotId?: string; /** - * FileSystem ID. Unique FileSystem Identifier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The creation date of the snapshot + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly fileSystemId?: string; + readonly created?: Date; /** - * Creation Token or File Path. A unique file path for the volume. Used when creating mount - * targets + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. */ - creationToken: string; + readonly provisioningState?: string; +} + +/** List of Snapshot Policies */ +export interface SnapshotPoliciesList { + /** A list of snapshot policies */ + value?: SnapshotPolicy[]; +} + +/** Snapshot policy information */ +export interface SnapshotPolicy { + /** Resource location */ + location: string; /** - * serviceLevel. The service level of the file system. Possible values include: 'Standard', - * 'Premium', 'Ultra'. Default value: 'Premium'. + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - serviceLevel?: ServiceLevel; + readonly id?: string; /** - * usageThreshold. Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. - * Default value: 107374182400. + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - usageThreshold: number; + readonly name?: string; /** - * exportPolicy. Set of export policy rules + * A unique read-only string that changes whenever the resource is updated. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - exportPolicy?: VolumePropertiesExportPolicy; + readonly etag?: string; /** - * protocolTypes. Set of protocol types, default NFSv3, CIFS for SMB protocol + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - protocolTypes?: string[]; + readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** Schedule for hourly snapshots */ + hourlySchedule?: HourlySchedule; + /** Schedule for daily snapshots */ + dailySchedule?: DailySchedule; + /** Schedule for weekly snapshots */ + weeklySchedule?: WeeklySchedule; + /** Schedule for monthly snapshots */ + monthlySchedule?: MonthlySchedule; + /** The property to decide policy is enabled or not */ + enabled?: boolean; /** * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; +} + +/** Hourly Schedule properties */ +export interface HourlySchedule { + /** Hourly snapshot count to keep */ + snapshotsToKeep?: number; + /** Indicates which minute snapshot should be taken */ + minute?: number; + /** Resource size in bytes, current storage usage for the volume in bytes */ + usedBytes?: number; +} + +/** Daily Schedule properties */ +export interface DailySchedule { + /** Daily snapshot count to keep */ + snapshotsToKeep?: number; + /** Indicates which hour in UTC timezone a snapshot should be taken */ + hour?: number; + /** Indicates which minute snapshot should be taken */ + minute?: number; + /** Resource size in bytes, current storage usage for the volume in bytes */ + usedBytes?: number; +} + +/** Weekly Schedule properties, make a snapshot every week at a specific day or days */ +export interface WeeklySchedule { + /** Weekly snapshot count to keep */ + snapshotsToKeep?: number; + /** Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english */ + day?: string; + /** Indicates which hour in UTC timezone a snapshot should be taken */ + hour?: number; + /** Indicates which minute snapshot should be taken */ + minute?: number; + /** Resource size in bytes, current storage usage for the volume in bytes */ + usedBytes?: number; +} + +/** Monthly Schedule properties */ +export interface MonthlySchedule { + /** Monthly snapshot count to keep */ + snapshotsToKeep?: number; + /** Indicates which days of the month snapshot should be taken. A comma delimited string. */ + daysOfMonth?: string; + /** Indicates which hour in UTC timezone a snapshot should be taken */ + hour?: number; + /** Indicates which minute snapshot should be taken */ + minute?: number; + /** Resource size in bytes, current storage usage for the volume in bytes */ + usedBytes?: number; +} + +/** Snapshot policy Details for create and update */ +export interface SnapshotPolicyPatch { + /** Resource location */ + location?: string; /** - * Snapshot ID. UUID v4 or resource identifier used to identify the Snapshot. - */ - snapshotId?: string; - /** - * Backup ID. UUID v4 or resource identifier used to identify the Backup. - */ - backupId?: string; - /** - * Baremetal Tenant ID. Unique Baremetal Tenant Identifier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly baremetalTenantId?: string; - /** - * The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes - */ - subnetId: string; - /** - * mountTargets. List of mount targets - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly mountTargets?: MountTargetProperties[]; + readonly id?: string; /** - * What type of volume is this + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - volumeType?: string; + readonly name?: string; /** - * DataProtection. DataProtection type volumes include an object containing details of the - * replication + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dataProtection?: VolumePropertiesDataProtection; + readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** Schedule for hourly snapshots */ + hourlySchedule?: HourlySchedule; + /** Schedule for daily snapshots */ + dailySchedule?: DailySchedule; + /** Schedule for weekly snapshots */ + weeklySchedule?: WeeklySchedule; + /** Schedule for monthly snapshots */ + monthlySchedule?: MonthlySchedule; + /** The property to decide policy is enabled or not */ + enabled?: boolean; /** - * Restoring + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. */ - isRestoring?: boolean; + readonly provisioningState?: string; +} + +/** Volumes associated with snapshot policy */ +export interface SnapshotPolicyVolumeList { + /** List of volumes */ + value?: Volume[]; +} + +/** Backup status */ +export interface BackupStatus { /** - * If enabled (true) the volume will contain a read-only snapshot directory which provides access - * to each of the volume's snapshots (default to true). Default value: true. + * Backup health status + * NOTE: This property will not be serialized. It can only be populated by the server. */ - snapshotDirectoryVisible?: boolean; + readonly healthy?: boolean; /** - * Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. - * Default value: false. + * Status of the backup mirror relationship + * NOTE: This property will not be serialized. It can only be populated by the server. */ - kerberosEnabled?: boolean; + readonly relationshipStatus?: RelationshipStatus; /** - * The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS - * protocol. Possible values include: 'ntfs', 'unix'. Default value: 'unix'. + * The status of the backup + * NOTE: This property will not be serialized. It can only be populated by the server. */ - securityStyle?: SecurityStyle; + readonly mirrorState?: MirrorState; /** - * Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be - * used with swagger version 2020-08-01 or later. Default value: false. + * Reason for the unhealthy backup relationship + * NOTE: This property will not be serialized. It can only be populated by the server. */ - smbEncryption?: boolean; + readonly unhealthyReason?: string; /** - * Enables continuously available share property for smb volume. Only applicable for SMB volume. - * Default value: false. + * Displays error message if the backup is in an error state + * NOTE: This property will not be serialized. It can only be populated by the server. */ - smbContinuouslyAvailable?: boolean; + readonly errorMessage?: string; /** - * Maximum throughput in Mibps that can be achieved by this volume. Default value: 0. + * Displays the last transfer size + * NOTE: This property will not be serialized. It can only be populated by the server. */ - throughputMibps?: number; + readonly lastTransferSize?: number; /** - * Encryption Key Source. Possible values are: 'Microsoft.NetApp' + * Displays the last transfer type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - encryptionKeySource?: string; + readonly lastTransferType?: string; /** - * Specifies whether LDAP is enabled or not for a given NFS volume. Default value: false. + * Displays the total bytes transferred + * NOTE: This property will not be serialized. It can only be populated by the server. */ - ldapEnabled?: boolean; + readonly totalTransferBytes?: number; +} + +/** Restore status */ +export interface RestoreStatus { /** - * Specifies whether Cool Access(tiering) is enabled for the volume. Default value: false. + * Restore health status + * NOTE: This property will not be serialized. It can only be populated by the server. */ - coolAccess?: boolean; + readonly healthy?: boolean; /** - * Specifies the number of days after which data that is not accessed by clients will be tiered. + * Status of the restore SnapMirror relationship + * NOTE: This property will not be serialized. It can only be populated by the server. */ - coolnessPeriod?: number; + readonly relationshipStatus?: RelationshipStatus; /** - * UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set - * user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for - * the owner of the file: read (4), write (2) and execute (1). Third selects permissions for - * other users in the same group. the fourth for other users not in the group. 0755 - gives - * read/write/execute permissions to owner and read/execute to group and other users. + * The status of the restore + * NOTE: This property will not be serialized. It can only be populated by the server. */ - unixPermissions?: string; -} - -/** - * Identity for the resource. - */ -export interface ResourceIdentity { + readonly mirrorState?: MirrorState; /** - * Object id of the identity resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Reason for the unhealthy restore relationship + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly unhealthyReason?: string; /** - * The tenant id of the resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Displays error message if the restore is in an error state + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tenantId?: string; + readonly errorMessage?: string; /** - * Type of Identity. Supported values are: 'None', 'SystemAssigned' + * Displays the total bytes transferred + * NOTE: This property will not be serialized. It can only be populated by the server. */ - type?: string; + readonly totalTransferBytes?: number; } -/** - * Replication status - */ -export interface ReplicationStatus { - /** - * Replication health check - */ - healthy?: boolean; +/** List of Backups */ +export interface BackupsList { + /** A list of Backups */ + value?: Backup[]; +} + +/** Backup of a Volume */ +export interface Backup { + /** Resource location */ + location: string; /** - * Status of the mirror relationship. Possible values include: 'Idle', 'Transferring' + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - relationshipStatus?: RelationshipStatus; + readonly id?: string; /** - * The status of the replication. Possible values include: 'Uninitialized', 'Mirrored', 'Broken' + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - mirrorState?: MirrorState; + readonly name?: string; /** - * The progress of the replication + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - totalProgress?: string; + readonly type?: string; /** - * Displays error message if the replication is in an error state + * UUID v4 used to identify the Backup + * NOTE: This property will not be serialized. It can only be populated by the server. */ - errorMessage?: string; -} - -/** - * Set of export policy rules - * @summary exportPolicy - */ -export interface VolumePatchPropertiesExportPolicy { + readonly backupId?: string; /** - * Export policy rule. Export policy rule + * The creation date of the backup + * NOTE: This property will not be serialized. It can only be populated by the server. */ - rules?: ExportPolicyRule[]; -} - -/** - * DataProtection type volumes include an object containing details of the replication - * @summary DataProtection - */ -export interface VolumePatchPropertiesDataProtection { + readonly creationDate?: Date; /** - * Backup. Backup Properties + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. */ - backup?: VolumeBackupProperties; + readonly provisioningState?: string; /** - * Snapshot. Snapshot properties. + * Size of backup + * NOTE: This property will not be serialized. It can only be populated by the server. */ - snapshot?: VolumeSnapshotProperties; -} - -/** - * Volume patch resource - */ -export interface VolumePatch extends BaseResource { + readonly size?: number; + /** Label for backup */ + label?: string; /** - * Resource location + * Type of backup Manual or Scheduled + * NOTE: This property will not be serialized. It can only be populated by the server. */ - location?: string; + readonly backupType?: BackupType; /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Failure reason + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly failureReason?: string; /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Volume name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly volumeName?: string; + /** Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups */ + useExistingSnapshot?: boolean; +} + +/** Backup patch */ +export interface BackupPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * UUID v4 used to identify the Backup + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly backupId?: string; /** - * Resource tags + * The creation date of the backup + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tags?: { [propertyName: string]: string }; + readonly creationDate?: Date; /** - * serviceLevel. The service level of the file system. Possible values include: 'Standard', - * 'Premium', 'Ultra'. Default value: 'Premium'. + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. */ - serviceLevel?: ServiceLevel; + readonly provisioningState?: string; /** - * usageThreshold. Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. - * Default value: 107374182400. + * Size of backup + * NOTE: This property will not be serialized. It can only be populated by the server. */ - usageThreshold?: number; + readonly size?: number; + /** Label for backup */ + label?: string; /** - * exportPolicy. Set of export policy rules + * Type of backup Manual or Scheduled + * NOTE: This property will not be serialized. It can only be populated by the server. */ - exportPolicy?: VolumePatchPropertiesExportPolicy; + readonly backupType?: BackupType; /** - * Maximum throughput in Mibps that can be achieved by this volume. + * Failure reason + * NOTE: This property will not be serialized. It can only be populated by the server. */ - throughputMibps?: number; + readonly failureReason?: string; /** - * DataProtection. DataProtection type volumes include an object containing details of the - * replication + * Volume name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dataProtection?: VolumePatchPropertiesDataProtection; + readonly volumeName?: string; + /** Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups */ + useExistingSnapshot?: boolean; } -/** - * Mount Target - */ -export interface MountTarget { - /** - * Resource location - */ +/** List of Backup Policies */ +export interface BackupPoliciesList { + /** A list of backup policies */ + value?: BackupPolicy[]; +} + +/** Backup policy information */ +export interface BackupPolicy { + /** Resource location */ location: string; /** * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A unique read-only string that changes whenever the resource is updated. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly etag?: string; /** - * Resource tags + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly type?: string; + /** Resource tags */ tags?: { [propertyName: string]: string }; /** - * mountTargetId. UUID v4 used to identify the MountTarget - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Backup Policy Resource ID + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly mountTargetId?: string; + readonly backupPolicyId?: string; /** - * fileSystemId. UUID v4 used to identify the MountTarget + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. */ - fileSystemId: string; + readonly provisioningState?: string; + /** Daily backups count to keep */ + dailyBackupsToKeep?: number; + /** Weekly backups count to keep */ + weeklyBackupsToKeep?: number; + /** Monthly backups count to keep */ + monthlyBackupsToKeep?: number; /** - * ipAddress. The mount target's IPv4 address - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Volumes using current backup policy + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ipAddress?: string; + readonly volumesAssigned?: number; + /** The property to decide policy is enabled or not */ + enabled?: boolean; /** - * smbServerFQDN. The SMB server's Fully Qualified Domain Name, FQDN + * A list of volumes assigned to this policy + * NOTE: This property will not be serialized. It can only be populated by the server. */ - smbServerFqdn?: string; + readonly volumeBackups?: VolumeBackups[]; } -/** - * Snapshot of a Volume - */ -export interface Snapshot extends BaseResource { - /** - * Resource location - */ - location: string; +/** Volume details using the backup policy */ +export interface VolumeBackups { + /** Volume name */ + volumeName?: string; + /** Total count of backups for volume */ + backupsCount?: number; + /** Policy enabled */ + policyEnabled?: boolean; +} + +/** Backup policy Details for create and update */ +export interface BackupPolicyPatch { + /** Resource location */ + location?: string; /** * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; /** - * snapshotId. UUID v4 used to identify the Snapshot - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly snapshotId?: string; - /** - * name. The creation date of the snapshot - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Backup Policy Resource ID + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly created?: Date; + readonly backupPolicyId?: string; /** * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; -} - -/** - * Hourly Schedule properties - */ -export interface HourlySchedule { - /** - * Hourly snapshot count to keep - */ - snapshotsToKeep?: number; + /** Daily backups count to keep */ + dailyBackupsToKeep?: number; + /** Weekly backups count to keep */ + weeklyBackupsToKeep?: number; + /** Monthly backups count to keep */ + monthlyBackupsToKeep?: number; /** - * Indicates which minute snapshot should be taken + * Volumes using current backup policy + * NOTE: This property will not be serialized. It can only be populated by the server. */ - minute?: number; + readonly volumesAssigned?: number; + /** The property to decide policy is enabled or not */ + enabled?: boolean; /** - * Resource size in bytes, current storage usage for the volume in bytes + * A list of volumes assigned to this policy + * NOTE: This property will not be serialized. It can only be populated by the server. */ - usedBytes?: number; + readonly volumeBackups?: VolumeBackups[]; } -/** - * Daily Schedule properties - */ -export interface DailySchedule { +/** List of Vaults */ +export interface VaultList { + /** A list of vaults */ + value?: Vault[]; +} + +/** Vault information */ +export interface Vault { + /** Resource location */ + location: string; /** - * Daily snapshot count to keep + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - snapshotsToKeep?: number; + readonly id?: string; /** - * Indicates which hour in UTC timezone a snapshot should be taken + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hour?: number; - /** - * Indicates which minute snapshot should be taken - */ - minute?: number; + readonly name?: string; /** - * Resource size in bytes, current storage usage for the volume in bytes + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - usedBytes?: number; + readonly type?: string; + /** Vault Name */ + vaultName?: string; } -/** - * Weekly Schedule properties, make a snapshot every week at a specific day or days - */ -export interface WeeklySchedule { - /** - * Weekly snapshot count to keep - */ - snapshotsToKeep?: number; +/** List of volume group resources */ +export interface VolumeGroupList { + /** List of volume Groups */ + value?: VolumeGroup[]; +} + +/** Volume group resource */ +export interface VolumeGroup { + /** Resource location */ + location?: string; /** - * Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day - * names in english + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - day?: string; + readonly id?: string; /** - * Indicates which hour in UTC timezone a snapshot should be taken + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hour?: number; + readonly name?: string; /** - * Indicates which minute snapshot should be taken + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - minute?: number; + readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; /** - * Resource size in bytes, current storage usage for the volume in bytes + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. */ - usedBytes?: number; + readonly provisioningState?: string; + /** Volume group details */ + groupMetaData?: VolumeGroupMetaData; } -/** - * Monthly Schedule properties - */ -export interface MonthlySchedule { +/** Volume group properties */ +export interface VolumeGroupMetaData { + /** Group Description */ + groupDescription?: string; + /** Application Type */ + applicationType?: ApplicationType; + /** Application specific identifier */ + applicationIdentifier?: string; + /** Application specific placement rules for the volume group */ + globalPlacementRules?: PlacementKeyValuePairs[]; + /** Application specific identifier of deployment rules for the volume group */ + deploymentSpecId?: string; /** - * Monthly snapshot count to keep + * Number of volumes in volume group + * NOTE: This property will not be serialized. It can only be populated by the server. */ - snapshotsToKeep?: number; + readonly volumesCount?: number; +} + +/** Volume group resource for create */ +export interface VolumeGroupDetails { + /** Resource location */ + location?: string; /** - * Indicates which days of the month snapshot should be taken. A comma delimited string. + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - daysOfMonth?: string; + readonly id?: string; /** - * Indicates which hour in UTC timezone a snapshot should be taken + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hour?: number; + readonly name?: string; /** - * Indicates which minute snapshot should be taken + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - minute?: number; + readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; /** - * Resource size in bytes, current storage usage for the volume in bytes + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. */ - usedBytes?: number; + readonly provisioningState?: string; + /** Volume group details */ + groupMetaData?: VolumeGroupMetaData; + /** List of volumes from group */ + volumes?: VolumeGroupVolumeProperties[]; } -/** - * Snapshot policy information - */ -export interface SnapshotPolicy extends BaseResource { - /** - * Resource location - */ - location: string; +/** Volume resource */ +export interface VolumeGroupVolumeProperties { /** * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; + /** Resource name */ + name?: string; /** * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; /** - * Resource tags + * Unique FileSystem Identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tags?: { [propertyName: string]: string }; + readonly fileSystemId?: string; + /** A unique file path for the volume. Used when creating mount targets */ + creationToken: string; + /** The service level of the file system */ + serviceLevel?: ServiceLevel; + /** Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. */ + usageThreshold: number; + /** Set of export policy rules */ + exportPolicy?: VolumePropertiesExportPolicy; + /** Set of protocol types, default NFSv3, CIFS for SMB protocol */ + protocolTypes?: string[]; /** - * hourlySchedule. Schedule for hourly snapshots + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hourlySchedule?: HourlySchedule; + readonly provisioningState?: string; + /** UUID v4 or resource identifier used to identify the Snapshot. */ + snapshotId?: string; + /** UUID v4 or resource identifier used to identify the Backup. */ + backupId?: string; /** - * dailySchedule. Schedule for daily snapshots + * Unique Baremetal Tenant Identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dailySchedule?: DailySchedule; + readonly baremetalTenantId?: string; + /** The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes */ + subnetId: string; + /** Basic network, or Standard features available to the volume. */ + networkFeatures?: NetworkFeatures; /** - * weeklySchedule. Schedule for weekly snapshots + * Network Sibling Set ID for the the group of volumes sharing networking resources. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - weeklySchedule?: WeeklySchedule; + readonly networkSiblingSetId?: string; /** - * monthlySchedule. Schedule for monthly snapshots + * Provides storage to network proximity information for the volume. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - monthlySchedule?: MonthlySchedule; + readonly storageToNetworkProximity?: VolumeStorageToNetworkProximity; /** - * The property to decide policy is enabled or not + * List of mount targets + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enabled?: boolean; + readonly mountTargets?: MountTargetProperties[]; + /** What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection */ + volumeType?: string; + /** DataProtection type volumes include an object containing details of the replication */ + dataProtection?: VolumePropertiesDataProtection; + /** Restoring */ + isRestoring?: boolean; + /** If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (default to true). */ + snapshotDirectoryVisible?: boolean; + /** Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later */ + kerberosEnabled?: boolean; + /** The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol */ + securityStyle?: SecurityStyle; + /** Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later */ + smbEncryption?: boolean; + /** Enables continuously available share property for smb volume. Only applicable for SMB volume */ + smbContinuouslyAvailable?: boolean; + /** Maximum throughput in Mibps that can be achieved by this volume and this will be accepted as input only for manual qosType volume */ + throughputMibps?: number; + /** Encryption Key Source. Possible values are: 'Microsoft.NetApp' */ + encryptionKeySource?: string; + /** Specifies whether LDAP is enabled or not for a given NFS volume. */ + ldapEnabled?: boolean; + /** Specifies whether Cool Access(tiering) is enabled for the volume. */ + coolAccess?: boolean; + /** Specifies the number of days after which data that is not accessed by clients will be tiered. */ + coolnessPeriod?: number; + /** UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. */ + unixPermissions?: string; /** - * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly cloneProgress?: number; + /** Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose */ + avsDataStore?: AvsDataStore; + /** Specifies if default quota is enabled for the volume. */ + isDefaultQuotaEnabled?: boolean; + /** Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . */ + defaultUserQuotaInKiBs?: number; + /** Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. */ + defaultGroupQuotaInKiBs?: number; + /** + * Volume Group Name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly volumeGroupName?: string; + /** Pool Resource Id used in case of creating a volume through volume group */ + capacityPoolResourceId?: string; + /** Proximity placement group associated with the volume */ + proximityPlacementGroup?: string; + /** + * T2 network information + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly t2Network?: string; + /** Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log */ + volumeSpecName?: string; + /** Application specific placement rules for the particular volume */ + placementRules?: PlacementKeyValuePairs[]; } -/** - * Snapshot policy properties - */ -export interface SnapshotPolicyDetails { +/** Identity for the resource. */ +export interface ResourceIdentity { /** - * Resource location + * Object id of the identity resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - location?: string; + readonly principalId?: string; + /** + * The tenant id of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of Identity. Supported values are: 'None', 'SystemAssigned' */ + type?: string; +} + +/** Mount Target */ +export interface MountTarget { + /** Resource location */ + location: string; /** * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; - /** - * Resource tags - */ + /** Resource tags */ tags?: { [propertyName: string]: string }; /** - * hourlySchedule. Schedule for hourly snapshots + * UUID v4 used to identify the MountTarget + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hourlySchedule?: HourlySchedule; + readonly mountTargetId?: string; + /** UUID v4 used to identify the MountTarget */ + fileSystemId: string; /** - * dailySchedule. Schedule for daily snapshots + * The mount target's IPv4 address + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dailySchedule?: DailySchedule; + readonly ipAddress?: string; + /** The SMB server's Fully Qualified Domain Name, FQDN */ + smbServerFqdn?: string; +} + +/** Snapshot policy properties */ +export interface SnapshotPolicyDetails { + /** Resource location */ + location?: string; /** - * weeklySchedule. Schedule for weekly snapshots + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - weeklySchedule?: WeeklySchedule; + readonly id?: string; /** - * monthlySchedule. Schedule for monthly snapshots + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - monthlySchedule?: MonthlySchedule; + readonly name?: string; /** - * The property to decide policy is enabled or not + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** Schedule for hourly snapshots */ + hourlySchedule?: HourlySchedule; + /** Schedule for daily snapshots */ + dailySchedule?: DailySchedule; + /** Schedule for weekly snapshots */ + weeklySchedule?: WeeklySchedule; + /** Schedule for monthly snapshots */ + monthlySchedule?: MonthlySchedule; + /** The property to decide policy is enabled or not */ enabled?: boolean; /** * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; } -/** - * Snapshot policy Details for create and update - */ -export interface SnapshotPolicyPatch { - /** - * Resource location - */ +/** Backup policy properties */ +export interface BackupPolicyDetails { + /** Resource location */ location?: string; /** * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; /** - * Resource tags + * Backup Policy Resource ID + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tags?: { [propertyName: string]: string }; + readonly backupPolicyId?: string; /** - * hourlySchedule. Schedule for hourly snapshots + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hourlySchedule?: HourlySchedule; + readonly provisioningState?: string; + /** Daily backups count to keep */ + dailyBackupsToKeep?: number; + /** Weekly backups count to keep */ + weeklyBackupsToKeep?: number; + /** Monthly backups count to keep */ + monthlyBackupsToKeep?: number; /** - * dailySchedule. Schedule for daily snapshots + * Volumes using current backup policy + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dailySchedule?: DailySchedule; + readonly volumesAssigned?: number; + /** The property to decide policy is enabled or not */ + enabled?: boolean; /** - * weeklySchedule. Schedule for weekly snapshots + * A list of volumes assigned to this policy + * NOTE: This property will not be serialized. It can only be populated by the server. */ - weeklySchedule?: WeeklySchedule; + readonly volumeBackups?: VolumeBackups[]; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export type ProxyResource = Resource & {}; + +/** Information regarding Subscription Quota Item. */ +export type SubscriptionQuotaItem = ProxyResource & { /** - * monthlySchedule. Schedule for monthly snapshots + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - monthlySchedule?: MonthlySchedule; + readonly systemData?: SystemData; /** - * The property to decide policy is enabled or not + * The current quota value. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enabled?: boolean; + readonly current?: number; /** - * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The default quota value. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly default?: number; +}; + +/** Known values of {@link MetricAggregationType} that the service accepts. */ +export enum KnownMetricAggregationType { + Average = "Average" } /** - * Volumes associated with snapshot policy + * Defines values for MetricAggregationType. \ + * {@link KnownMetricAggregationType} can be used interchangeably with MetricAggregationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Average** */ -export interface SnapshotPolicyVolumeList { - /** - * List of volumes - */ - value?: any[]; +export type MetricAggregationType = string; + +/** Known values of {@link CheckNameResourceTypes} that the service accepts. */ +export enum KnownCheckNameResourceTypes { + MicrosoftNetAppNetAppAccounts = "Microsoft.NetApp/netAppAccounts", + MicrosoftNetAppNetAppAccountsCapacityPools = "Microsoft.NetApp/netAppAccounts/capacityPools", + MicrosoftNetAppNetAppAccountsCapacityPoolsVolumes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes", + MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" } /** - * revert a volume to the snapshot + * Defines values for CheckNameResourceTypes. \ + * {@link KnownCheckNameResourceTypes} can be used interchangeably with CheckNameResourceTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Microsoft.NetApp\/netAppAccounts** \ + * **Microsoft.NetApp\/netAppAccounts\/capacityPools** \ + * **Microsoft.NetApp\/netAppAccounts\/capacityPools\/volumes** \ + * **Microsoft.NetApp\/netAppAccounts\/capacityPools\/volumes\/snapshots** */ -export interface VolumeRevert { - /** - * Resource id of the snapshot - */ - snapshotId?: string; +export type CheckNameResourceTypes = string; + +/** Known values of {@link InAvailabilityReasonType} that the service accepts. */ +export enum KnownInAvailabilityReasonType { + Invalid = "Invalid", + AlreadyExists = "AlreadyExists" } /** - * Authorize request + * Defines values for InAvailabilityReasonType. \ + * {@link KnownInAvailabilityReasonType} can be used interchangeably with InAvailabilityReasonType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **AlreadyExists** */ -export interface AuthorizeRequest { - /** - * Resource id of the remote volume - */ - remoteVolumeResourceId?: string; +export type InAvailabilityReasonType = string; + +/** Known values of {@link CheckQuotaNameResourceTypes} that the service accepts. */ +export enum KnownCheckQuotaNameResourceTypes { + MicrosoftNetAppNetAppAccounts = "Microsoft.NetApp/netAppAccounts", + MicrosoftNetAppNetAppAccountsCapacityPools = "Microsoft.NetApp/netAppAccounts/capacityPools", + MicrosoftNetAppNetAppAccountsCapacityPoolsVolumes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes", + MicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" } /** - * Break replication request + * Defines values for CheckQuotaNameResourceTypes. \ + * {@link KnownCheckQuotaNameResourceTypes} can be used interchangeably with CheckQuotaNameResourceTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Microsoft.NetApp\/netAppAccounts** \ + * **Microsoft.NetApp\/netAppAccounts\/capacityPools** \ + * **Microsoft.NetApp\/netAppAccounts\/capacityPools\/volumes** \ + * **Microsoft.NetApp\/netAppAccounts\/capacityPools\/volumes\/snapshots** */ -export interface BreakReplicationRequest { - /** - * If replication is in status transferring and you want to force break the replication, set to - * true - */ - forceBreakReplication?: boolean; +export type CheckQuotaNameResourceTypes = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" } /** - * Pool change request + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** */ -export interface PoolChangeRequest { - /** - * Resource id of the pool to move volume to - */ - newPoolResourceId: string; +export type CreatedByType = string; + +/** Known values of {@link ActiveDirectoryStatus} that the service accepts. */ +export enum KnownActiveDirectoryStatus { + /** Active Directory created but not in use */ + Created = "Created", + /** Active Directory in use by SMB Volume */ + InUse = "InUse", + /** Active Directory Deleted */ + Deleted = "Deleted", + /** Error with the Active Directory */ + Error = "Error", + /** Active Directory Updating */ + Updating = "Updating" } /** - * Backup of a Volume + * Defines values for ActiveDirectoryStatus. \ + * {@link KnownActiveDirectoryStatus} can be used interchangeably with ActiveDirectoryStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Created**: Active Directory created but not in use \ + * **InUse**: Active Directory in use by SMB Volume \ + * **Deleted**: Active Directory Deleted \ + * **Error**: Error with the Active Directory \ + * **Updating**: Active Directory Updating */ -export interface Backup extends BaseResource { - /** - * Resource location - */ - location: string; - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * backupId. UUID v4 used to identify the Backup - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly backupId?: string; - /** - * name. The creation date of the backup - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly creationDate?: Date; - /** - * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Size of backup - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly size?: number; - /** - * Label for backup - */ - label?: string; - /** - * 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?: BackupType; - /** - * Failure reason - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly failureReason?: string; - /** - * Volume name - * **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; +export type ActiveDirectoryStatus = string; + +/** Known values of {@link ServiceLevel} that the service accepts. */ +export enum KnownServiceLevel { + /** Standard service level */ + Standard = "Standard", + /** Premium service level */ + Premium = "Premium", + /** Ultra service level */ + Ultra = "Ultra", + /** Zone redundant storage service level */ + StandardZRS = "StandardZRS" } /** - * Backup patch + * Defines values for ServiceLevel. \ + * {@link KnownServiceLevel} can be used interchangeably with ServiceLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard service level \ + * **Premium**: Premium service level \ + * **Ultra**: Ultra service level \ + * **StandardZRS**: Zone redundant storage service level */ -export interface BackupPatch extends BaseResource { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * backupId. UUID v4 used to identify the Backup - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly backupId?: string; - /** - * name. The creation date of the backup - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly creationDate?: Date; - /** - * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Size of backup - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly size?: number; - /** - * Label for backup - */ - label?: string; - /** - * 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?: BackupType; - /** - * Failure reason - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly failureReason?: string; - /** - * Volume name - * **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; -} - -/** - * Volume details using the backup policy - */ -export interface VolumeBackups { - /** - * Volume name - */ - volumeName?: string; - /** - * Total count of backups for volume - */ - backupsCount?: number; - /** - * Policy enabled - */ - policyEnabled?: boolean; -} - -/** - * Backup policy information - */ -export interface BackupPolicy extends BaseResource { - /** - * Resource location - */ - location: string; - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * Name of backup policy - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name1?: string; - /** - * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Daily backups count to keep - */ - dailyBackupsToKeep?: number; - /** - * Weekly backups count to keep - */ - weeklyBackupsToKeep?: number; - /** - * Monthly backups count to keep - */ - monthlyBackupsToKeep?: number; - /** - * Yearly backups count to keep - */ - yearlyBackupsToKeep?: number; - /** - * Volumes using current backup policy - */ - volumesAssigned?: number; - /** - * The property to decide policy is enabled or not - */ - enabled?: boolean; - /** - * A list of volumes assigned to this policy - */ - volumeBackups?: VolumeBackups[]; -} - -/** - * Backup policy properties - */ -export interface BackupPolicyDetails extends BaseResource { - /** - * Resource location - */ - location?: string; - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * Name of backup policy - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name1?: string; - /** - * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Daily backups count to keep - */ - dailyBackupsToKeep?: number; - /** - * Weekly backups count to keep - */ - weeklyBackupsToKeep?: number; - /** - * Monthly backups count to keep - */ - monthlyBackupsToKeep?: number; - /** - * Yearly backups count to keep - */ - yearlyBackupsToKeep?: number; - /** - * Volumes using current backup policy - */ - volumesAssigned?: number; - /** - * The property to decide policy is enabled or not - */ - enabled?: boolean; - /** - * A list of volumes assigned to this policy - */ - volumeBackups?: VolumeBackups[]; -} - -/** - * Backup policy Details for create and update - */ -export interface BackupPolicyPatch extends BaseResource { - /** - * Resource location - */ - location?: string; - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * Name of backup policy - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name1?: string; - /** - * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Daily backups count to keep - */ - dailyBackupsToKeep?: number; - /** - * Weekly backups count to keep - */ - weeklyBackupsToKeep?: number; - /** - * Monthly backups count to keep - */ - monthlyBackupsToKeep?: number; - /** - * Yearly backups count to keep - */ - yearlyBackupsToKeep?: number; - /** - * Volumes using current backup policy - */ - volumesAssigned?: number; - /** - * The property to decide policy is enabled or not - */ - enabled?: boolean; - /** - * A list of volumes assigned to this policy - */ - volumeBackups?: VolumeBackups[]; -} - -/** - * Vault information - */ -export interface Vault extends BaseResource { - /** - * Resource location - */ - location: string; - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Vault Name - */ - vaultName?: string; -} - -/** - * Backup status - */ -export interface BackupStatus { - /** - * Backup health status - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly healthy?: boolean; - /** - * Status of the backup mirror relationship. Possible values include: 'Idle', 'Transferring' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly relationshipStatus?: RelationshipStatus; - /** - * The status of the backup. Possible values include: 'Uninitialized', 'Mirrored', 'Broken' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly mirrorState?: MirrorState; - /** - * Reason for the unhealthy backup relationship - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly unhealthyReason?: string; - /** - * Displays error message if the backup is in an error state - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly errorMessage?: string; - /** - * Displays the last transfer size - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastTransferSize?: number; - /** - * Displays the last transfer type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastTransferType?: string; - /** - * Displays the total bytes transferred - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly totalTransferBytes?: number; -} - -/** - * Restore status - */ -export interface RestoreStatus { - /** - * Restore health status - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly healthy?: boolean; - /** - * Status of the restore SnapMirror relationship. Possible values include: 'Idle', 'Transferring' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly relationshipStatus?: RelationshipStatus; - /** - * The status of the restore. Possible values include: 'Uninitialized', 'Mirrored', 'Broken' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly mirrorState?: MirrorState; - /** - * Reason for the unhealthy restore relationship - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly unhealthyReason?: string; - /** - * Displays error message if the restore is in an error state - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly errorMessage?: string; - /** - * Displays the total bytes transferred - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly totalTransferBytes?: number; -} - -/** - * Optional Parameters. - */ -export interface VolumesRevertOptionalParams extends msRest.RequestOptionsBase { - /** - * Resource id of the snapshot - */ - snapshotId?: string; -} - -/** - * Optional Parameters. - */ -export interface VolumesBreakReplicationOptionalParams extends msRest.RequestOptionsBase { - /** - * If replication is in status transferring and you want to force break the replication, set to - * true - */ - forceBreakReplication?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VolumesAuthorizeReplicationOptionalParams extends msRest.RequestOptionsBase { - /** - * Resource id of the remote volume - */ - remoteVolumeResourceId?: string; -} - -/** - * Optional Parameters. - */ -export interface VolumesBeginRevertOptionalParams extends msRest.RequestOptionsBase { - /** - * Resource id of the snapshot - */ - snapshotId?: string; -} - -/** - * Optional Parameters. - */ -export interface VolumesBeginBreakReplicationOptionalParams extends msRest.RequestOptionsBase { - /** - * If replication is in status transferring and you want to force break the replication, set to - * true - */ - forceBreakReplication?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VolumesBeginAuthorizeReplicationOptionalParams extends msRest.RequestOptionsBase { - /** - * Resource id of the remote volume - */ - remoteVolumeResourceId?: string; -} - -/** - * Optional Parameters. - */ -export interface BackupsUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * Backup object supplied in the body of the operation. - */ - body?: BackupPatch; -} - -/** - * Optional Parameters. - */ -export interface BackupsBeginUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * Backup object supplied in the body of the operation. - */ - body?: BackupPatch; -} - -/** - * An interface representing AzureNetAppFilesManagementClientOptions. - */ -export interface AzureNetAppFilesManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; -} - -/** - * @interface - * Result of the request to list Cloud Volume operations. It contains a list of operations and a - * URL link to get the next set of results. - * @extends Array - */ -export interface OperationListResult extends Array { -} - -/** - * @interface - * List of NetApp account resources - * @extends Array - */ -export interface NetAppAccountList extends Array { - /** - * URL to get the next set of results. - */ - nextLink?: string; -} - -/** - * @interface - * List of capacity pool resources - * @extends Array - */ -export interface CapacityPoolList extends Array { - /** - * URL to get the next set of results. - */ - nextLink?: string; -} - -/** - * @interface - * List of volume resources - * @extends Array - */ -export interface VolumeList extends Array { - /** - * URL to get the next set of results. - */ - nextLink?: string; -} - -/** - * @interface - * List of Snapshots - * @extends Array - */ -export interface SnapshotsList extends Array { -} - -/** - * @interface - * List of Snapshot Policies - * @extends Array - */ -export interface SnapshotPoliciesList extends Array { -} - -/** - * @interface - * List of Backups - * @extends Array - */ -export interface BackupsList extends Array { -} - -/** - * @interface - * List of Backup Policies - * @extends Array - */ -export interface BackupPoliciesList extends Array { -} - -/** - * @interface - * List of Vaults - * @extends Array - */ -export interface VaultList extends Array { -} - -/** - * Defines values for InAvailabilityReasonType. - * Possible values include: 'Invalid', 'AlreadyExists' - * @readonly - * @enum {string} - */ -export type InAvailabilityReasonType = 'Invalid' | 'AlreadyExists'; - -/** - * Defines values for CheckNameResourceTypes. - * Possible values include: 'Microsoft.NetApp/netAppAccounts', - * 'Microsoft.NetApp/netAppAccounts/capacityPools', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' - * @readonly - * @enum {string} - */ -export type CheckNameResourceTypes = 'Microsoft.NetApp/netAppAccounts' | 'Microsoft.NetApp/netAppAccounts/capacityPools' | 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes' | 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'; - -/** - * Defines values for CheckQuotaNameResourceTypes. - * Possible values include: 'Microsoft.NetApp/netAppAccounts', - * 'Microsoft.NetApp/netAppAccounts/capacityPools', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' - * @readonly - * @enum {string} - */ -export type CheckQuotaNameResourceTypes = 'Microsoft.NetApp/netAppAccounts' | 'Microsoft.NetApp/netAppAccounts/capacityPools' | 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes' | 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'; - -/** - * Defines values for ActiveDirectoryStatus. - * Possible values include: 'Created', 'InUse', 'Deleted', 'Error', 'Updating' - * @readonly - * @enum {string} - */ -export type ActiveDirectoryStatus = 'Created' | 'InUse' | 'Deleted' | 'Error' | 'Updating'; - -/** - * Defines values for CreatedByType. - * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - * @readonly - * @enum {string} - */ -export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; - -/** - * Defines values for ServiceLevel. - * Possible values include: 'Standard', 'Premium', 'Ultra' - * @readonly - * @enum {string} - */ -export type ServiceLevel = 'Standard' | 'Premium' | 'Ultra'; - -/** - * Defines values for QosType. - * Possible values include: 'Auto', 'Manual' - * @readonly - * @enum {string} - */ -export type QosType = 'Auto' | 'Manual'; - -/** - * Defines values for ChownMode. - * Possible values include: 'Restricted', 'Unrestricted' - * @readonly - * @enum {string} - */ -export type ChownMode = 'Restricted' | 'Unrestricted'; - -/** - * Defines values for EndpointType. - * Possible values include: 'src', 'dst' - * @readonly - * @enum {string} - */ -export type EndpointType = 'src' | 'dst'; - -/** - * Defines values for ReplicationSchedule. - * Possible values include: '_10minutely', 'hourly', 'daily' - * @readonly - * @enum {string} - */ -export type ReplicationSchedule = '_10minutely' | 'hourly' | 'daily'; - -/** - * Defines values for SecurityStyle. - * Possible values include: 'ntfs', 'unix' - * @readonly - * @enum {string} - */ -export type SecurityStyle = 'ntfs' | 'unix'; - -/** - * Defines values for RelationshipStatus. - * Possible values include: 'Idle', 'Transferring' - * @readonly - * @enum {string} - */ -export type RelationshipStatus = 'Idle' | 'Transferring'; - -/** - * Defines values for MirrorState. - * Possible values include: 'Uninitialized', 'Mirrored', 'Broken' - * @readonly - * @enum {string} - */ -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. - */ -export type OperationsListResponse = OperationListResult & { - /** - * 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: OperationListResult; - }; -}; - -/** - * Contains response data for the checkNameAvailability operation. - */ -export type NetAppResourceCheckNameAvailabilityResponse = CheckAvailabilityResponse & { - /** - * 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: CheckAvailabilityResponse; - }; -}; - -/** - * Contains response data for the checkFilePathAvailability operation. - */ -export type NetAppResourceCheckFilePathAvailabilityResponse = CheckAvailabilityResponse & { - /** - * 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: CheckAvailabilityResponse; - }; -}; - -/** - * Contains response data for the checkQuotaAvailability operation. - */ -export type NetAppResourceCheckQuotaAvailabilityResponse = CheckAvailabilityResponse & { - /** - * 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: CheckAvailabilityResponse; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type AccountsListResponse = NetAppAccountList & { - /** - * 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: NetAppAccountList; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type AccountsGetResponse = NetAppAccount & { - /** - * 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: NetAppAccount; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type AccountsCreateOrUpdateResponse = NetAppAccount & { - /** - * 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: NetAppAccount; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type AccountsUpdateResponse = NetAppAccount & { - /** - * 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: NetAppAccount; - }; -}; - -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type AccountsBeginCreateOrUpdateResponse = NetAppAccount & { - /** - * 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: NetAppAccount; - }; -}; - -/** - * Contains response data for the beginUpdate operation. - */ -export type AccountsBeginUpdateResponse = NetAppAccount & { - /** - * 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: NetAppAccount; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type AccountsListNextResponse = NetAppAccountList & { - /** - * 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: NetAppAccountList; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type PoolsListResponse = CapacityPoolList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ServiceLevel = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CapacityPoolList; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type PoolsGetResponse = CapacityPool & { - /** - * 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: CapacityPool; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type PoolsCreateOrUpdateResponse = CapacityPool & { - /** - * 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: CapacityPool; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type PoolsUpdateResponse = CapacityPool & { - /** - * 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: CapacityPool; - }; -}; - -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type PoolsBeginCreateOrUpdateResponse = CapacityPool & { - /** - * 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: CapacityPool; - }; -}; - -/** - * Contains response data for the beginUpdate operation. - */ -export type PoolsBeginUpdateResponse = CapacityPool & { - /** - * 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: CapacityPool; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type PoolsListNextResponse = CapacityPoolList & { - /** - * 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: CapacityPoolList; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type VolumesListResponse = VolumeList & { - /** - * 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: VolumeList; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type VolumesGetResponse = Volume & { - /** - * 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: Volume; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type VolumesCreateOrUpdateResponse = Volume & { - /** - * 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: Volume; - }; -}; +/** Known values of {@link QosType} that the service accepts. */ +export enum KnownQosType { + /** qos type Auto */ + Auto = "Auto", + /** qos type Manual */ + Manual = "Manual" +} /** - * Contains response data for the update operation. + * Defines values for QosType. \ + * {@link KnownQosType} can be used interchangeably with QosType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Auto**: qos type Auto \ + * **Manual**: qos type Manual */ -export type VolumesUpdateResponse = Volume & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type QosType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Volume; - }; -}; +/** Known values of {@link EncryptionType} that the service accepts. */ +export enum KnownEncryptionType { + /** EncryptionType Single, volumes will use single encryption at rest */ + Single = "Single", + /** EncryptionType Double, volumes will use double encryption at rest */ + Double = "Double" +} /** - * Contains response data for the replicationStatusMethod operation. + * Defines values for EncryptionType. \ + * {@link KnownEncryptionType} can be used interchangeably with EncryptionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Single**: EncryptionType Single, volumes will use single encryption at rest \ + * **Double**: EncryptionType Double, volumes will use double encryption at rest */ -export type VolumesReplicationStatusMethodResponse = ReplicationStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type EncryptionType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReplicationStatus; - }; -}; +/** Known values of {@link ChownMode} that the service accepts. */ +export enum KnownChownMode { + Restricted = "Restricted", + Unrestricted = "Unrestricted" +} /** - * Contains response data for the beginCreateOrUpdate operation. + * Defines values for ChownMode. \ + * {@link KnownChownMode} can be used interchangeably with ChownMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Restricted** \ + * **Unrestricted** */ -export type VolumesBeginCreateOrUpdateResponse = Volume & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ChownMode = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Volume; - }; -}; +/** Known values of {@link NetworkFeatures} that the service accepts. */ +export enum KnownNetworkFeatures { + /** Basic network feature. */ + Basic = "Basic", + /** Standard network feature. */ + Standard = "Standard" +} /** - * Contains response data for the beginUpdate operation. + * Defines values for NetworkFeatures. \ + * {@link KnownNetworkFeatures} can be used interchangeably with NetworkFeatures, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic**: Basic network feature. \ + * **Standard**: Standard network feature. */ -export type VolumesBeginUpdateResponse = Volume & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type NetworkFeatures = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Volume; - }; -}; +/** Known values of {@link VolumeStorageToNetworkProximity} that the service accepts. */ +export enum KnownVolumeStorageToNetworkProximity { + /** Basic storage to network connectivity. */ + Default = "Default", + /** Standard T1 storage to network connectivity. */ + T1 = "T1", + /** Standard T2 storage to network connectivity. */ + T2 = "T2" +} /** - * Contains response data for the listNext operation. + * Defines values for VolumeStorageToNetworkProximity. \ + * {@link KnownVolumeStorageToNetworkProximity} can be used interchangeably with VolumeStorageToNetworkProximity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default**: Basic storage to network connectivity. \ + * **T1**: Standard T1 storage to network connectivity. \ + * **T2**: Standard T2 storage to network connectivity. */ -export type VolumesListNextResponse = VolumeList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type VolumeStorageToNetworkProximity = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VolumeList; - }; -}; +/** Known values of {@link EndpointType} that the service accepts. */ +export enum KnownEndpointType { + Src = "src", + Dst = "dst" +} /** - * Contains response data for the list operation. + * Defines values for EndpointType. \ + * {@link KnownEndpointType} can be used interchangeably with EndpointType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **src** \ + * **dst** */ -export type SnapshotsListResponse = SnapshotsList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type EndpointType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SnapshotsList; - }; -}; +/** Known values of {@link ReplicationSchedule} that the service accepts. */ +export enum KnownReplicationSchedule { + "10Minutely" = "_10minutely", + Hourly = "hourly", + Daily = "daily" +} /** - * Contains response data for the get operation. + * Defines values for ReplicationSchedule. \ + * {@link KnownReplicationSchedule} can be used interchangeably with ReplicationSchedule, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **_10minutely** \ + * **hourly** \ + * **daily** */ -export type SnapshotsGetResponse = Snapshot & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ReplicationSchedule = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Snapshot; - }; -}; +/** Known values of {@link SecurityStyle} that the service accepts. */ +export enum KnownSecurityStyle { + Ntfs = "ntfs", + Unix = "unix" +} /** - * Contains response data for the create operation. + * Defines values for SecurityStyle. \ + * {@link KnownSecurityStyle} can be used interchangeably with SecurityStyle, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ntfs** \ + * **unix** */ -export type SnapshotsCreateResponse = Snapshot & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type SecurityStyle = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Snapshot; - }; -}; +/** Known values of {@link AvsDataStore} that the service accepts. */ +export enum KnownAvsDataStore { + /** avsDataStore is enabled */ + Enabled = "Enabled", + /** avsDataStore is disabled */ + Disabled = "Disabled" +} /** - * Contains response data for the update operation. + * Defines values for AvsDataStore. \ + * {@link KnownAvsDataStore} can be used interchangeably with AvsDataStore, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: avsDataStore is enabled \ + * **Disabled**: avsDataStore is disabled */ -export type SnapshotsUpdateResponse = Snapshot & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type AvsDataStore = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Snapshot; - }; -}; +/** Known values of {@link RelationshipStatus} that the service accepts. */ +export enum KnownRelationshipStatus { + Idle = "Idle", + Transferring = "Transferring" +} /** - * Contains response data for the beginCreate operation. + * Defines values for RelationshipStatus. \ + * {@link KnownRelationshipStatus} can be used interchangeably with RelationshipStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Idle** \ + * **Transferring** */ -export type SnapshotsBeginCreateResponse = Snapshot & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type RelationshipStatus = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Snapshot; - }; -}; +/** Known values of {@link MirrorState} that the service accepts. */ +export enum KnownMirrorState { + Uninitialized = "Uninitialized", + Mirrored = "Mirrored", + Broken = "Broken" +} /** - * Contains response data for the beginUpdate operation. + * Defines values for MirrorState. \ + * {@link KnownMirrorState} can be used interchangeably with MirrorState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Uninitialized** \ + * **Mirrored** \ + * **Broken** */ -export type SnapshotsBeginUpdateResponse = Snapshot & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type MirrorState = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Snapshot; - }; -}; +/** Known values of {@link BackupType} that the service accepts. */ +export enum KnownBackupType { + /** Manual backup */ + Manual = "Manual", + /** Scheduled backup */ + Scheduled = "Scheduled" +} /** - * Contains response data for the list operation. + * Defines values for BackupType. \ + * {@link KnownBackupType} can be used interchangeably with BackupType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Manual**: Manual backup \ + * **Scheduled**: Scheduled backup */ -export type SnapshotPoliciesListResponse = SnapshotPoliciesList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type BackupType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SnapshotPoliciesList; - }; -}; +/** Known values of {@link ApplicationType} that the service accepts. */ +export enum KnownApplicationType { + SAPHana = "SAP-HANA" +} /** - * Contains response data for the get operation. + * Defines values for ApplicationType. \ + * {@link KnownApplicationType} can be used interchangeably with ApplicationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SAP-HANA** */ -export type SnapshotPoliciesGetResponse = SnapshotPolicy & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ApplicationType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SnapshotPolicy; - }; -}; +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the create operation. - */ -export type SnapshotPoliciesCreateResponse = SnapshotPolicy & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SnapshotPolicy; - }; -}; +/** Optional parameters. */ +export interface NetAppResourceCheckNameAvailabilityOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the update operation. - */ -export type SnapshotPoliciesUpdateResponse = SnapshotPolicy & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the checkNameAvailability operation. */ +export type NetAppResourceCheckNameAvailabilityResponse = CheckAvailabilityResponse; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SnapshotPolicy; - }; -}; +/** Optional parameters. */ +export interface NetAppResourceCheckFilePathAvailabilityOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listVolumes operation. - */ -export type SnapshotPoliciesListVolumesResponse = SnapshotPolicyVolumeList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the checkFilePathAvailability operation. */ +export type NetAppResourceCheckFilePathAvailabilityResponse = CheckAvailabilityResponse; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SnapshotPolicyVolumeList; - }; -}; +/** Optional parameters. */ +export interface NetAppResourceCheckQuotaAvailabilityOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginUpdate operation. - */ -export type SnapshotPoliciesBeginUpdateResponse = SnapshotPolicy & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the checkQuotaAvailability operation. */ +export type NetAppResourceCheckQuotaAvailabilityResponse = CheckAvailabilityResponse; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SnapshotPolicy; - }; -}; +/** Optional parameters. */ +export interface NetAppResourceQuotaLimitsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the getStatus operation. - */ -export type BackupsGetStatusResponse = BackupStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type NetAppResourceQuotaLimitsListResponse = SubscriptionQuotaItemList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupStatus; - }; -}; +/** Optional parameters. */ +export interface NetAppResourceQuotaLimitsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the getVolumeRestoreStatus operation. - */ -export type BackupsGetVolumeRestoreStatusResponse = RestoreStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type NetAppResourceQuotaLimitsGetResponse = SubscriptionQuotaItem; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RestoreStatus; - }; -}; +/** Optional parameters. */ +export interface AccountsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type BackupsListResponse = BackupsList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listBySubscription operation. */ +export type AccountsListBySubscriptionResponse = NetAppAccountList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupsList; - }; -}; +/** Optional parameters. */ +export interface AccountsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type BackupsGetResponse = Backup & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type AccountsListResponse = NetAppAccountList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Backup; - }; -}; +/** Optional parameters. */ +export interface AccountsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the create operation. - */ -export type BackupsCreateResponse = Backup & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type AccountsGetResponse = NetAppAccount; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Backup; - }; -}; +/** Optional parameters. */ +export interface AccountsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the update operation. - */ -export type BackupsUpdateResponse = Backup & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type AccountsCreateOrUpdateResponse = NetAppAccount; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Backup; - }; -}; +/** Optional parameters. */ +export interface AccountsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the beginCreate operation. - */ -export type BackupsBeginCreateResponse = Backup & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface AccountsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Backup; - }; -}; +/** Contains response data for the update operation. */ +export type AccountsUpdateResponse = NetAppAccount; -/** - * Contains response data for the beginUpdate operation. - */ -export type BackupsBeginUpdateResponse = Backup & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface AccountsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Backup; - }; -}; +/** Contains response data for the listBySubscriptionNext operation. */ +export type AccountsListBySubscriptionNextResponse = NetAppAccountList; -/** - * Contains response data for the list operation. - */ -export type AccountBackupsListResponse = BackupsList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface AccountsListNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupsList; - }; -}; +/** Contains response data for the listNext operation. */ +export type AccountsListNextResponse = NetAppAccountList; -/** - * Contains response data for the get operation. - */ -export type AccountBackupsGetResponse = Backup & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PoolsListOptionalParams extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Backup; - }; -}; +/** Contains response data for the list operation. */ +export type PoolsListResponse = CapacityPoolList; -/** - * Contains response data for the list operation. - */ -export type BackupPoliciesListResponse = BackupPoliciesList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PoolsGetOptionalParams extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupPoliciesList; - }; -}; +/** Contains response data for the get operation. */ +export type PoolsGetResponse = CapacityPool; -/** - * Contains response data for the get operation. - */ -export type BackupPoliciesGetResponse = BackupPolicy & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PoolsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupPolicy; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type PoolsCreateOrUpdateResponse = CapacityPool; -/** - * Contains response data for the create operation. - */ -export type BackupPoliciesCreateResponse = BackupPolicy & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PoolsUpdateOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupPolicy; - }; -}; +/** Contains response data for the update operation. */ +export type PoolsUpdateResponse = CapacityPool; -/** - * Contains response data for the update operation. - */ -export type BackupPoliciesUpdateResponse = BackupPolicy & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface PoolsDeleteOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupPolicy; - }; -}; +/** Optional parameters. */ +export interface PoolsListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreate operation. - */ -export type BackupPoliciesBeginCreateResponse = BackupPolicy & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type PoolsListNextResponse = CapacityPoolList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupPolicy; - }; -}; +/** Optional parameters. */ +export interface VolumesListOptionalParams + extends coreClient.OperationOptions {} -/** - * 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; +/** Contains response data for the list operation. */ +export type VolumesListResponse = VolumeList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: BackupPolicy; - }; -}; +/** Optional parameters. */ +export interface VolumesGetOptionalParams extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type VaultsListResponse = VaultList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type VolumesGetResponse = Volume; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VaultList; - }; -}; +/** Optional parameters. */ +export interface VolumesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type VolumesCreateOrUpdateResponse = Volume; + +/** Optional parameters. */ +export interface VolumesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type VolumesUpdateResponse = Volume; + +/** Optional parameters. */ +export interface VolumesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VolumesRevertOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VolumesBreakReplicationOptionalParams + extends coreClient.OperationOptions { + /** Optional body to force break the replication. */ + body?: BreakReplicationRequest; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VolumesReplicationStatusOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the replicationStatus operation. */ +export type VolumesReplicationStatusResponse = ReplicationStatus; + +/** Optional parameters. */ +export interface VolumesResyncReplicationOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VolumesDeleteReplicationOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VolumesAuthorizeReplicationOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VolumesReInitializeReplicationOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VolumesPoolChangeOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VolumesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type VolumesListNextResponse = VolumeList; + +/** Optional parameters. */ +export interface SnapshotsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SnapshotsListResponse = SnapshotsList; + +/** Optional parameters. */ +export interface SnapshotsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SnapshotsGetResponse = Snapshot; + +/** Optional parameters. */ +export interface SnapshotsCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type SnapshotsCreateResponse = Snapshot; + +/** Optional parameters. */ +export interface SnapshotsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type SnapshotsUpdateResponse = Snapshot; + +/** Optional parameters. */ +export interface SnapshotsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface SnapshotPoliciesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SnapshotPoliciesListResponse = SnapshotPoliciesList; + +/** Optional parameters. */ +export interface SnapshotPoliciesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SnapshotPoliciesGetResponse = SnapshotPolicy; + +/** Optional parameters. */ +export interface SnapshotPoliciesCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type SnapshotPoliciesCreateResponse = SnapshotPolicy; + +/** Optional parameters. */ +export interface SnapshotPoliciesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type SnapshotPoliciesUpdateResponse = SnapshotPolicy; + +/** Optional parameters. */ +export interface SnapshotPoliciesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface SnapshotPoliciesListVolumesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listVolumes operation. */ +export type SnapshotPoliciesListVolumesResponse = SnapshotPolicyVolumeList; + +/** Optional parameters. */ +export interface BackupsGetStatusOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getStatus operation. */ +export type BackupsGetStatusResponse = BackupStatus; + +/** Optional parameters. */ +export interface BackupsGetVolumeRestoreStatusOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getVolumeRestoreStatus operation. */ +export type BackupsGetVolumeRestoreStatusResponse = RestoreStatus; + +/** Optional parameters. */ +export interface BackupsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type BackupsListResponse = BackupsList; + +/** Optional parameters. */ +export interface BackupsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BackupsGetResponse = Backup; + +/** Optional parameters. */ +export interface BackupsCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type BackupsCreateResponse = Backup; + +/** Optional parameters. */ +export interface BackupsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Backup object supplied in the body of the operation. */ + body?: BackupPatch; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type BackupsUpdateResponse = Backup; + +/** Optional parameters. */ +export interface BackupsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface AccountBackupsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type AccountBackupsListResponse = BackupsList; + +/** Optional parameters. */ +export interface AccountBackupsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AccountBackupsGetResponse = Backup; + +/** Optional parameters. */ +export interface AccountBackupsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface BackupPoliciesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type BackupPoliciesListResponse = BackupPoliciesList; + +/** Optional parameters. */ +export interface BackupPoliciesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BackupPoliciesGetResponse = BackupPolicy; + +/** Optional parameters. */ +export interface BackupPoliciesCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type BackupPoliciesCreateResponse = BackupPolicy; + +/** Optional parameters. */ +export interface BackupPoliciesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type BackupPoliciesUpdateResponse = BackupPolicy; + +/** Optional parameters. */ +export interface BackupPoliciesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VaultsListOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type VaultsListResponse = VaultList; + +/** Optional parameters. */ +export interface VolumeGroupsListByNetAppAccountOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByNetAppAccount operation. */ +export type VolumeGroupsListByNetAppAccountResponse = VolumeGroupList; + +/** Optional parameters. */ +export interface VolumeGroupsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type VolumeGroupsGetResponse = VolumeGroupDetails; + +/** Optional parameters. */ +export interface VolumeGroupsCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type VolumeGroupsCreateResponse = VolumeGroupDetails; + +/** Optional parameters. */ +export interface VolumeGroupsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface NetAppManagementClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/netapp/arm-netapp/src/models/mappers.ts b/sdk/netapp/arm-netapp/src/models/mappers.ts index f5c41af29a2c..f722fc43fd38 100644 --- a/sdk/netapp/arm-netapp/src/models/mappers.ts +++ b/sdk/netapp/arm-netapp/src/models/mappers.ts @@ -6,14 +6,65 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import * as coreClient from "@azure/core-client"; -export const CloudError = CloudErrorMapper; -export const BaseResource = BaseResourceMapper; +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + serviceSpecification: { + serializedName: "properties.serviceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification" + } + } + } + } +}; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", className: "OperationDisplay", @@ -46,30 +97,40 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const Dimension: msRest.CompositeMapper = { - serializedName: "Dimension", +export const ServiceSpecification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Dimension", + className: "ServiceSpecification", modelProperties: { - name: { - serializedName: "name", + metricSpecifications: { + serializedName: "metricSpecifications", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecification" + } + } } }, - displayName: { - serializedName: "displayName", + logSpecifications: { + serializedName: "logSpecifications", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LogSpecification" + } + } } } } } }; -export const MetricSpecification: msRest.CompositeMapper = { - serializedName: "MetricSpecification", +export const MetricSpecification: coreClient.CompositeMapper = { type: { name: "Composite", className: "MetricSpecification", @@ -98,6 +159,52 @@ export const MetricSpecification: msRest.CompositeMapper = { name: "String" } }, + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + supportedTimeGrainTypes: { + serializedName: "supportedTimeGrainTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + internalMetricName: { + serializedName: "internalMetricName", + type: { + name: "String" + } + }, + enableRegionalMdmAccount: { + serializedName: "enableRegionalMdmAccount", + type: { + name: "Boolean" + } + }, + sourceMdmAccount: { + serializedName: "sourceMdmAccount", + type: { + name: "String" + } + }, + sourceMdmNamespace: { + serializedName: "sourceMdmNamespace", + type: { + name: "String" + } + }, dimensions: { serializedName: "dimensions", type: { @@ -133,38 +240,42 @@ export const MetricSpecification: msRest.CompositeMapper = { type: { name: "String" } + }, + isInternal: { + serializedName: "isInternal", + type: { + name: "Boolean" + } } } } }; -export const ServiceSpecification: msRest.CompositeMapper = { - serializedName: "ServiceSpecification", +export const Dimension: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceSpecification", + className: "Dimension", modelProperties: { - metricSpecifications: { - serializedName: "metricSpecifications", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricSpecification" - } - } + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" } } } } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const LogSpecification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "LogSpecification", modelProperties: { name: { serializedName: "name", @@ -172,50 +283,38 @@ export const Operation: msRest.CompositeMapper = { name: "String" } }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay" - } - }, - origin: { - serializedName: "origin", + displayName: { + serializedName: "displayName", type: { name: "String" } - }, - serviceSpecification: { - serializedName: "properties.serviceSpecification", - type: { - name: "Composite", - className: "ServiceSpecification" - } } } } }; -export const CheckAvailabilityResponse: msRest.CompositeMapper = { - serializedName: "CheckAvailabilityResponse", +export const ResourceNameAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckAvailabilityResponse", + className: "ResourceNameAvailabilityRequest", modelProperties: { - isAvailable: { - serializedName: "isAvailable", + name: { + serializedName: "name", + required: true, type: { - name: "Boolean" + name: "String" } }, - reason: { - serializedName: "reason", + type: { + serializedName: "type", + required: true, type: { name: "String" } }, - message: { - serializedName: "message", + resourceGroup: { + serializedName: "resourceGroup", + required: true, type: { name: "String" } @@ -224,29 +323,25 @@ export const CheckAvailabilityResponse: msRest.CompositeMapper = { } }; -export const ResourceNameAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "ResourceNameAvailabilityRequest", +export const CheckAvailabilityResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceNameAvailabilityRequest", + className: "CheckAvailabilityResponse", modelProperties: { - name: { - required: true, - serializedName: "name", + isAvailable: { + serializedName: "isAvailable", type: { - name: "String" + name: "Boolean" } }, - type: { - required: true, - serializedName: "type", + reason: { + serializedName: "reason", type: { name: "String" } }, - resourceGroup: { - required: true, - serializedName: "resourceGroup", + message: { + serializedName: "message", type: { name: "String" } @@ -255,22 +350,21 @@ export const ResourceNameAvailabilityRequest: msRest.CompositeMapper = { } }; -export const FilePathAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "FilePathAvailabilityRequest", +export const FilePathAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", className: "FilePathAvailabilityRequest", modelProperties: { name: { - required: true, serializedName: "name", + required: true, type: { name: "String" } }, subnetId: { - required: true, serializedName: "subnetId", + required: true, type: { name: "String" } @@ -279,29 +373,28 @@ export const FilePathAvailabilityRequest: msRest.CompositeMapper = { } }; -export const QuotaAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "QuotaAvailabilityRequest", +export const QuotaAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", className: "QuotaAvailabilityRequest", modelProperties: { name: { - required: true, serializedName: "name", + required: true, type: { name: "String" } }, type: { - required: true, serializedName: "type", + required: true, type: { name: "String" } }, resourceGroup: { - required: true, serializedName: "resourceGroup", + required: true, type: { name: "String" } @@ -310,58 +403,266 @@ export const QuotaAvailabilityRequest: msRest.CompositeMapper = { } }; -export const ActiveDirectory: msRest.CompositeMapper = { - serializedName: "activeDirectory", +export const SubscriptionQuotaItemList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ActiveDirectory", + className: "SubscriptionQuotaItemList", modelProperties: { - activeDirectoryId: { - nullable: true, - serializedName: "activeDirectoryId", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubscriptionQuotaItem" + } + } } - }, - username: { - serializedName: "username", + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - password: { - serializedName: "password", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - domain: { - serializedName: "domain", + createdAt: { + serializedName: "createdAt", type: { - name: "String" + name: "DateTime" } }, - dns: { - serializedName: "dns", - constraints: { - Pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)((, ?)(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))*$/ - }, + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - status: { - readOnly: true, - serializedName: "status", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } }, - statusDetails: { - readOnly: true, - serializedName: "statusDetails", + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { - name: "String" + name: "DateTime" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetAppAccountList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetAppAccountList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetAppAccount" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const NetAppAccount: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetAppAccount", + modelProperties: { + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + activeDirectories: { + serializedName: "properties.activeDirectories", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ActiveDirectory" + } + } + } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "AccountEncryption" + } + } + } + } +}; + +export const ActiveDirectory: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ActiveDirectory", + modelProperties: { + activeDirectoryId: { + serializedName: "activeDirectoryId", + nullable: true, + type: { + name: "String" + } + }, + username: { + serializedName: "username", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + }, + domain: { + serializedName: "domain", + type: { + name: "String" + } + }, + dns: { + constraints: { + Pattern: new RegExp( + "^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)((, ?)(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))*$" + ) + }, + serializedName: "dns", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, + statusDetails: { + serializedName: "statusDetails", + readOnly: true, + type: { + name: "String" } }, smbServerName: { @@ -371,8 +672,8 @@ export const ActiveDirectory: msRest.CompositeMapper = { } }, organizationalUnit: { + defaultValue: "CN=Computers", serializedName: "organizationalUnit", - defaultValue: 'CN=Computers', type: { name: "String" } @@ -388,6 +689,10 @@ export const ActiveDirectory: msRest.CompositeMapper = { type: { name: "Sequence", element: { + constraints: { + MaxLength: 255, + MinLength: 1 + }, type: { name: "String" } @@ -399,6 +704,10 @@ export const ActiveDirectory: msRest.CompositeMapper = { type: { name: "Sequence", element: { + constraints: { + MaxLength: 255, + MinLength: 1 + }, type: { name: "String" } @@ -406,30 +715,32 @@ export const ActiveDirectory: msRest.CompositeMapper = { } }, kdcIP: { - serializedName: "kdcIP", constraints: { - Pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)((, ?)(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))*$/ + Pattern: new RegExp( + "^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)((, ?)(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))*$" + ) }, + serializedName: "kdcIP", type: { name: "String" } }, adName: { - serializedName: "adName", constraints: { MaxLength: 64, MinLength: 1 }, + serializedName: "adName", type: { name: "String" } }, serverRootCACertificate: { - serializedName: "serverRootCACertificate", constraints: { MaxLength: 10240, MinLength: 1 }, + serializedName: "serverRootCACertificate", type: { name: "String" } @@ -451,6 +762,10 @@ export const ActiveDirectory: msRest.CompositeMapper = { type: { name: "Sequence", element: { + constraints: { + MaxLength: 255, + MinLength: 1 + }, type: { name: "String" } @@ -468,13 +783,18 @@ export const ActiveDirectory: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + encryptDCConnections: { + serializedName: "encryptDCConnections", + type: { + name: "Boolean" + } } } } }; -export const AccountEncryption: msRest.CompositeMapper = { - serializedName: "accountEncryption", +export const AccountEncryption: coreClient.CompositeMapper = { type: { name: "Composite", className: "AccountEncryption", @@ -489,82 +809,34 @@ export const AccountEncryption: msRest.CompositeMapper = { } }; -export const SystemData: msRest.CompositeMapper = { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String" - } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String" - } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } - } - } - } -}; - -export const NetAppAccount: msRest.CompositeMapper = { - serializedName: "netAppAccount", +export const NetAppAccountPatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetAppAccount", + className: "NetAppAccountPatch", modelProperties: { location: { - required: true, serializedName: "location", type: { name: "String" } }, id: { - readOnly: true, serializedName: "id", + readOnly: true, type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", + readOnly: true, type: { name: "String" } @@ -573,16 +845,12 @@ export const NetAppAccount: msRest.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { - type: { - name: "String" - } - } + value: { type: { name: "String" } } } }, provisioningState: { - readOnly: true, serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -605,123 +873,111 @@ export const NetAppAccount: msRest.CompositeMapper = { name: "Composite", className: "AccountEncryption" } - }, - systemData: { - readOnly: true, - serializedName: "systemData", + } + } + } +}; + +export const CloudError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudError", + modelProperties: { + error: { + serializedName: "error", type: { name: "Composite", - className: "SystemData" + className: "CloudErrorBody" } } } } }; -export const NetAppAccountPatch: msRest.CompositeMapper = { - serializedName: "netAppAccountPatch", +export const CloudErrorBody: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetAppAccountPatch", + className: "CloudErrorBody", modelProperties: { - location: { - serializedName: "location", - type: { - name: "String" - } - }, - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", + code: { + serializedName: "code", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + message: { + serializedName: "message", type: { name: "String" } - }, - activeDirectories: { - serializedName: "properties.activeDirectories", + } + } + } +}; + +export const CapacityPoolList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CapacityPoolList", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ActiveDirectory" + className: "CapacityPool" } } } }, - encryption: { - serializedName: "properties.encryption", + nextLink: { + serializedName: "nextLink", type: { - name: "Composite", - className: "AccountEncryption" + name: "String" } } } } }; -export const CapacityPool: msRest.CompositeMapper = { - serializedName: "capacityPool", +export const CapacityPool: coreClient.CompositeMapper = { type: { name: "Composite", className: "CapacityPool", modelProperties: { location: { - required: true, serializedName: "location", + required: true, type: { name: "String" } }, id: { - readOnly: true, serializedName: "id", + readOnly: true, type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, - type: { + etag: { + serializedName: "etag", readOnly: true, + type: { + name: "String" + } + }, + type: { serializedName: "type", + readOnly: true, type: { name: "String" } @@ -730,85 +986,89 @@ export const CapacityPool: msRest.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { - type: { - name: "String" - } - } + value: { type: { name: "String" } } } }, poolId: { - readOnly: true, - serializedName: "properties.poolId", constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ + MinLength: 36 }, + serializedName: "properties.poolId", + readOnly: true, type: { name: "String" } }, size: { - required: true, - serializedName: "properties.size", constraints: { InclusiveMaximum: 549755813888000, InclusiveMinimum: 4398046511104 }, + serializedName: "properties.size", + required: true, type: { name: "Number" } }, serviceLevel: { - required: true, + defaultValue: "Premium", serializedName: "properties.serviceLevel", - defaultValue: 'Premium', + required: true, type: { name: "String" } }, provisioningState: { - readOnly: true, serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, totalThroughputMibps: { - readOnly: true, serializedName: "properties.totalThroughputMibps", + readOnly: true, type: { name: "Number" } }, utilizedThroughputMibps: { - readOnly: true, serializedName: "properties.utilizedThroughputMibps", + readOnly: true, type: { name: "Number" } }, qosType: { serializedName: "properties.qosType", - defaultValue: 'Auto', type: { name: "String" } }, coolAccess: { - serializedName: "properties.coolAccess", defaultValue: false, + serializedName: "properties.coolAccess", type: { name: "Boolean" } + }, + encryptionType: { + defaultValue: "Single", + serializedName: "properties.encryptionType", + nullable: true, + type: { + name: "String" + } } } } }; -export const CapacityPoolPatch: msRest.CompositeMapper = { - serializedName: "capacityPoolPatch", +export const CapacityPoolPatch: coreClient.CompositeMapper = { type: { name: "Composite", className: "CapacityPoolPatch", @@ -820,22 +1080,22 @@ export const CapacityPoolPatch: msRest.CompositeMapper = { } }, id: { - readOnly: true, serializedName: "id", + readOnly: true, type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", + readOnly: true, type: { name: "String" } @@ -844,27 +1104,22 @@ export const CapacityPoolPatch: msRest.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { - type: { - name: "String" - } - } + value: { type: { name: "String" } } } }, size: { - serializedName: "properties.size", defaultValue: 4398046511104, constraints: { InclusiveMaximum: 549755813888000, InclusiveMinimum: 4398046511104 }, + serializedName: "properties.size", type: { name: "Number" } }, qosType: { serializedName: "properties.qosType", - defaultValue: 'Auto', type: { name: "String" } @@ -873,601 +1128,540 @@ export const CapacityPoolPatch: msRest.CompositeMapper = { } }; -export const ExportPolicyRule: msRest.CompositeMapper = { - serializedName: "exportPolicyRule", +export const VolumeList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExportPolicyRule", + className: "VolumeList", modelProperties: { - ruleIndex: { - serializedName: "ruleIndex", + value: { + serializedName: "value", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume" + } + } } }, - unixReadOnly: { - serializedName: "unixReadOnly", + nextLink: { + serializedName: "nextLink", type: { - name: "Boolean" + name: "String" } - }, - unixReadWrite: { - serializedName: "unixReadWrite", + } + } + } +}; + +export const Volume: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Volume", + modelProperties: { + location: { + serializedName: "location", + required: true, type: { - name: "Boolean" + name: "String" } }, - kerberos5ReadOnly: { - serializedName: "kerberos5ReadOnly", - defaultValue: false, + id: { + serializedName: "id", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - kerberos5ReadWrite: { - serializedName: "kerberos5ReadWrite", - defaultValue: false, + name: { + serializedName: "name", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - kerberos5iReadOnly: { - serializedName: "kerberos5iReadOnly", - defaultValue: false, + etag: { + serializedName: "etag", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - kerberos5iReadWrite: { - serializedName: "kerberos5iReadWrite", - defaultValue: false, + type: { + serializedName: "type", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - kerberos5pReadOnly: { - serializedName: "kerberos5pReadOnly", - defaultValue: false, + tags: { + serializedName: "tags", type: { - name: "Boolean" + name: "Dictionary", + value: { type: { name: "String" } } } }, - kerberos5pReadWrite: { - serializedName: "kerberos5pReadWrite", - defaultValue: false, + fileSystemId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "properties.fileSystemId", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - cifs: { - serializedName: "cifs", + creationToken: { + constraints: { + Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9\\-]{0,79}$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "properties.creationToken", + required: true, type: { - name: "Boolean" + name: "String" } }, - nfsv3: { - serializedName: "nfsv3", + serviceLevel: { + defaultValue: "Premium", + serializedName: "properties.serviceLevel", type: { - name: "Boolean" + name: "String" } }, - nfsv41: { - serializedName: "nfsv41", + usageThreshold: { + defaultValue: 107374182400, + constraints: { + InclusiveMaximum: 109951162777600, + InclusiveMinimum: 107374182400 + }, + serializedName: "properties.usageThreshold", + required: true, type: { - name: "Boolean" + name: "Number" } }, - allowedClients: { - serializedName: "allowedClients", + exportPolicy: { + serializedName: "properties.exportPolicy", type: { - name: "String" + name: "Composite", + className: "VolumePropertiesExportPolicy" } }, - hasRootAccess: { - serializedName: "hasRootAccess", - defaultValue: true, - type: { - name: "Boolean" - } - }, - chownMode: { - serializedName: "chownMode", - defaultValue: 'Restricted', - type: { - name: "String" - } - } - } - } -}; - -export const VolumePropertiesExportPolicy: msRest.CompositeMapper = { - serializedName: "volumeProperties_exportPolicy", - type: { - name: "Composite", - className: "VolumePropertiesExportPolicy", - modelProperties: { - rules: { - serializedName: "rules", + protocolTypes: { + serializedName: "properties.protocolTypes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ExportPolicyRule" + name: "String" } } } - } - } - } -}; - -export const MountTargetProperties: msRest.CompositeMapper = { - serializedName: "mountTargetProperties", - type: { - name: "Composite", - className: "MountTargetProperties", - modelProperties: { - mountTargetId: { + }, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "mountTargetId", + type: { + name: "String" + } + }, + snapshotId: { constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\\\?([^\\/]*[\\/])*)([^\\/]+)$" + ), MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ + MinLength: 36 }, + serializedName: "properties.snapshotId", + nullable: true, type: { name: "String" } }, - fileSystemId: { - required: true, - serializedName: "fileSystemId", + backupId: { constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\\\?([^\\/]*[\\/])*)([^\\/]+)$" + ), MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ + MinLength: 36 }, + serializedName: "properties.backupId", + nullable: true, type: { name: "String" } }, - ipAddress: { + baremetalTenantId: { + serializedName: "properties.baremetalTenantId", readOnly: true, - serializedName: "ipAddress", type: { name: "String" } }, - smbServerFqdn: { - serializedName: "smbServerFqdn", + subnetId: { + serializedName: "properties.subnetId", + required: true, type: { name: "String" } - } - } - } -}; - -export const VolumeBackupProperties: msRest.CompositeMapper = { - serializedName: "volumeBackupProperties", - type: { - name: "Composite", - className: "VolumeBackupProperties", - modelProperties: { - backupPolicyId: { - serializedName: "backupPolicyId", + }, + networkFeatures: { + defaultValue: "Basic", + serializedName: "properties.networkFeatures", type: { name: "String" } }, - policyEnforced: { - serializedName: "policyEnforced", + networkSiblingSetId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "properties.networkSiblingSetId", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - vaultId: { - serializedName: "vaultId", + storageToNetworkProximity: { + serializedName: "properties.storageToNetworkProximity", + readOnly: true, type: { name: "String" } }, - backupEnabled: { - serializedName: "backupEnabled", + mountTargets: { + serializedName: "properties.mountTargets", + readOnly: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MountTargetProperties" + } + } } - } - } - } -}; - -export const ReplicationObject: msRest.CompositeMapper = { - serializedName: "replicationObject", - type: { - name: "Composite", - className: "ReplicationObject", - modelProperties: { - replicationId: { - serializedName: "replicationId", + }, + volumeType: { + serializedName: "properties.volumeType", type: { name: "String" } }, - endpointType: { - serializedName: "endpointType", + dataProtection: { + serializedName: "properties.dataProtection", type: { - name: "String" + name: "Composite", + className: "VolumePropertiesDataProtection" } }, - replicationSchedule: { - required: true, - serializedName: "replicationSchedule", + isRestoring: { + serializedName: "properties.isRestoring", type: { - name: "String" + name: "Boolean" } }, - remoteVolumeResourceId: { - required: true, - serializedName: "remoteVolumeResourceId", + snapshotDirectoryVisible: { + defaultValue: true, + serializedName: "properties.snapshotDirectoryVisible", type: { - name: "String" + name: "Boolean" } }, - remoteVolumeRegion: { - serializedName: "remoteVolumeRegion", + kerberosEnabled: { + defaultValue: false, + serializedName: "properties.kerberosEnabled", type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const VolumeSnapshotProperties: msRest.CompositeMapper = { - serializedName: "volumeSnapshotProperties", - type: { - name: "Composite", - className: "VolumeSnapshotProperties", - modelProperties: { - snapshotPolicyId: { - serializedName: "snapshotPolicyId", + }, + securityStyle: { + defaultValue: "unix", + serializedName: "properties.securityStyle", type: { name: "String" } - } - } - } -}; - -export const VolumePropertiesDataProtection: msRest.CompositeMapper = { - serializedName: "volumeProperties_dataProtection", - type: { - name: "Composite", - className: "VolumePropertiesDataProtection", - modelProperties: { - backup: { - serializedName: "backup", - type: { - name: "Composite", - className: "VolumeBackupProperties" - } }, - replication: { - serializedName: "replication", + smbEncryption: { + defaultValue: false, + serializedName: "properties.smbEncryption", type: { - name: "Composite", - className: "ReplicationObject" + name: "Boolean" } }, - snapshot: { - serializedName: "snapshot", - type: { - name: "Composite", - className: "VolumeSnapshotProperties" - } - } - } - } -}; - -export const Volume: msRest.CompositeMapper = { - serializedName: "volume", - type: { - name: "Composite", - className: "Volume", - modelProperties: { - location: { - required: true, - serializedName: "location", + smbContinuouslyAvailable: { + defaultValue: false, + serializedName: "properties.smbContinuouslyAvailable", type: { - name: "String" + name: "Boolean" } }, - id: { - readOnly: true, - serializedName: "id", + throughputMibps: { + defaultValue: 0, + serializedName: "properties.throughputMibps", type: { - name: "String" + name: "Number" } }, - name: { - readOnly: true, - serializedName: "name", + encryptionKeySource: { + serializedName: "properties.encryptionKeySource", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + ldapEnabled: { + defaultValue: false, + serializedName: "properties.ldapEnabled", type: { - name: "String" + name: "Boolean" } }, - tags: { - serializedName: "tags", + coolAccess: { + defaultValue: false, + serializedName: "properties.coolAccess", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Boolean" } }, - fileSystemId: { - readOnly: true, - serializedName: "properties.fileSystemId", + coolnessPeriod: { constraints: { - MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ + InclusiveMaximum: 63, + InclusiveMinimum: 7 }, + serializedName: "properties.coolnessPeriod", type: { - name: "String" + name: "Number" } }, - creationToken: { - required: true, - serializedName: "properties.creationToken", + unixPermissions: { + defaultValue: "0770", constraints: { - MaxLength: 80, - MinLength: 1, - Pattern: /^[a-zA-Z][a-zA-Z0-9\-]{0,79}$/ + MaxLength: 4, + MinLength: 4 }, + serializedName: "properties.unixPermissions", + nullable: true, type: { name: "String" } }, - serviceLevel: { - serializedName: "properties.serviceLevel", - defaultValue: 'Premium', + cloneProgress: { + serializedName: "properties.cloneProgress", + readOnly: true, + nullable: true, + type: { + name: "Number" + } + }, + avsDataStore: { + defaultValue: "Disabled", + serializedName: "properties.avsDataStore", type: { name: "String" } }, - usageThreshold: { - required: true, - serializedName: "properties.usageThreshold", - defaultValue: 107374182400, - constraints: { - InclusiveMaximum: 109951162777600, - InclusiveMinimum: 107374182400 - }, + isDefaultQuotaEnabled: { + defaultValue: false, + serializedName: "properties.isDefaultQuotaEnabled", type: { - name: "Number" + name: "Boolean" } }, - exportPolicy: { - serializedName: "properties.exportPolicy", + defaultUserQuotaInKiBs: { + defaultValue: 0, + serializedName: "properties.defaultUserQuotaInKiBs", type: { - name: "Composite", - className: "VolumePropertiesExportPolicy" + name: "Number" } }, - protocolTypes: { - serializedName: "properties.protocolTypes", + defaultGroupQuotaInKiBs: { + defaultValue: 0, + serializedName: "properties.defaultGroupQuotaInKiBs", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } }, - provisioningState: { + volumeGroupName: { + serializedName: "properties.volumeGroupName", readOnly: true, - serializedName: "properties.provisioningState", type: { name: "String" } }, - snapshotId: { - nullable: true, - serializedName: "properties.snapshotId", - constraints: { - MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$/ - }, + capacityPoolResourceId: { + serializedName: "properties.capacityPoolResourceId", type: { name: "String" } }, - backupId: { - serializedName: "properties.backupId", - constraints: { - MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$/ - }, + proximityPlacementGroup: { + serializedName: "properties.proximityPlacementGroup", type: { name: "String" } }, - baremetalTenantId: { + t2Network: { + serializedName: "properties.t2Network", readOnly: true, - serializedName: "properties.baremetalTenantId", type: { name: "String" } }, - subnetId: { - required: true, - serializedName: "properties.subnetId", + volumeSpecName: { + serializedName: "properties.volumeSpecName", type: { name: "String" } }, - mountTargets: { - readOnly: true, - serializedName: "properties.mountTargets", + placementRules: { + serializedName: "properties.placementRules", type: { name: "Sequence", element: { type: { name: "Composite", - className: "MountTargetProperties" + className: "PlacementKeyValuePairs" } } } - }, - volumeType: { - serializedName: "properties.volumeType", + } + } + } +}; + +export const VolumePropertiesExportPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumePropertiesExportPolicy", + modelProperties: { + rules: { + serializedName: "rules", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExportPolicyRule" + } + } } - }, - dataProtection: { - serializedName: "properties.dataProtection", + } + } + } +}; + +export const ExportPolicyRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExportPolicyRule", + modelProperties: { + ruleIndex: { + serializedName: "ruleIndex", type: { - name: "Composite", - className: "VolumePropertiesDataProtection" + name: "Number" } }, - isRestoring: { - serializedName: "properties.isRestoring", + unixReadOnly: { + serializedName: "unixReadOnly", type: { name: "Boolean" } }, - snapshotDirectoryVisible: { - serializedName: "properties.snapshotDirectoryVisible", - defaultValue: true, + unixReadWrite: { + serializedName: "unixReadWrite", type: { name: "Boolean" } }, - kerberosEnabled: { - serializedName: "properties.kerberosEnabled", + kerberos5ReadOnly: { defaultValue: false, + serializedName: "kerberos5ReadOnly", type: { name: "Boolean" } }, - securityStyle: { - serializedName: "properties.securityStyle", - defaultValue: 'unix', - type: { - name: "String" - } - }, - smbEncryption: { - serializedName: "properties.smbEncryption", + kerberos5ReadWrite: { defaultValue: false, + serializedName: "kerberos5ReadWrite", type: { name: "Boolean" } }, - smbContinuouslyAvailable: { - serializedName: "properties.smbContinuouslyAvailable", + kerberos5IReadOnly: { defaultValue: false, + serializedName: "kerberos5iReadOnly", type: { name: "Boolean" } }, - throughputMibps: { - serializedName: "properties.throughputMibps", - defaultValue: 0, - constraints: { - InclusiveMaximum: 4500, - InclusiveMinimum: 0 - }, + kerberos5IReadWrite: { + defaultValue: false, + serializedName: "kerberos5iReadWrite", type: { - name: "Number" + name: "Boolean" } }, - encryptionKeySource: { - serializedName: "properties.encryptionKeySource", + kerberos5PReadOnly: { + defaultValue: false, + serializedName: "kerberos5pReadOnly", type: { - name: "String" + name: "Boolean" } }, - ldapEnabled: { - serializedName: "properties.ldapEnabled", + kerberos5PReadWrite: { defaultValue: false, + serializedName: "kerberos5pReadWrite", type: { name: "Boolean" } }, - coolAccess: { - serializedName: "properties.coolAccess", - defaultValue: false, + cifs: { + serializedName: "cifs", type: { name: "Boolean" } }, - coolnessPeriod: { - serializedName: "properties.coolnessPeriod", - constraints: { - InclusiveMaximum: 63, - InclusiveMinimum: 7 - }, + nfsv3: { + serializedName: "nfsv3", type: { - name: "Number" + name: "Boolean" } }, - unixPermissions: { - nullable: true, - serializedName: "properties.unixPermissions", - constraints: { - MaxLength: 4, - MinLength: 4 - }, + nfsv41: { + serializedName: "nfsv41", type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const ResourceIdentity: msRest.CompositeMapper = { - serializedName: "resourceIdentity", - type: { - name: "Composite", - className: "ResourceIdentity", - modelProperties: { - principalId: { - readOnly: true, - serializedName: "principalId", + }, + allowedClients: { + serializedName: "allowedClients", type: { name: "String" } }, - tenantId: { - readOnly: true, - serializedName: "tenantId", + hasRootAccess: { + defaultValue: true, + serializedName: "hasRootAccess", type: { - name: "String" + name: "Boolean" } }, - type: { - serializedName: "type", + chownMode: { + defaultValue: "Restricted", + serializedName: "chownMode", type: { name: "String" } @@ -1476,38 +1670,48 @@ export const ResourceIdentity: msRest.CompositeMapper = { } }; -export const ReplicationStatus: msRest.CompositeMapper = { - serializedName: "replicationStatus", +export const MountTargetProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicationStatus", + className: "MountTargetProperties", modelProperties: { - healthy: { - serializedName: "healthy", - type: { - name: "Boolean" - } - }, - relationshipStatus: { - serializedName: "relationshipStatus", + mountTargetId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "mountTargetId", + readOnly: true, type: { name: "String" } }, - mirrorState: { - serializedName: "mirrorState", + fileSystemId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "fileSystemId", + required: true, type: { name: "String" } }, - totalProgress: { - serializedName: "totalProgress", + ipAddress: { + serializedName: "ipAddress", + readOnly: true, type: { name: "String" } }, - errorMessage: { - serializedName: "errorMessage", + smbServerFqdn: { + serializedName: "smbServerFqdn", type: { name: "String" } @@ -1516,33 +1720,10 @@ export const ReplicationStatus: msRest.CompositeMapper = { } }; -export const VolumePatchPropertiesExportPolicy: msRest.CompositeMapper = { - serializedName: "volumePatchProperties_exportPolicy", - type: { - name: "Composite", - className: "VolumePatchPropertiesExportPolicy", - modelProperties: { - rules: { - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExportPolicyRule" - } - } - } - } - } - } -}; - -export const VolumePatchPropertiesDataProtection: msRest.CompositeMapper = { - serializedName: "volumePatchProperties_dataProtection", +export const VolumePropertiesDataProtection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VolumePatchPropertiesDataProtection", + className: "VolumePropertiesDataProtection", modelProperties: { backup: { serializedName: "backup", @@ -1551,6 +1732,13 @@ export const VolumePatchPropertiesDataProtection: msRest.CompositeMapper = { className: "VolumeBackupProperties" } }, + replication: { + serializedName: "replication", + type: { + name: "Composite", + className: "ReplicationObject" + } + }, snapshot: { serializedName: "snapshot", type: { @@ -1562,126 +1750,145 @@ export const VolumePatchPropertiesDataProtection: msRest.CompositeMapper = { } }; -export const VolumePatch: msRest.CompositeMapper = { - serializedName: "volumePatch", +export const VolumeBackupProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VolumePatch", + className: "VolumeBackupProperties", modelProperties: { - location: { - serializedName: "location", + backupPolicyId: { + serializedName: "backupPolicyId", type: { name: "String" } }, - id: { - readOnly: true, - serializedName: "id", + policyEnforced: { + serializedName: "policyEnforced", type: { - name: "String" + name: "Boolean" } }, - name: { - readOnly: true, - serializedName: "name", + vaultId: { + serializedName: "vaultId", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + backupEnabled: { + serializedName: "backupEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ReplicationObject: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationObject", + modelProperties: { + replicationId: { + serializedName: "replicationId", type: { name: "String" } }, - tags: { - serializedName: "tags", + endpointType: { + serializedName: "endpointType", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } }, - serviceLevel: { - serializedName: "properties.serviceLevel", - defaultValue: 'Premium', + replicationSchedule: { + serializedName: "replicationSchedule", type: { name: "String" } }, - usageThreshold: { - serializedName: "properties.usageThreshold", - defaultValue: 107374182400, - constraints: { - InclusiveMaximum: 109951162777600, - InclusiveMinimum: 107374182400 - }, + remoteVolumeResourceId: { + serializedName: "remoteVolumeResourceId", + required: true, type: { - name: "Number" + name: "String" } }, - exportPolicy: { - serializedName: "properties.exportPolicy", + remoteVolumeRegion: { + serializedName: "remoteVolumeRegion", type: { - name: "Composite", - className: "VolumePatchPropertiesExportPolicy" + name: "String" } - }, - throughputMibps: { - serializedName: "properties.throughputMibps", - constraints: { - InclusiveMaximum: 4500, - InclusiveMinimum: 1 - }, + } + } + } +}; + +export const VolumeSnapshotProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeSnapshotProperties", + modelProperties: { + snapshotPolicyId: { + serializedName: "snapshotPolicyId", type: { - name: "Number" + name: "String" + } + } + } + } +}; + +export const PlacementKeyValuePairs: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PlacementKeyValuePairs", + modelProperties: { + key: { + serializedName: "key", + required: true, + type: { + name: "String" } }, - dataProtection: { - serializedName: "properties.dataProtection", + value: { + serializedName: "value", + required: true, type: { - name: "Composite", - className: "VolumePatchPropertiesDataProtection" + name: "String" } } } } }; -export const MountTarget: msRest.CompositeMapper = { - serializedName: "mountTarget", +export const VolumePatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MountTarget", + className: "VolumePatch", modelProperties: { location: { - required: true, serializedName: "location", type: { name: "String" } }, id: { - readOnly: true, serializedName: "id", + readOnly: true, type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", + readOnly: true, type: { name: "String" } @@ -1690,342 +1897,295 @@ export const MountTarget: msRest.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { - type: { - name: "String" - } - } + value: { type: { name: "String" } } } }, - mountTargetId: { - readOnly: true, - serializedName: "properties.mountTargetId", - constraints: { - MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ - }, + serviceLevel: { + defaultValue: "Premium", + serializedName: "properties.serviceLevel", type: { name: "String" } }, - fileSystemId: { - required: true, - serializedName: "properties.fileSystemId", + usageThreshold: { + defaultValue: 107374182400, constraints: { - MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ + InclusiveMaximum: 109951162777600, + InclusiveMinimum: 107374182400 }, + serializedName: "properties.usageThreshold", type: { - name: "String" - } - }, - ipAddress: { - readOnly: true, - serializedName: "properties.ipAddress", - type: { - name: "String" - } - }, - smbServerFqdn: { - serializedName: "properties.smbServerFqdn", - type: { - name: "String" - } - } - } - } -}; - -export const Snapshot: msRest.CompositeMapper = { - serializedName: "snapshot", - type: { - name: "Composite", - className: "Snapshot", - modelProperties: { - location: { - required: true, - serializedName: "location", - type: { - name: "String" + name: "Number" } }, - id: { - readOnly: true, - serializedName: "id", + exportPolicy: { + serializedName: "properties.exportPolicy", type: { - name: "String" + name: "Composite", + className: "VolumePatchPropertiesExportPolicy" } }, - name: { - readOnly: true, - serializedName: "name", + throughputMibps: { + defaultValue: 0, + serializedName: "properties.throughputMibps", type: { - name: "String" + name: "Number" } }, - type: { - readOnly: true, - serializedName: "type", + dataProtection: { + serializedName: "properties.dataProtection", type: { - name: "String" + name: "Composite", + className: "VolumePatchPropertiesDataProtection" } }, - snapshotId: { - readOnly: true, - serializedName: "properties.snapshotId", - constraints: { - MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ - }, + isDefaultQuotaEnabled: { + defaultValue: false, + serializedName: "properties.isDefaultQuotaEnabled", type: { - name: "String" + name: "Boolean" } }, - created: { - readOnly: true, - serializedName: "properties.created", + defaultUserQuotaInKiBs: { + defaultValue: 0, + serializedName: "properties.defaultUserQuotaInKiBs", type: { - name: "DateTime" + name: "Number" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + defaultGroupQuotaInKiBs: { + defaultValue: 0, + serializedName: "properties.defaultGroupQuotaInKiBs", type: { - name: "String" + name: "Number" } } } } }; -export const HourlySchedule: msRest.CompositeMapper = { - serializedName: "hourlySchedule", +export const VolumePatchPropertiesExportPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HourlySchedule", + className: "VolumePatchPropertiesExportPolicy", modelProperties: { - snapshotsToKeep: { - serializedName: "snapshotsToKeep", - type: { - name: "Number" - } - }, - minute: { - serializedName: "minute", - type: { - name: "Number" - } - }, - usedBytes: { - serializedName: "usedBytes", + rules: { + serializedName: "rules", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExportPolicyRule" + } + } } } } } }; -export const DailySchedule: msRest.CompositeMapper = { - serializedName: "dailySchedule", +export const VolumePatchPropertiesDataProtection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DailySchedule", + className: "VolumePatchPropertiesDataProtection", modelProperties: { - snapshotsToKeep: { - serializedName: "snapshotsToKeep", - type: { - name: "Number" - } - }, - hour: { - serializedName: "hour", - type: { - name: "Number" - } - }, - minute: { - serializedName: "minute", + backup: { + serializedName: "backup", type: { - name: "Number" + name: "Composite", + className: "VolumeBackupProperties" } }, - usedBytes: { - serializedName: "usedBytes", + snapshot: { + serializedName: "snapshot", type: { - name: "Number" + name: "Composite", + className: "VolumeSnapshotProperties" } } } } }; -export const WeeklySchedule: msRest.CompositeMapper = { - serializedName: "weeklySchedule", +export const VolumeRevert: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WeeklySchedule", + className: "VolumeRevert", modelProperties: { - snapshotsToKeep: { - serializedName: "snapshotsToKeep", + snapshotId: { + serializedName: "snapshotId", type: { - name: "Number" + name: "String" + } + } + } + } +}; + +export const BreakReplicationRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BreakReplicationRequest", + modelProperties: { + forceBreakReplication: { + serializedName: "forceBreakReplication", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ReplicationStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationStatus", + modelProperties: { + healthy: { + serializedName: "healthy", + type: { + name: "Boolean" } }, - day: { - serializedName: "day", + relationshipStatus: { + serializedName: "relationshipStatus", type: { name: "String" } }, - hour: { - serializedName: "hour", + mirrorState: { + serializedName: "mirrorState", type: { - name: "Number" + name: "String" } }, - minute: { - serializedName: "minute", + totalProgress: { + serializedName: "totalProgress", type: { - name: "Number" + name: "String" } }, - usedBytes: { - serializedName: "usedBytes", + errorMessage: { + serializedName: "errorMessage", type: { - name: "Number" + name: "String" } } } } }; -export const MonthlySchedule: msRest.CompositeMapper = { - serializedName: "monthlySchedule", +export const AuthorizeRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MonthlySchedule", + className: "AuthorizeRequest", modelProperties: { - snapshotsToKeep: { - serializedName: "snapshotsToKeep", - type: { - name: "Number" - } - }, - daysOfMonth: { - serializedName: "daysOfMonth", + remoteVolumeResourceId: { + serializedName: "remoteVolumeResourceId", type: { name: "String" } - }, - hour: { - serializedName: "hour", - type: { - name: "Number" - } - }, - minute: { - serializedName: "minute", + } + } + } +}; + +export const PoolChangeRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PoolChangeRequest", + modelProperties: { + newPoolResourceId: { + serializedName: "newPoolResourceId", + required: true, type: { - name: "Number" + name: "String" } - }, - usedBytes: { - serializedName: "usedBytes", + } + } + } +}; + +export const SnapshotsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SnapshotsList", + modelProperties: { + value: { + serializedName: "value", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Snapshot" + } + } } } } } }; -export const SnapshotPolicy: msRest.CompositeMapper = { - serializedName: "snapshotPolicy", +export const Snapshot: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SnapshotPolicy", + className: "Snapshot", modelProperties: { location: { - required: true, serializedName: "location", + required: true, type: { name: "String" } }, id: { - readOnly: true, serializedName: "id", + readOnly: true, type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", + readOnly: true, type: { name: "String" } }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - hourlySchedule: { - serializedName: "properties.hourlySchedule", - type: { - name: "Composite", - className: "HourlySchedule" - } - }, - dailySchedule: { - serializedName: "properties.dailySchedule", - type: { - name: "Composite", - className: "DailySchedule" - } - }, - weeklySchedule: { - serializedName: "properties.weeklySchedule", - type: { - name: "Composite", - className: "WeeklySchedule" - } - }, - monthlySchedule: { - serializedName: "properties.monthlySchedule", + snapshotId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "properties.snapshotId", + readOnly: true, type: { - name: "Composite", - className: "MonthlySchedule" + name: "String" } }, - enabled: { - serializedName: "properties.enabled", + created: { + serializedName: "properties.created", + readOnly: true, type: { - name: "Boolean" + name: "DateTime" } }, provisioningState: { - readOnly: true, serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -2034,35 +2194,63 @@ export const SnapshotPolicy: msRest.CompositeMapper = { } }; -export const SnapshotPolicyDetails: msRest.CompositeMapper = { - serializedName: "snapshotPolicyDetails", +export const SnapshotPoliciesList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SnapshotPolicyDetails", + className: "SnapshotPoliciesList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SnapshotPolicy" + } + } + } + } + } + } +}; + +export const SnapshotPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SnapshotPolicy", modelProperties: { location: { serializedName: "location", + required: true, type: { name: "String" } }, id: { - readOnly: true, serializedName: "id", + readOnly: true, type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, - type: { + etag: { + serializedName: "etag", readOnly: true, + type: { + name: "String" + } + }, + type: { serializedName: "type", + readOnly: true, type: { name: "String" } @@ -2071,11 +2259,7 @@ export const SnapshotPolicyDetails: msRest.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { - type: { - name: "String" - } - } + value: { type: { name: "String" } } } }, hourlySchedule: { @@ -2113,8 +2297,8 @@ export const SnapshotPolicyDetails: msRest.CompositeMapper = { } }, provisioningState: { - readOnly: true, serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -2123,505 +2307,378 @@ export const SnapshotPolicyDetails: msRest.CompositeMapper = { } }; -export const SnapshotPolicyPatch: msRest.CompositeMapper = { - serializedName: "snapshotPolicyPatch", +export const HourlySchedule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SnapshotPolicyPatch", + className: "HourlySchedule", modelProperties: { - location: { - serializedName: "location", + snapshotsToKeep: { + serializedName: "snapshotsToKeep", type: { - name: "String" + name: "Number" } }, - id: { - readOnly: true, - serializedName: "id", + minute: { + serializedName: "minute", type: { - name: "String" + name: "Number" } }, - name: { - readOnly: true, - serializedName: "name", + usedBytes: { + serializedName: "usedBytes", type: { - name: "String" + name: "Number" } - }, - type: { - readOnly: true, - serializedName: "type", + } + } + } +}; + +export const DailySchedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DailySchedule", + modelProperties: { + snapshotsToKeep: { + serializedName: "snapshotsToKeep", type: { - name: "String" + name: "Number" } }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + hour: { + serializedName: "hour", + type: { + name: "Number" } }, - hourlySchedule: { - serializedName: "properties.hourlySchedule", + minute: { + serializedName: "minute", type: { - name: "Composite", - className: "HourlySchedule" + name: "Number" } }, - dailySchedule: { - serializedName: "properties.dailySchedule", + usedBytes: { + serializedName: "usedBytes", type: { - name: "Composite", - className: "DailySchedule" + name: "Number" + } + } + } + } +}; + +export const WeeklySchedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WeeklySchedule", + modelProperties: { + snapshotsToKeep: { + serializedName: "snapshotsToKeep", + type: { + name: "Number" } }, - weeklySchedule: { - serializedName: "properties.weeklySchedule", + day: { + serializedName: "day", type: { - name: "Composite", - className: "WeeklySchedule" + name: "String" } }, - monthlySchedule: { - serializedName: "properties.monthlySchedule", + hour: { + serializedName: "hour", type: { - name: "Composite", - className: "MonthlySchedule" + name: "Number" } }, - enabled: { - serializedName: "properties.enabled", + minute: { + serializedName: "minute", type: { - name: "Boolean" + name: "Number" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + usedBytes: { + serializedName: "usedBytes", type: { - name: "String" + name: "Number" } } } } }; -export const SnapshotPolicyVolumeList: msRest.CompositeMapper = { - serializedName: "snapshotPolicyVolumeList", +export const MonthlySchedule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SnapshotPolicyVolumeList", + className: "MonthlySchedule", modelProperties: { - value: { - serializedName: "value", + snapshotsToKeep: { + serializedName: "snapshotsToKeep", type: { - name: "Sequence", - element: { - type: { - name: "Object" - } - } + name: "Number" } - } - } - } -}; - -export const VolumeRevert: msRest.CompositeMapper = { - serializedName: "volumeRevert", - type: { - name: "Composite", - className: "VolumeRevert", - modelProperties: { - snapshotId: { - serializedName: "snapshotId", + }, + daysOfMonth: { + serializedName: "daysOfMonth", type: { name: "String" } - } - } - } -}; - -export const AuthorizeRequest: msRest.CompositeMapper = { - serializedName: "authorizeRequest", - type: { - name: "Composite", - className: "AuthorizeRequest", - modelProperties: { - remoteVolumeResourceId: { - serializedName: "remoteVolumeResourceId", + }, + hour: { + serializedName: "hour", type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const BreakReplicationRequest: msRest.CompositeMapper = { - serializedName: "breakReplicationRequest", - type: { - name: "Composite", - className: "BreakReplicationRequest", - modelProperties: { - forceBreakReplication: { - serializedName: "forceBreakReplication", + }, + minute: { + serializedName: "minute", type: { - name: "Boolean" + name: "Number" } - } - } - } -}; - -export const PoolChangeRequest: msRest.CompositeMapper = { - serializedName: "poolChangeRequest", - type: { - name: "Composite", - className: "PoolChangeRequest", - modelProperties: { - newPoolResourceId: { - required: true, - serializedName: "newPoolResourceId", + }, + usedBytes: { + serializedName: "usedBytes", type: { - name: "String" + name: "Number" } } } } }; -export const Backup: msRest.CompositeMapper = { - serializedName: "backup", +export const SnapshotPolicyPatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Backup", + className: "SnapshotPolicyPatch", modelProperties: { location: { - required: true, serializedName: "location", type: { name: "String" } }, id: { - readOnly: true, serializedName: "id", + readOnly: true, type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", - type: { - name: "String" - } - }, - backupId: { readOnly: true, - serializedName: "properties.backupId", - constraints: { - MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ - }, type: { name: "String" } }, - creationDate: { - readOnly: true, - serializedName: "properties.creationDate", + tags: { + serializedName: "tags", type: { - name: "DateTime" + name: "Dictionary", + value: { type: { name: "String" } } } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + hourlySchedule: { + serializedName: "properties.hourlySchedule", type: { - name: "String" + name: "Composite", + className: "HourlySchedule" } }, - size: { - readOnly: true, - serializedName: "properties.size", + dailySchedule: { + serializedName: "properties.dailySchedule", type: { - name: "Number" + name: "Composite", + className: "DailySchedule" } }, - label: { - serializedName: "properties.label", + weeklySchedule: { + serializedName: "properties.weeklySchedule", type: { - name: "String" + name: "Composite", + className: "WeeklySchedule" } }, - backupType: { - readOnly: true, - serializedName: "properties.backupType", + monthlySchedule: { + serializedName: "properties.monthlySchedule", type: { - name: "String" + name: "Composite", + className: "MonthlySchedule" } }, - failureReason: { - readOnly: true, - serializedName: "properties.failureReason", + enabled: { + serializedName: "properties.enabled", type: { - name: "String" + name: "Boolean" } }, - volumeName: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "properties.volumeName", type: { name: "String" } - }, - useExistingSnapshot: { - serializedName: "properties.useExistingSnapshot", - defaultValue: false, - type: { - name: "Boolean" - } } } } }; -export const BackupPatch: msRest.CompositeMapper = { - serializedName: "backupPatch", +export const SnapshotPolicyVolumeList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BackupPatch", + className: "SnapshotPolicyVolumeList", modelProperties: { - tags: { - serializedName: "tags", + value: { + serializedName: "value", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "Volume" } } } + } + } + } +}; + +export const BackupStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupStatus", + modelProperties: { + healthy: { + serializedName: "healthy", + readOnly: true, + type: { + name: "Boolean" + } }, - backupId: { + relationshipStatus: { + serializedName: "relationshipStatus", readOnly: true, - serializedName: "properties.backupId", - constraints: { - MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ - }, type: { name: "String" } }, - creationDate: { + mirrorState: { + serializedName: "mirrorState", readOnly: true, - serializedName: "properties.creationDate", type: { - name: "DateTime" + name: "String" } }, - provisioningState: { + unhealthyReason: { + serializedName: "unhealthyReason", readOnly: true, - serializedName: "properties.provisioningState", type: { name: "String" } }, - size: { + errorMessage: { + serializedName: "errorMessage", readOnly: true, - serializedName: "properties.size", - type: { - name: "Number" - } - }, - label: { - serializedName: "properties.label", type: { name: "String" } }, - backupType: { + lastTransferSize: { + serializedName: "lastTransferSize", readOnly: true, - serializedName: "properties.backupType", type: { - name: "String" + name: "Number" } }, - failureReason: { + lastTransferType: { + serializedName: "lastTransferType", readOnly: true, - serializedName: "properties.failureReason", type: { name: "String" } }, - volumeName: { + totalTransferBytes: { + serializedName: "totalTransferBytes", readOnly: true, - serializedName: "properties.volumeName", - type: { - name: "String" - } - }, - useExistingSnapshot: { - serializedName: "properties.useExistingSnapshot", - defaultValue: false, - type: { - name: "Boolean" - } - } - } - } -}; - -export const VolumeBackups: msRest.CompositeMapper = { - serializedName: "volumeBackups", - type: { - name: "Composite", - className: "VolumeBackups", - modelProperties: { - volumeName: { - serializedName: "volumeName", - type: { - name: "String" - } - }, - backupsCount: { - serializedName: "backupsCount", type: { name: "Number" } - }, - policyEnabled: { - serializedName: "policyEnabled", - type: { - name: "Boolean" - } } } } }; -export const BackupPolicy: msRest.CompositeMapper = { - serializedName: "backupPolicy", +export const RestoreStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BackupPolicy", + className: "RestoreStatus", modelProperties: { - location: { - required: true, - serializedName: "location", - type: { - name: "String" - } - }, - id: { + healthy: { + serializedName: "healthy", readOnly: true, - serializedName: "id", type: { - name: "String" + name: "Boolean" } }, - name: { + relationshipStatus: { + serializedName: "relationshipStatus", readOnly: true, - serializedName: "name", type: { name: "String" } }, - type: { + mirrorState: { + serializedName: "mirrorState", readOnly: true, - serializedName: "type", type: { name: "String" } }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - name1: { + unhealthyReason: { + serializedName: "unhealthyReason", readOnly: true, - serializedName: "properties.name", type: { name: "String" } }, - provisioningState: { + errorMessage: { + serializedName: "errorMessage", readOnly: true, - serializedName: "properties.provisioningState", type: { name: "String" } }, - dailyBackupsToKeep: { - serializedName: "properties.dailyBackupsToKeep", - type: { - name: "Number" - } - }, - weeklyBackupsToKeep: { - serializedName: "properties.weeklyBackupsToKeep", - type: { - name: "Number" - } - }, - monthlyBackupsToKeep: { - serializedName: "properties.monthlyBackupsToKeep", - type: { - name: "Number" - } - }, - yearlyBackupsToKeep: { - serializedName: "properties.yearlyBackupsToKeep", - type: { - name: "Number" - } - }, - volumesAssigned: { - serializedName: "properties.volumesAssigned", + totalTransferBytes: { + serializedName: "totalTransferBytes", + readOnly: true, type: { name: "Number" } - }, - enabled: { - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - volumeBackups: { - serializedName: "properties.volumeBackups", + } + } + } +}; + +export const BackupsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupsList", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VolumeBackups" + className: "Backup" } } } @@ -2630,218 +2687,210 @@ export const BackupPolicy: msRest.CompositeMapper = { } }; -export const BackupPolicyDetails: msRest.CompositeMapper = { - serializedName: "backupPolicyDetails", +export const Backup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BackupPolicyDetails", + className: "Backup", modelProperties: { location: { serializedName: "location", + required: true, type: { name: "String" } }, id: { - readOnly: true, serializedName: "id", + readOnly: true, type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", + readOnly: true, type: { name: "String" } }, - tags: { - serializedName: "tags", + backupId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "properties.backupId", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } }, - name1: { + creationDate: { + serializedName: "properties.creationDate", readOnly: true, - serializedName: "properties.name", type: { - name: "String" + name: "DateTime" } }, provisioningState: { - readOnly: true, serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - dailyBackupsToKeep: { - serializedName: "properties.dailyBackupsToKeep", + size: { + serializedName: "properties.size", + readOnly: true, type: { name: "Number" } }, - weeklyBackupsToKeep: { - serializedName: "properties.weeklyBackupsToKeep", + label: { + serializedName: "properties.label", type: { - name: "Number" + name: "String" } }, - monthlyBackupsToKeep: { - serializedName: "properties.monthlyBackupsToKeep", + backupType: { + serializedName: "properties.backupType", + readOnly: true, type: { - name: "Number" + name: "String" } }, - yearlyBackupsToKeep: { - serializedName: "properties.yearlyBackupsToKeep", + failureReason: { + serializedName: "properties.failureReason", + readOnly: true, type: { - name: "Number" + name: "String" } }, - volumesAssigned: { - serializedName: "properties.volumesAssigned", + volumeName: { + serializedName: "properties.volumeName", + readOnly: true, type: { - name: "Number" + name: "String" } }, - enabled: { - serializedName: "properties.enabled", + useExistingSnapshot: { + defaultValue: false, + serializedName: "properties.useExistingSnapshot", type: { name: "Boolean" } - }, - volumeBackups: { - serializedName: "properties.volumeBackups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VolumeBackups" - } - } - } } } } }; -export const BackupPolicyPatch: msRest.CompositeMapper = { - serializedName: "backupPolicyPatch", +export const BackupPatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BackupPolicyPatch", + className: "BackupPatch", modelProperties: { - location: { - serializedName: "location", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - id: { + backupId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "properties.backupId", readOnly: true, - serializedName: "id", type: { name: "String" } }, - name: { + creationDate: { + serializedName: "properties.creationDate", readOnly: true, - serializedName: "name", type: { - name: "String" + name: "DateTime" } }, - type: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "type", type: { name: "String" } }, - tags: { - serializedName: "tags", + size: { + serializedName: "properties.size", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Number" } }, - name1: { - readOnly: true, - serializedName: "properties.name", + label: { + serializedName: "properties.label", type: { name: "String" } }, - provisioningState: { + backupType: { + serializedName: "properties.backupType", readOnly: true, - serializedName: "properties.provisioningState", type: { name: "String" } }, - dailyBackupsToKeep: { - serializedName: "properties.dailyBackupsToKeep", - type: { - name: "Number" - } - }, - weeklyBackupsToKeep: { - serializedName: "properties.weeklyBackupsToKeep", - type: { - name: "Number" - } - }, - monthlyBackupsToKeep: { - serializedName: "properties.monthlyBackupsToKeep", - type: { - name: "Number" - } - }, - yearlyBackupsToKeep: { - serializedName: "properties.yearlyBackupsToKeep", + failureReason: { + serializedName: "properties.failureReason", + readOnly: true, type: { - name: "Number" + name: "String" } }, - volumesAssigned: { - serializedName: "properties.volumesAssigned", + volumeName: { + serializedName: "properties.volumeName", + readOnly: true, type: { - name: "Number" + name: "String" } }, - enabled: { - serializedName: "properties.enabled", + useExistingSnapshot: { + defaultValue: false, + serializedName: "properties.useExistingSnapshot", type: { name: "Boolean" } - }, - volumeBackups: { - serializedName: "properties.volumeBackups", + } + } + } +}; + +export const BackupPoliciesList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupPoliciesList", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VolumeBackups" + className: "BackupPolicy" } } } @@ -2850,182 +2899,235 @@ export const BackupPolicyPatch: msRest.CompositeMapper = { } }; -export const Vault: msRest.CompositeMapper = { - serializedName: "vault", +export const BackupPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Vault", + className: "BackupPolicy", modelProperties: { location: { - required: true, serializedName: "location", + required: true, type: { name: "String" } }, id: { - readOnly: true, serializedName: "id", + readOnly: true, type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, - type: { + etag: { + serializedName: "etag", readOnly: true, - serializedName: "type", type: { name: "String" } }, - vaultName: { - serializedName: "properties.vaultName", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const BackupStatus: msRest.CompositeMapper = { - serializedName: "backupStatus", - type: { - name: "Composite", - className: "BackupStatus", - modelProperties: { - healthy: { - readOnly: true, - serializedName: "healthy", + }, + tags: { + serializedName: "tags", type: { - name: "Boolean" + name: "Dictionary", + value: { type: { name: "String" } } } }, - relationshipStatus: { + backupPolicyId: { + serializedName: "properties.backupPolicyId", readOnly: true, - serializedName: "relationshipStatus", type: { name: "String" } }, - mirrorState: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "mirrorState", type: { name: "String" } }, - unhealthyReason: { - readOnly: true, - serializedName: "unhealthyReason", + dailyBackupsToKeep: { + serializedName: "properties.dailyBackupsToKeep", type: { - name: "String" + name: "Number" } }, - errorMessage: { - readOnly: true, - serializedName: "errorMessage", + weeklyBackupsToKeep: { + serializedName: "properties.weeklyBackupsToKeep", type: { - name: "String" + name: "Number" } }, - lastTransferSize: { + monthlyBackupsToKeep: { + serializedName: "properties.monthlyBackupsToKeep", + type: { + name: "Number" + } + }, + volumesAssigned: { + serializedName: "properties.volumesAssigned", readOnly: true, - serializedName: "lastTransferSize", type: { name: "Number" } }, - lastTransferType: { + enabled: { + serializedName: "properties.enabled", + type: { + name: "Boolean" + } + }, + volumeBackups: { + serializedName: "properties.volumeBackups", readOnly: true, - serializedName: "lastTransferType", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VolumeBackups" + } + } + } + } + } + } +}; + +export const VolumeBackups: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeBackups", + modelProperties: { + volumeName: { + serializedName: "volumeName", type: { name: "String" } }, - totalTransferBytes: { - readOnly: true, - serializedName: "totalTransferBytes", + backupsCount: { + serializedName: "backupsCount", type: { name: "Number" } + }, + policyEnabled: { + serializedName: "policyEnabled", + type: { + name: "Boolean" + } } } } }; -export const RestoreStatus: msRest.CompositeMapper = { - serializedName: "restoreStatus", +export const BackupPolicyPatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestoreStatus", + className: "BackupPolicyPatch", modelProperties: { - healthy: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + id: { + serializedName: "id", readOnly: true, - serializedName: "healthy", type: { - name: "Boolean" + name: "String" } }, - relationshipStatus: { + name: { + serializedName: "name", readOnly: true, - serializedName: "relationshipStatus", type: { name: "String" } }, - mirrorState: { + type: { + serializedName: "type", readOnly: true, - serializedName: "mirrorState", type: { name: "String" } }, - unhealthyReason: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + backupPolicyId: { + serializedName: "properties.backupPolicyId", readOnly: true, - serializedName: "unhealthyReason", type: { name: "String" } }, - errorMessage: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "errorMessage", type: { name: "String" } }, - totalTransferBytes: { + dailyBackupsToKeep: { + serializedName: "properties.dailyBackupsToKeep", + type: { + name: "Number" + } + }, + weeklyBackupsToKeep: { + serializedName: "properties.weeklyBackupsToKeep", + type: { + name: "Number" + } + }, + monthlyBackupsToKeep: { + serializedName: "properties.monthlyBackupsToKeep", + type: { + name: "Number" + } + }, + volumesAssigned: { + serializedName: "properties.volumesAssigned", readOnly: true, - serializedName: "totalTransferBytes", type: { name: "Number" } - } - } - } -}; - -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "", + }, + enabled: { + serializedName: "properties.enabled", + type: { + name: "Boolean" + } + }, + volumeBackups: { + serializedName: "properties.volumeBackups", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Operation" + className: "VolumeBackups" } } } @@ -3034,82 +3136,62 @@ export const OperationListResult: msRest.CompositeMapper = { } }; -export const NetAppAccountList: msRest.CompositeMapper = { - serializedName: "netAppAccountList", +export const VaultList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetAppAccountList", + className: "VaultList", modelProperties: { value: { - serializedName: "", + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "NetAppAccount" + className: "Vault" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const CapacityPoolList: msRest.CompositeMapper = { - serializedName: "capacityPoolList", +export const Vault: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CapacityPoolList", + className: "Vault", modelProperties: { - value: { - serializedName: "", + location: { + serializedName: "location", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CapacityPool" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const VolumeList: msRest.CompositeMapper = { - serializedName: "volumeList", - type: { - name: "Composite", - className: "VolumeList", - modelProperties: { - value: { - serializedName: "", + }, + name: { + serializedName: "name", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Volume" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + vaultName: { + serializedName: "properties.vaultName", type: { name: "String" } @@ -3118,20 +3200,19 @@ export const VolumeList: msRest.CompositeMapper = { } }; -export const SnapshotsList: msRest.CompositeMapper = { - serializedName: "snapshotsList", +export const VolumeGroupList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SnapshotsList", + className: "VolumeGroupList", modelProperties: { value: { - serializedName: "", + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Snapshot" + className: "VolumeGroup" } } } @@ -3140,64 +3221,176 @@ export const SnapshotsList: msRest.CompositeMapper = { } }; -export const SnapshotPoliciesList: msRest.CompositeMapper = { - serializedName: "snapshotPoliciesList", +export const VolumeGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SnapshotPoliciesList", + className: "VolumeGroup", modelProperties: { - value: { - serializedName: "", + location: { + serializedName: "location", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SnapshotPolicy" - } - } + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + groupMetaData: { + serializedName: "properties.groupMetaData", + type: { + name: "Composite", + className: "VolumeGroupMetaData" } } } } }; -export const BackupsList: msRest.CompositeMapper = { - serializedName: "backupsList", +export const VolumeGroupMetaData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BackupsList", + className: "VolumeGroupMetaData", modelProperties: { - value: { - serializedName: "", + groupDescription: { + serializedName: "groupDescription", + type: { + name: "String" + } + }, + applicationType: { + serializedName: "applicationType", + type: { + name: "String" + } + }, + applicationIdentifier: { + serializedName: "applicationIdentifier", + type: { + name: "String" + } + }, + globalPlacementRules: { + serializedName: "globalPlacementRules", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Backup" + className: "PlacementKeyValuePairs" } } } + }, + deploymentSpecId: { + serializedName: "deploymentSpecId", + type: { + name: "String" + } + }, + volumesCount: { + serializedName: "volumesCount", + readOnly: true, + type: { + name: "Number" + } } } } }; -export const BackupPoliciesList: msRest.CompositeMapper = { - serializedName: "backupPoliciesList", +export const VolumeGroupDetails: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BackupPoliciesList", + className: "VolumeGroupDetails", modelProperties: { - value: { - serializedName: "", + location: { + serializedName: "location", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + groupMetaData: { + serializedName: "properties.groupMetaData", + type: { + name: "Composite", + className: "VolumeGroupMetaData" + } + }, + volumes: { + serializedName: "properties.volumes", type: { name: "Sequence", element: { type: { name: "Composite", - className: "BackupPolicy" + className: "VolumeGroupVolumeProperties" } } } @@ -3206,23 +3399,713 @@ export const BackupPoliciesList: msRest.CompositeMapper = { } }; -export const VaultList: msRest.CompositeMapper = { - serializedName: "vaultList", +export const VolumeGroupVolumeProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VaultList", + className: "VolumeGroupVolumeProperties", modelProperties: { - value: { - serializedName: "", + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + fileSystemId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "properties.fileSystemId", + readOnly: true, + type: { + name: "String" + } + }, + creationToken: { + constraints: { + Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9\\-]{0,79}$"), + MaxLength: 80, + MinLength: 1 + }, + serializedName: "properties.creationToken", + required: true, + type: { + name: "String" + } + }, + serviceLevel: { + defaultValue: "Premium", + serializedName: "properties.serviceLevel", + type: { + name: "String" + } + }, + usageThreshold: { + defaultValue: 107374182400, + constraints: { + InclusiveMaximum: 109951162777600, + InclusiveMinimum: 107374182400 + }, + serializedName: "properties.usageThreshold", + required: true, + type: { + name: "Number" + } + }, + exportPolicy: { + serializedName: "properties.exportPolicy", + type: { + name: "Composite", + className: "VolumePropertiesExportPolicy" + } + }, + protocolTypes: { + serializedName: "properties.protocolTypes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Vault" + name: "String" } } } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + snapshotId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\\\?([^\\/]*[\\/])*)([^\\/]+)$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "properties.snapshotId", + nullable: true, + type: { + name: "String" + } + }, + backupId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\\\?([^\\/]*[\\/])*)([^\\/]+)$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "properties.backupId", + nullable: true, + type: { + name: "String" + } + }, + baremetalTenantId: { + serializedName: "properties.baremetalTenantId", + readOnly: true, + type: { + name: "String" + } + }, + subnetId: { + serializedName: "properties.subnetId", + required: true, + type: { + name: "String" + } + }, + networkFeatures: { + defaultValue: "Basic", + serializedName: "properties.networkFeatures", + type: { + name: "String" + } + }, + networkSiblingSetId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "properties.networkSiblingSetId", + readOnly: true, + type: { + name: "String" + } + }, + storageToNetworkProximity: { + serializedName: "properties.storageToNetworkProximity", + readOnly: true, + type: { + name: "String" + } + }, + mountTargets: { + serializedName: "properties.mountTargets", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MountTargetProperties" + } + } + } + }, + volumeType: { + serializedName: "properties.volumeType", + type: { + name: "String" + } + }, + dataProtection: { + serializedName: "properties.dataProtection", + type: { + name: "Composite", + className: "VolumePropertiesDataProtection" + } + }, + isRestoring: { + serializedName: "properties.isRestoring", + type: { + name: "Boolean" + } + }, + snapshotDirectoryVisible: { + defaultValue: true, + serializedName: "properties.snapshotDirectoryVisible", + type: { + name: "Boolean" + } + }, + kerberosEnabled: { + defaultValue: false, + serializedName: "properties.kerberosEnabled", + type: { + name: "Boolean" + } + }, + securityStyle: { + defaultValue: "unix", + serializedName: "properties.securityStyle", + type: { + name: "String" + } + }, + smbEncryption: { + defaultValue: false, + serializedName: "properties.smbEncryption", + type: { + name: "Boolean" + } + }, + smbContinuouslyAvailable: { + defaultValue: false, + serializedName: "properties.smbContinuouslyAvailable", + type: { + name: "Boolean" + } + }, + throughputMibps: { + defaultValue: 0, + serializedName: "properties.throughputMibps", + type: { + name: "Number" + } + }, + encryptionKeySource: { + serializedName: "properties.encryptionKeySource", + type: { + name: "String" + } + }, + ldapEnabled: { + defaultValue: false, + serializedName: "properties.ldapEnabled", + type: { + name: "Boolean" + } + }, + coolAccess: { + defaultValue: false, + serializedName: "properties.coolAccess", + type: { + name: "Boolean" + } + }, + coolnessPeriod: { + constraints: { + InclusiveMaximum: 63, + InclusiveMinimum: 7 + }, + serializedName: "properties.coolnessPeriod", + type: { + name: "Number" + } + }, + unixPermissions: { + defaultValue: "0770", + constraints: { + MaxLength: 4, + MinLength: 4 + }, + serializedName: "properties.unixPermissions", + nullable: true, + type: { + name: "String" + } + }, + cloneProgress: { + serializedName: "properties.cloneProgress", + readOnly: true, + nullable: true, + type: { + name: "Number" + } + }, + avsDataStore: { + defaultValue: "Disabled", + serializedName: "properties.avsDataStore", + type: { + name: "String" + } + }, + isDefaultQuotaEnabled: { + defaultValue: false, + serializedName: "properties.isDefaultQuotaEnabled", + type: { + name: "Boolean" + } + }, + defaultUserQuotaInKiBs: { + defaultValue: 0, + serializedName: "properties.defaultUserQuotaInKiBs", + type: { + name: "Number" + } + }, + defaultGroupQuotaInKiBs: { + defaultValue: 0, + serializedName: "properties.defaultGroupQuotaInKiBs", + type: { + name: "Number" + } + }, + volumeGroupName: { + serializedName: "properties.volumeGroupName", + readOnly: true, + type: { + name: "String" + } + }, + capacityPoolResourceId: { + serializedName: "properties.capacityPoolResourceId", + type: { + name: "String" + } + }, + proximityPlacementGroup: { + serializedName: "properties.proximityPlacementGroup", + type: { + name: "String" + } + }, + t2Network: { + serializedName: "properties.t2Network", + readOnly: true, + type: { + name: "String" + } + }, + volumeSpecName: { + serializedName: "properties.volumeSpecName", + type: { + name: "String" + } + }, + placementRules: { + serializedName: "properties.placementRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PlacementKeyValuePairs" + } + } + } + } + } + } +}; + +export const ResourceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const MountTarget: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MountTarget", + modelProperties: { + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + mountTargetId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "properties.mountTargetId", + readOnly: true, + type: { + name: "String" + } + }, + fileSystemId: { + constraints: { + Pattern: new RegExp( + "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + ), + MaxLength: 36, + MinLength: 36 + }, + serializedName: "properties.fileSystemId", + required: true, + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "properties.ipAddress", + readOnly: true, + type: { + name: "String" + } + }, + smbServerFqdn: { + serializedName: "properties.smbServerFqdn", + type: { + name: "String" + } + } + } + } +}; + +export const SnapshotPolicyDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SnapshotPolicyDetails", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + hourlySchedule: { + serializedName: "properties.hourlySchedule", + type: { + name: "Composite", + className: "HourlySchedule" + } + }, + dailySchedule: { + serializedName: "properties.dailySchedule", + type: { + name: "Composite", + className: "DailySchedule" + } + }, + weeklySchedule: { + serializedName: "properties.weeklySchedule", + type: { + name: "Composite", + className: "WeeklySchedule" + } + }, + monthlySchedule: { + serializedName: "properties.monthlySchedule", + type: { + name: "Composite", + className: "MonthlySchedule" + } + }, + enabled: { + serializedName: "properties.enabled", + type: { + name: "Boolean" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const BackupPolicyDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupPolicyDetails", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + backupPolicyId: { + serializedName: "properties.backupPolicyId", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + dailyBackupsToKeep: { + serializedName: "properties.dailyBackupsToKeep", + type: { + name: "Number" + } + }, + weeklyBackupsToKeep: { + serializedName: "properties.weeklyBackupsToKeep", + type: { + name: "Number" + } + }, + monthlyBackupsToKeep: { + serializedName: "properties.monthlyBackupsToKeep", + type: { + name: "Number" + } + }, + volumesAssigned: { + serializedName: "properties.volumesAssigned", + readOnly: true, + type: { + name: "Number" + } + }, + enabled: { + serializedName: "properties.enabled", + type: { + name: "Boolean" + } + }, + volumeBackups: { + serializedName: "properties.volumeBackups", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VolumeBackups" + } + } + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const SubscriptionQuotaItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SubscriptionQuotaItem", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + current: { + serializedName: "properties.current", + readOnly: true, + type: { + name: "Number" + } + }, + default: { + serializedName: "properties.default", + readOnly: true, + type: { + name: "Number" + } } } } diff --git a/sdk/netapp/arm-netapp/src/models/operationsMappers.ts b/sdk/netapp/arm-netapp/src/models/operationsMappers.ts deleted file mode 100644 index 7998fd6a0db3..000000000000 --- a/sdk/netapp/arm-netapp/src/models/operationsMappers.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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. - */ - -export { - CloudError, - Dimension, - MetricSpecification, - Operation, - OperationDisplay, - OperationListResult, - ServiceSpecification -} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/parameters.ts b/sdk/netapp/arm-netapp/src/models/parameters.ts index 42db0c6d334b..4a5b9b1b405b 100644 --- a/sdk/netapp/arm-netapp/src/models/parameters.ts +++ b/sdk/netapp/arm-netapp/src/models/parameters.ts @@ -3,158 +3,388 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + ResourceNameAvailabilityRequest as ResourceNameAvailabilityRequestMapper, + FilePathAvailabilityRequest as FilePathAvailabilityRequestMapper, + QuotaAvailabilityRequest as QuotaAvailabilityRequestMapper, + NetAppAccount as NetAppAccountMapper, + NetAppAccountPatch as NetAppAccountPatchMapper, + CapacityPool as CapacityPoolMapper, + CapacityPoolPatch as CapacityPoolPatchMapper, + Volume as VolumeMapper, + VolumePatch as VolumePatchMapper, + VolumeRevert as VolumeRevertMapper, + BreakReplicationRequest as BreakReplicationRequestMapper, + AuthorizeRequest as AuthorizeRequestMapper, + PoolChangeRequest as PoolChangeRequestMapper, + Snapshot as SnapshotMapper, + SnapshotPolicy as SnapshotPolicyMapper, + SnapshotPolicyPatch as SnapshotPolicyPatchMapper, + Backup as BackupMapper, + BackupPatch as BackupPatchMapper, + BackupPolicy as BackupPolicyMapper, + BackupPolicyPatch as BackupPolicyPatchMapper, + VolumeGroupDetails as VolumeGroupDetailsMapper +} from "../models/mappers"; -export const acceptLanguage: msRest.OperationParameter = { - parameterPath: "acceptLanguage", +export const accept: OperationParameter = { + parameterPath: "accept", mapper: { - serializedName: "accept-language", - defaultValue: 'en-US', + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", type: { name: "String" } } }; -export const accountName: msRest.OperationURLParameter = { - parameterPath: "accountName", + +export const $host: OperationURLParameter = { + parameterPath: "$host", mapper: { + serializedName: "$host", required: true, - serializedName: "accountName", type: { name: "String" } - } + }, + skipEncoding: true }; -export const apiVersion: msRest.OperationQueryParameter = { + +export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - required: true, + defaultValue: "2021-08-01", + isConstant: true, serializedName: "api-version", - constraints: { - MinLength: 1 - }, type: { name: "String" } } }; -export const backupName: msRest.OperationURLParameter = { - parameterPath: "backupName", + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { - required: true, - serializedName: "backupName", + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", type: { name: "String" } } }; -export const backupPolicyName: msRest.OperationURLParameter = { - parameterPath: "backupPolicyName", + +export const name: OperationParameter = { + parameterPath: "name", + mapper: ResourceNameAvailabilityRequestMapper +}; + +export const typeParam: OperationParameter = { + parameterPath: "typeParam", + mapper: ResourceNameAvailabilityRequestMapper +}; + +export const resourceGroup: OperationParameter = { + parameterPath: "resourceGroup", + mapper: ResourceNameAvailabilityRequestMapper +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { + serializedName: "subscriptionId", required: true, - serializedName: "backupPolicyName", type: { name: "String" } } }; -export const location: msRest.OperationURLParameter = { + +export const location: OperationURLParameter = { parameterPath: "location", mapper: { - required: true, serializedName: "location", + required: true, + type: { + name: "String" + } + } +}; + +export const name1: OperationParameter = { + parameterPath: "name", + mapper: FilePathAvailabilityRequestMapper +}; + +export const subnetId: OperationParameter = { + parameterPath: "subnetId", + mapper: FilePathAvailabilityRequestMapper +}; + +export const name2: OperationParameter = { + parameterPath: "name", + mapper: QuotaAvailabilityRequestMapper +}; + +export const typeParam1: OperationParameter = { + parameterPath: "typeParam", + mapper: QuotaAvailabilityRequestMapper +}; + +export const resourceGroup1: OperationParameter = { + parameterPath: "resourceGroup", + mapper: QuotaAvailabilityRequestMapper +}; + +export const quotaLimitName: OperationURLParameter = { + parameterPath: "quotaLimitName", + mapper: { + serializedName: "quotaLimitName", + required: true, type: { name: "String" } } }; -export const nextPageLink: msRest.OperationURLParameter = { - parameterPath: "nextPageLink", + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", required: true, + type: { + name: "String" + } + } +}; + +export const accountName: OperationURLParameter = { + parameterPath: "accountName", + mapper: { + serializedName: "accountName", + required: true, + type: { + name: "String" + } + } +}; + +export const body3: OperationParameter = { + parameterPath: "body", + mapper: NetAppAccountMapper +}; + +export const body4: OperationParameter = { + parameterPath: "body", + mapper: NetAppAccountPatchMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { serializedName: "nextLink", + required: true, type: { name: "String" } }, skipEncoding: true }; -export const poolName: msRest.OperationURLParameter = { + +export const poolName: OperationURLParameter = { parameterPath: "poolName", mapper: { - required: true, - serializedName: "poolName", constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,63}$"), MaxLength: 64, - MinLength: 1, - Pattern: /^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$/ + MinLength: 1 }, + serializedName: "poolName", + required: true, type: { name: "String" } } }; -export const resourceGroupName: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", + +export const body5: OperationParameter = { + parameterPath: "body", + mapper: CapacityPoolMapper +}; + +export const body6: OperationParameter = { + parameterPath: "body", + mapper: CapacityPoolPatchMapper +}; + +export const volumeName: OperationURLParameter = { + parameterPath: "volumeName", mapper: { - required: true, - serializedName: "resourceGroupName", constraints: { - MaxLength: 90, - MinLength: 1, - Pattern: /^[-\w\._\(\)]+$/ + Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$"), + MaxLength: 64, + MinLength: 1 }, + serializedName: "volumeName", + required: true, type: { name: "String" } } }; -export const snapshotName: msRest.OperationURLParameter = { + +export const body7: OperationParameter = { + parameterPath: "body", + mapper: VolumeMapper +}; + +export const body8: OperationParameter = { + parameterPath: "body", + mapper: VolumePatchMapper +}; + +export const body9: OperationParameter = { + parameterPath: "body", + mapper: VolumeRevertMapper +}; + +export const body10: OperationParameter = { + parameterPath: ["options", "body"], + mapper: BreakReplicationRequestMapper +}; + +export const body11: OperationParameter = { + parameterPath: "body", + mapper: AuthorizeRequestMapper +}; + +export const body12: OperationParameter = { + parameterPath: "body", + mapper: PoolChangeRequestMapper +}; + +export const snapshotName: OperationURLParameter = { parameterPath: "snapshotName", mapper: { - required: true, serializedName: "snapshotName", + required: true, type: { name: "String" } } }; -export const snapshotPolicyName: msRest.OperationURLParameter = { - parameterPath: "snapshotPolicyName", + +export const body13: OperationParameter = { + parameterPath: "body", + mapper: SnapshotMapper +}; + +export const body14: OperationParameter = { + parameterPath: "body", mapper: { + serializedName: "body", required: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } +}; + +export const snapshotPolicyName: OperationURLParameter = { + parameterPath: "snapshotPolicyName", + mapper: { serializedName: "snapshotPolicyName", + required: true, type: { name: "String" } } }; -export const subscriptionId: msRest.OperationURLParameter = { - parameterPath: "subscriptionId", + +export const body15: OperationParameter = { + parameterPath: "body", + mapper: SnapshotPolicyMapper +}; + +export const body16: OperationParameter = { + parameterPath: "body", + mapper: SnapshotPolicyPatchMapper +}; + +export const backupName: OperationURLParameter = { + parameterPath: "backupName", mapper: { + serializedName: "backupName", required: true, - serializedName: "subscriptionId", type: { name: "String" } } }; -export const volumeName: msRest.OperationURLParameter = { - parameterPath: "volumeName", + +export const body17: OperationParameter = { + parameterPath: "body", + mapper: BackupMapper +}; + +export const body18: OperationParameter = { + parameterPath: ["options", "body"], + mapper: BackupPatchMapper +}; + +export const backupPolicyName: OperationURLParameter = { + parameterPath: "backupPolicyName", mapper: { + serializedName: "backupPolicyName", required: true, - serializedName: "volumeName", + type: { + name: "String" + } + } +}; + +export const body19: OperationParameter = { + parameterPath: "body", + mapper: BackupPolicyMapper +}; + +export const body20: OperationParameter = { + parameterPath: "body", + mapper: BackupPolicyPatchMapper +}; + +export const volumeGroupName: OperationURLParameter = { + parameterPath: "volumeGroupName", + mapper: { constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,63}$"), MaxLength: 64, - MinLength: 1, - Pattern: /^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$/ + MinLength: 1 }, + serializedName: "volumeGroupName", + required: true, type: { name: "String" } } }; + +export const body21: OperationParameter = { + parameterPath: "body", + mapper: VolumeGroupDetailsMapper +}; diff --git a/sdk/netapp/arm-netapp/src/models/poolsMappers.ts b/sdk/netapp/arm-netapp/src/models/poolsMappers.ts deleted file mode 100644 index 4cdb59961bbe..000000000000 --- a/sdk/netapp/arm-netapp/src/models/poolsMappers.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -export { - AccountEncryption, - ActiveDirectory, - Backup, - BackupPatch, - BackupPolicy, - BackupPolicyDetails, - BackupPolicyPatch, - BaseResource, - CapacityPool, - CapacityPoolList, - CapacityPoolPatch, - CloudError, - DailySchedule, - ExportPolicyRule, - HourlySchedule, - MonthlySchedule, - MountTargetProperties, - NetAppAccount, - NetAppAccountPatch, - ReplicationObject, - Snapshot, - SnapshotPolicy, - SystemData, - Vault, - Volume, - VolumeBackupProperties, - VolumeBackups, - VolumePatch, - VolumePatchPropertiesDataProtection, - VolumePatchPropertiesExportPolicy, - VolumePropertiesDataProtection, - VolumePropertiesExportPolicy, - VolumeSnapshotProperties, - WeeklySchedule -} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/snapshotPoliciesMappers.ts b/sdk/netapp/arm-netapp/src/models/snapshotPoliciesMappers.ts deleted file mode 100644 index 7fb7e27a0438..000000000000 --- a/sdk/netapp/arm-netapp/src/models/snapshotPoliciesMappers.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -export { - AccountEncryption, - ActiveDirectory, - Backup, - BackupPatch, - BackupPolicy, - BackupPolicyDetails, - BackupPolicyPatch, - BaseResource, - CapacityPool, - CapacityPoolPatch, - CloudError, - DailySchedule, - ExportPolicyRule, - HourlySchedule, - MonthlySchedule, - MountTargetProperties, - NetAppAccount, - NetAppAccountPatch, - ReplicationObject, - Snapshot, - SnapshotPoliciesList, - SnapshotPolicy, - SnapshotPolicyPatch, - SnapshotPolicyVolumeList, - SystemData, - Vault, - Volume, - VolumeBackupProperties, - VolumeBackups, - VolumePatch, - VolumePatchPropertiesDataProtection, - VolumePatchPropertiesExportPolicy, - VolumePropertiesDataProtection, - VolumePropertiesExportPolicy, - VolumeSnapshotProperties, - WeeklySchedule -} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts b/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts deleted file mode 100644 index b4063584ddd8..000000000000 --- a/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -export { - AccountEncryption, - ActiveDirectory, - Backup, - BackupPatch, - BackupPolicy, - BackupPolicyDetails, - BackupPolicyPatch, - BaseResource, - CapacityPool, - CapacityPoolPatch, - CloudError, - DailySchedule, - ExportPolicyRule, - HourlySchedule, - MonthlySchedule, - MountTargetProperties, - NetAppAccount, - NetAppAccountPatch, - ReplicationObject, - Snapshot, - SnapshotPolicy, - SnapshotsList, - SystemData, - Vault, - Volume, - VolumeBackupProperties, - VolumeBackups, - VolumePatch, - VolumePatchPropertiesDataProtection, - VolumePatchPropertiesExportPolicy, - VolumePropertiesDataProtection, - VolumePropertiesExportPolicy, - VolumeSnapshotProperties, - WeeklySchedule -} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/vaultsMappers.ts b/sdk/netapp/arm-netapp/src/models/vaultsMappers.ts deleted file mode 100644 index f9615cb07883..000000000000 --- a/sdk/netapp/arm-netapp/src/models/vaultsMappers.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -export { - AccountEncryption, - ActiveDirectory, - Backup, - BackupPatch, - BackupPolicy, - BackupPolicyDetails, - BackupPolicyPatch, - BaseResource, - CapacityPool, - CapacityPoolPatch, - CloudError, - DailySchedule, - ExportPolicyRule, - HourlySchedule, - MonthlySchedule, - MountTargetProperties, - NetAppAccount, - NetAppAccountPatch, - ReplicationObject, - Snapshot, - SnapshotPolicy, - SystemData, - Vault, - VaultList, - Volume, - VolumeBackupProperties, - VolumeBackups, - VolumePatch, - VolumePatchPropertiesDataProtection, - VolumePatchPropertiesExportPolicy, - VolumePropertiesDataProtection, - VolumePropertiesExportPolicy, - VolumeSnapshotProperties, - WeeklySchedule -} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/volumesMappers.ts b/sdk/netapp/arm-netapp/src/models/volumesMappers.ts deleted file mode 100644 index 2ec246d0704a..000000000000 --- a/sdk/netapp/arm-netapp/src/models/volumesMappers.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ - -export { - AccountEncryption, - ActiveDirectory, - AuthorizeRequest, - Backup, - BackupPatch, - BackupPolicy, - BackupPolicyDetails, - BackupPolicyPatch, - BaseResource, - BreakReplicationRequest, - CapacityPool, - CapacityPoolPatch, - CloudError, - DailySchedule, - ExportPolicyRule, - HourlySchedule, - MonthlySchedule, - MountTargetProperties, - NetAppAccount, - NetAppAccountPatch, - PoolChangeRequest, - ReplicationObject, - ReplicationStatus, - Snapshot, - SnapshotPolicy, - SystemData, - Vault, - Volume, - VolumeBackupProperties, - VolumeBackups, - VolumeList, - VolumePatch, - VolumePatchPropertiesDataProtection, - VolumePatchPropertiesExportPolicy, - VolumePropertiesDataProtection, - VolumePropertiesExportPolicy, - VolumeRevert, - VolumeSnapshotProperties, - WeeklySchedule -} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/netAppManagementClient.ts b/sdk/netapp/arm-netapp/src/netAppManagementClient.ts new file mode 100644 index 000000000000..52b8477db466 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/netAppManagementClient.ts @@ -0,0 +1,128 @@ +/* + * 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. + */ + +import * as coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { + OperationsImpl, + NetAppResourceImpl, + NetAppResourceQuotaLimitsImpl, + AccountsImpl, + PoolsImpl, + VolumesImpl, + SnapshotsImpl, + SnapshotPoliciesImpl, + BackupsImpl, + AccountBackupsImpl, + BackupPoliciesImpl, + VaultsImpl, + VolumeGroupsImpl +} from "./operations"; +import { + Operations, + NetAppResource, + NetAppResourceQuotaLimits, + Accounts, + Pools, + Volumes, + Snapshots, + SnapshotPolicies, + Backups, + AccountBackups, + BackupPolicies, + Vaults, + VolumeGroups +} from "./operationsInterfaces"; +import { NetAppManagementClientOptionalParams } from "./models"; + +export class NetAppManagementClient extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; + + /** + * Initializes a new instance of the NetAppManagementClient class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription. + * The subscription ID forms part of the URI for every service call. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: NetAppManagementClientOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: NetAppManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-netapp/15.0.0`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "https://management.azure.com" + }; + super(optionsWithDefaults); + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2021-08-01"; + this.operations = new OperationsImpl(this); + this.netAppResource = new NetAppResourceImpl(this); + this.netAppResourceQuotaLimits = new NetAppResourceQuotaLimitsImpl(this); + this.accounts = new AccountsImpl(this); + this.pools = new PoolsImpl(this); + this.volumes = new VolumesImpl(this); + this.snapshots = new SnapshotsImpl(this); + this.snapshotPolicies = new SnapshotPoliciesImpl(this); + this.backups = new BackupsImpl(this); + this.accountBackups = new AccountBackupsImpl(this); + this.backupPolicies = new BackupPoliciesImpl(this); + this.vaults = new VaultsImpl(this); + this.volumeGroups = new VolumeGroupsImpl(this); + } + + operations: Operations; + netAppResource: NetAppResource; + netAppResourceQuotaLimits: NetAppResourceQuotaLimits; + accounts: Accounts; + pools: Pools; + volumes: Volumes; + snapshots: Snapshots; + snapshotPolicies: SnapshotPolicies; + backups: Backups; + accountBackups: AccountBackups; + backupPolicies: BackupPolicies; + vaults: Vaults; + volumeGroups: VolumeGroups; +} diff --git a/sdk/netapp/arm-netapp/src/operations/accountBackups.ts b/sdk/netapp/arm-netapp/src/operations/accountBackups.ts index 75a1b715f5b6..424607038291 100644 --- a/sdk/netapp/arm-netapp/src/operations/accountBackups.ts +++ b/sdk/netapp/arm-netapp/src/operations/accountBackups.ts @@ -3,210 +3,265 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/accountBackupsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { AccountBackups } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Backup, + AccountBackupsListOptionalParams, + AccountBackupsListResponse, + AccountBackupsGetOptionalParams, + AccountBackupsGetResponse, + AccountBackupsDeleteOptionalParams +} from "../models"; -/** Class representing a AccountBackups. */ -export class AccountBackups { - private readonly client: AzureNetAppFilesManagementClientContext; +/// +/** Class containing AccountBackups operations. */ +export class AccountBackupsImpl implements AccountBackups { + private readonly client: NetAppManagementClient; /** - * Create a AccountBackups. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class AccountBackups class. + * @param client Reference to the service client */ - constructor(client: AzureNetAppFilesManagementClientContext) { + constructor(client: NetAppManagementClient) { this.client = client; } /** * List all Backups for a Netapp Account - * @summary List Backups for a Netapp Account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param callback The callback - */ - list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + public list( + resourceGroupName: string, + accountName: string, + options?: AccountBackupsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, accountName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: AccountBackupsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, accountName, options); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: AccountBackupsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options + )) { + yield* page; + } + } + /** + * List all Backups for a Netapp Account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + resourceGroupName: string, + accountName: string, + options?: AccountBackupsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, options }, + listOperationSpec + ); } /** * Gets the specified backup for a Netapp Account - * @summary Get Backup for a Netapp Account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param backupName The name of the backup - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, backupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param backupName The name of the backup - * @param callback The callback - */ - get(resourceGroupName: string, accountName: string, backupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param backupName The name of the backup - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, accountName: string, backupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, backupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + accountName: string, + backupName: string, + options?: AccountBackupsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - backupName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, backupName, options }, + getOperationSpec + ); } /** * Delete the specified Backup for a Netapp Account - * @summary Delete Backup for a Netapp Account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param backupName The name of the backup - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, accountName: string, backupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,accountName,backupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginDelete( + resourceGroupName: string, + accountName: string, + backupName: string, + options?: AccountBackupsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, backupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** * Delete the specified Backup for a Netapp Account - * @summary Delete Backup for a Netapp Account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param backupName The name of the backup - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, accountName: string, backupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - backupName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + backupName: string, + options?: AccountBackupsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + backupName, + options + ); + return poller.pollUntilDone(); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups", + responses: { + 200: { + bodyMapper: Mappers.BackupsList + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.BackupsList + bodyMapper: Mappers.Backup }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.backupName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Backup - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept], serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.backupName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; diff --git a/sdk/netapp/arm-netapp/src/operations/accounts.ts b/sdk/netapp/arm-netapp/src/operations/accounts.ts index 22be6b79a9ce..3c4219a550c0 100644 --- a/sdk/netapp/arm-netapp/src/operations/accounts.ts +++ b/sdk/netapp/arm-netapp/src/operations/accounts.ts @@ -3,295 +3,543 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/accountsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Accounts } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + NetAppAccount, + AccountsListBySubscriptionNextOptionalParams, + AccountsListBySubscriptionOptionalParams, + AccountsListNextOptionalParams, + AccountsListOptionalParams, + AccountsListBySubscriptionResponse, + AccountsListResponse, + AccountsGetOptionalParams, + AccountsGetResponse, + AccountsCreateOrUpdateOptionalParams, + AccountsCreateOrUpdateResponse, + AccountsDeleteOptionalParams, + NetAppAccountPatch, + AccountsUpdateOptionalParams, + AccountsUpdateResponse, + AccountsListBySubscriptionNextResponse, + AccountsListNextResponse +} from "../models"; -/** Class representing a Accounts. */ -export class Accounts { - private readonly client: AzureNetAppFilesManagementClientContext; +/// +/** Class containing Accounts operations. */ +export class AccountsImpl implements Accounts { + private readonly client: NetAppManagementClient; /** - * Create a Accounts. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Accounts class. + * @param client Reference to the service client */ - constructor(client: AzureNetAppFilesManagementClientContext) { + constructor(client: NetAppManagementClient) { this.client = client; } /** - * List and describe all NetApp accounts in the resource group. - * @summary Describe all NetApp Accounts in a resource group - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback + * List and describe all NetApp accounts in the subscription. + * @param options The options parameters. */ - list(resourceGroupName: string, callback: msRest.ServiceCallback): void; + public listBySubscription( + options?: AccountsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: AccountsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: AccountsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + /** + * List and describe all NetApp accounts in the resource group. * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public list( + resourceGroupName: string, + options?: AccountsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: AccountsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( resourceGroupName, + continuationToken, options - }, - listOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: AccountsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } } /** - * Get the NetApp account - * @summary Describe a NetApp Account - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * List and describe all NetApp accounts in the subscription. + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + private _listBySubscription( + options?: AccountsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + /** + * List and describe all NetApp accounts in the resource group. * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + private _list( + resourceGroupName: string, + options?: AccountsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + /** + * Get the NetApp account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + accountName: string, + options?: AccountsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, options }, + getOperationSpec + ); } /** * Create or update the specified NetApp account within the resource group - * @summary Create or update a NetApp account - * @param body NetApp Account object supplied in the body of the operation. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * @param body NetApp Account object supplied in the body of the operation. + * @param options The options parameters. */ - createOrUpdate(body: Models.NetAppAccount, resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(body,resourceGroupName,accountName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + body: NetAppAccount, + options?: AccountsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccountsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, body, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); } /** - * Delete the specified NetApp account - * @summary Delete a NetApp account + * Create or update the specified NetApp account within the resource group * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * @param body NetApp Account object supplied in the body of the operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,accountName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + body: NetAppAccount, + options?: AccountsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + accountName, + body, + options + ); + return poller.pollUntilDone(); } /** - * Patch the specified NetApp account - * @summary Update a NetApp account - * @param body NetApp Account object supplied in the body of the operation. + * Delete the specified NetApp account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update(body: Models.NetAppAccountPatch, resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(body,resourceGroupName,accountName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginDelete( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Create or update the specified NetApp account within the resource group - * @summary Create or update a NetApp account - * @param body NetApp Account object supplied in the body of the operation. + * Delete the specified NetApp account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(body: Models.NetAppAccount, resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - body, - resourceGroupName, - accountName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + options + ); + return poller.pollUntilDone(); } /** - * Delete the specified NetApp account - * @summary Delete a NetApp account + * Patch the specified NetApp account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * @param body NetApp Account object supplied in the body of the operation. + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginUpdate( + resourceGroupName: string, + accountName: string, + body: NetAppAccountPatch, + options?: AccountsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccountsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, body, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** * Patch the specified NetApp account - * @summary Update a NetApp account - * @param body NetApp Account object supplied in the body of the operation. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * @param body NetApp Account object supplied in the body of the operation. + * @param options The options parameters. */ - beginUpdate(body: Models.NetAppAccountPatch, resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - body, - resourceGroupName, - accountName, - options - }, - beginUpdateOperationSpec, - options); + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + body: NetAppAccountPatch, + options?: AccountsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + body, + options + ); + return poller.pollUntilDone(); } /** - * List and describe all NetApp accounts in the resource group. - * @summary Describe all NetApp Accounts in a resource group - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + private _listBySubscriptionNext( + nextLink: string, + options?: AccountsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListNext + * @param resourceGroupName The name of the resource group. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + resourceGroupName: string, + nextLink: string, + options?: AccountsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.NetAppAccountList }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const getOperationSpec: msRest.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}", + responses: { + 200: { + bodyMapper: Mappers.NetAppAccountList + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.NetAppAccount }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.NetAppAccount, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.NetAppAccount @@ -299,92 +547,107 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.NetAppAccount }, - default: { - bodyMapper: Mappers.CloudError - } + 202: { + bodyMapper: Mappers.NetAppAccount + }, + 204: { + bodyMapper: Mappers.NetAppAccount + }, + default: {} }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}", + requestBody: Parameters.body3, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}", +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.NetAppAccountPatch, - required: true - } - }, + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.NetAppAccount }, + 201: { + bodyMapper: Mappers.NetAppAccount + }, 202: { bodyMapper: Mappers.NetAppAccount }, + 204: { + bodyMapper: Mappers.NetAppAccount + }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetAppAccountList + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.NetAppAccountList }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts b/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts index 089ec70f15c0..fa08e6495395 100644 --- a/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts +++ b/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts @@ -3,286 +3,454 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/backupPoliciesMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { BackupPolicies } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + BackupPolicy, + BackupPoliciesListOptionalParams, + BackupPoliciesListResponse, + BackupPoliciesGetOptionalParams, + BackupPoliciesGetResponse, + BackupPoliciesCreateOptionalParams, + BackupPoliciesCreateResponse, + BackupPolicyPatch, + BackupPoliciesUpdateOptionalParams, + BackupPoliciesUpdateResponse, + BackupPoliciesDeleteOptionalParams +} from "../models"; -/** Class representing a BackupPolicies. */ -export class BackupPolicies { - private readonly client: AzureNetAppFilesManagementClientContext; +/// +/** Class containing BackupPolicies operations. */ +export class BackupPoliciesImpl implements BackupPolicies { + private readonly client: NetAppManagementClient; /** - * Create a BackupPolicies. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class BackupPolicies class. + * @param client Reference to the service client */ - constructor(client: AzureNetAppFilesManagementClientContext) { + constructor(client: NetAppManagementClient) { this.client = client; } /** * List backup policies for Netapp Account - * @summary List backup policies * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param callback The callback - */ - list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + public list( + resourceGroupName: string, + accountName: string, + options?: BackupPoliciesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, accountName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: BackupPoliciesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, accountName, options); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: BackupPoliciesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options + )) { + yield* page; + } + } + /** + * List backup policies for Netapp Account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + resourceGroupName: string, + accountName: string, + options?: BackupPoliciesListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, options }, + listOperationSpec + ); } /** * Get a particular backup Policy - * @summary Get a backup Policy - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, accountName: string, backupPolicyName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param callback The callback - */ - get(resourceGroupName: string, accountName: string, backupPolicyName: string, callback: msRest.ServiceCallback): void; - /** * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, backupPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, backupPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + options?: BackupPoliciesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - backupPolicyName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, backupPolicyName, options }, + getOperationSpec + ); } /** * Create a backup policy for Netapp Account - * @summary Create a backup policy * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param backupPolicyName Backup policy Name which uniquely identify backup policy. * @param body Backup policy object supplied in the body of the operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - create(resourceGroupName: string, accountName: string, backupPolicyName: string, body: Models.BackupPolicy, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(resourceGroupName,accountName,backupPolicyName,body,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreate( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + body: BackupPolicy, + options?: BackupPoliciesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + BackupPoliciesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, backupPolicyName, body, options }, + createOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); } /** - * Patch a backup policy for Netapp Account - * @summary Patch a backup policy + * Create a backup policy for Netapp Account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param backupPolicyName Backup policy Name which uniquely identify backup policy. * @param body Backup policy object supplied in the body of the operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update(resourceGroupName: string, accountName: string, backupPolicyName: string, body: Models.BackupPolicyPatch, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,accountName,backupPolicyName,body,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateAndWait( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + body: BackupPolicy, + options?: BackupPoliciesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + accountName, + backupPolicyName, + body, + options + ); + return poller.pollUntilDone(); } /** - * Delete backup policy - * @summary Delete a backup policy + * Patch a backup policy for Netapp Account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param [options] The optional parameters - * @returns Promise + * @param body Backup policy object supplied in the body of the operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, accountName: string, backupPolicyName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,accountName,backupPolicyName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginUpdate( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + body: BackupPolicyPatch, + options?: BackupPoliciesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + BackupPoliciesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, backupPolicyName, body, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); } /** - * Create a backup policy for Netapp Account - * @summary Create a backup policy + * Patch a backup policy for Netapp Account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param backupPolicyName Backup policy Name which uniquely identify backup policy. * @param body Backup policy object supplied in the body of the operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreate(resourceGroupName: string, accountName: string, backupPolicyName: string, body: Models.BackupPolicy, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - backupPolicyName, - body, - options - }, - beginCreateOperationSpec, - options); + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + body: BackupPolicyPatch, + options?: BackupPoliciesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + backupPolicyName, + body, + options + ); + return poller.pollUntilDone(); } /** - * Patch a backup policy for Netapp Account - * @summary Patch a backup policy + * Delete backup policy * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy object supplied in the body of the operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, accountName: string, backupPolicyName: string, body: Models.BackupPolicyPatch, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - backupPolicyName, - body, - options - }, - beginUpdateOperationSpec, - options); + async beginDelete( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + options?: BackupPoliciesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, backupPolicyName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** * Delete backup policy - * @summary Delete a backup policy * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, accountName: string, backupPolicyName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - backupPolicyName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + options?: BackupPoliciesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + backupPolicyName, + options + ); + return poller.pollUntilDone(); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.BackupPoliciesList }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName, - Parameters.backupPolicyName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.accountName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.BackupPolicy }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.backupPolicyName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.BackupPolicy, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.BackupPolicy @@ -290,72 +458,71 @@ const beginCreateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.BackupPolicy }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } + 202: { + bodyMapper: Mappers.BackupPolicy + }, + 204: { + bodyMapper: Mappers.BackupPolicy + }, + default: {} }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", + requestBody: Parameters.body19, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.backupPolicyName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.BackupPolicyPatch, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.BackupPolicy }, + 201: { + bodyMapper: Mappers.BackupPolicy + }, 202: { bodyMapper: Mappers.BackupPolicy }, - default: { - bodyMapper: Mappers.CloudError - } + 204: { + bodyMapper: Mappers.BackupPolicy + }, + default: {} }, + requestBody: Parameters.body20, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.backupPolicyName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.backupPolicyName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; diff --git a/sdk/netapp/arm-netapp/src/operations/backups.ts b/sdk/netapp/arm-netapp/src/operations/backups.ts index ab8b56d46fbf..3c8ff14640ba 100644 --- a/sdk/netapp/arm-netapp/src/operations/backups.ts +++ b/sdk/netapp/arm-netapp/src/operations/backups.ts @@ -3,311 +3,490 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/backupsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Backups } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Backup, + BackupsListOptionalParams, + BackupsGetStatusOptionalParams, + BackupsGetStatusResponse, + BackupsGetVolumeRestoreStatusOptionalParams, + BackupsGetVolumeRestoreStatusResponse, + BackupsListResponse, + BackupsGetOptionalParams, + BackupsGetResponse, + BackupsCreateOptionalParams, + BackupsCreateResponse, + BackupsUpdateOptionalParams, + BackupsUpdateResponse, + BackupsDeleteOptionalParams +} from "../models"; -/** Class representing a Backups. */ -export class Backups { - private readonly client: AzureNetAppFilesManagementClientContext; +/// +/** Class containing Backups operations. */ +export class BackupsImpl implements Backups { + private readonly client: NetAppManagementClient; /** - * Create a Backups. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Backups class. + * @param client Reference to the service client */ - constructor(client: AzureNetAppFilesManagementClientContext) { + constructor(client: NetAppManagementClient) { this.client = client; } /** - * Get the status of the backup for a volume - * @summary Get volume's backup status - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise - */ - getStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; - /** + * List all backups for a volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param callback The callback + * @param options The options parameters. */ - getStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; + public list( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: BackupsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: BackupsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: BackupsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + poolName, + volumeName, + options + )) { + yield* page; + } + } + /** + * Get the status of the backup for a volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - getStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getStatus( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: BackupsGetStatusOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - getStatusOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, poolName, volumeName, options }, + getStatusOperationSpec + ); } /** * Get the status of the restore for a volume - * @summary Get volume's restore status - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise - */ - getVolumeRestoreStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; - /** * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param callback The callback + * @param options The options parameters. */ - getVolumeRestoreStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback - */ - getVolumeRestoreStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getVolumeRestoreStatus(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getVolumeRestoreStatus( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: BackupsGetVolumeRestoreStatusOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - getVolumeRestoreStatusOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, poolName, volumeName, options }, + getVolumeRestoreStatusOperationSpec + ); } /** * List all backups for a volume - * @summary List Backups * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param callback The callback - */ - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; + private _list( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: BackupsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, poolName, volumeName, options }, + listOperationSpec + ); + } + /** + * Gets the specified backup of the volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback + * @param backupName The name of the backup + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + options?: BackupsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, poolName, volumeName, + backupName, options }, - listOperationSpec, - callback) as Promise; + getOperationSpec + ); } /** - * Gets the specified backup of the volume - * @summary Get a backup - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param backupName The name of the backup - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param backupName The name of the backup - * @param callback The callback - */ - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, callback: msRest.ServiceCallback): void; - /** + * Create a backup for the volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param backupName The name of the backup - * @param options The optional parameters - * @param callback The callback + * @param body Backup object supplied in the body of the operation. + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + async beginCreate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + body: Backup, + options?: BackupsCreateOptionalParams + ): Promise< + PollerLike, BackupsCreateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { resourceGroupName, accountName, poolName, volumeName, backupName, + body, options }, - getOperationSpec, - callback) as Promise; + createOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** * Create a backup for the volume - * @summary Create a backup * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param backupName The name of the backup * @param body Backup object supplied in the body of the operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - create(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, body: Models.Backup, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(resourceGroupName,accountName,poolName,volumeName,backupName,body,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + body: Backup, + options?: BackupsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + accountName, + poolName, + volumeName, + backupName, + body, + options + ); + return poller.pollUntilDone(); } /** * Patch a backup for the volume - * @summary Patch a backup - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param backupName The name of the backup - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: Models.BackupsUpdateOptionalParams): Promise { - return this.beginUpdate(resourceGroupName,accountName,poolName,volumeName,backupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Delete a backup of the volume - * @summary Delete backup * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param backupName The name of the backup - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,accountName,poolName,volumeName,backupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } + async beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + options?: BackupsUpdateOptionalParams + ): Promise< + PollerLike, BackupsUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Create a backup for the volume - * @summary Create a backup - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param backupName The name of the backup - * @param body Backup object supplied in the body of the operation. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, body: Models.Backup, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + const lro = new LroImpl( + sendOperation, { resourceGroupName, accountName, poolName, volumeName, backupName, - body, options }, - beginCreateOperationSpec, - options); + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** * Patch a backup for the volume - * @summary Patch a backup * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param backupName The name of the backup - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: Models.BackupsBeginUpdateOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - backupName, - options - }, - beginUpdateOperationSpec, - options); + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + options?: BackupsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + poolName, + volumeName, + backupName, + options + ); + return poller.pollUntilDone(); } /** * Delete a backup of the volume - * @summary Delete backup * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param backupName The name of the backup - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + async beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + options?: BackupsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { resourceGroupName, accountName, @@ -316,126 +495,125 @@ export class Backups { backupName, options }, - beginDeleteMethodOperationSpec, - options); + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } -} + /** + * Delete a backup of the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param backupName The name of the backup + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + options?: BackupsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + poolName, + volumeName, + backupName, + options + ); + return poller.pollUntilDone(); + } +} // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getStatusOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getStatusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.poolName, - Parameters.volumeName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.BackupStatus }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const getVolumeRestoreStatusOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/restoreStatus", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const getVolumeRestoreStatusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/restoreStatus", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RestoreStatus }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.BackupsList }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, - Parameters.volumeName, - Parameters.backupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.volumeName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Backup }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, @@ -443,19 +621,13 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.volumeName, Parameters.backupName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.Backup, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Backup @@ -463,18 +635,18 @@ const beginCreateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.Backup }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } + 202: { + bodyMapper: Mappers.Backup + }, + 204: { + bodyMapper: Mappers.Backup + }, + default: {} }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", + requestBody: Parameters.body17, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, @@ -482,37 +654,52 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.volumeName, Parameters.backupName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: [ - "options", - "body" - ], - mapper: Mappers.BackupPatch - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.Backup }, + 201: { + bodyMapper: Mappers.Backup + }, 202: { bodyMapper: Mappers.Backup }, - default: { - bodyMapper: Mappers.CloudError - } + 204: { + bodyMapper: Mappers.Backup + }, + default: {} }, + requestBody: Parameters.body18, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName, + Parameters.backupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, @@ -520,19 +707,5 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.volumeName, Parameters.backupName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; diff --git a/sdk/netapp/arm-netapp/src/operations/index.ts b/sdk/netapp/arm-netapp/src/operations/index.ts index bd1cd443318d..f7bd6727d8ca 100644 --- a/sdk/netapp/arm-netapp/src/operations/index.ts +++ b/sdk/netapp/arm-netapp/src/operations/index.ts @@ -3,12 +3,12 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export * from "./operations"; export * from "./netAppResource"; +export * from "./netAppResourceQuotaLimits"; export * from "./accounts"; export * from "./pools"; export * from "./volumes"; @@ -18,3 +18,4 @@ export * from "./backups"; export * from "./accountBackups"; export * from "./backupPolicies"; export * from "./vaults"; +export * from "./volumeGroups"; diff --git a/sdk/netapp/arm-netapp/src/operations/netAppResource.ts b/sdk/netapp/arm-netapp/src/operations/netAppResource.ts index 4153de10130d..770dfb59b84b 100644 --- a/sdk/netapp/arm-netapp/src/operations/netAppResource.ts +++ b/sdk/netapp/arm-netapp/src/operations/netAppResource.ts @@ -3,271 +3,179 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/netAppResourceMappers"; +import { NetAppResource } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { + CheckNameResourceTypes, + NetAppResourceCheckNameAvailabilityOptionalParams, + NetAppResourceCheckNameAvailabilityResponse, + NetAppResourceCheckFilePathAvailabilityOptionalParams, + NetAppResourceCheckFilePathAvailabilityResponse, + CheckQuotaNameResourceTypes, + NetAppResourceCheckQuotaAvailabilityOptionalParams, + NetAppResourceCheckQuotaAvailabilityResponse +} from "../models"; -/** Class representing a NetAppResource. */ -export class NetAppResource { - private readonly client: AzureNetAppFilesManagementClientContext; +/** Class containing NetAppResource operations. */ +export class NetAppResourceImpl implements NetAppResource { + private readonly client: NetAppManagementClient; /** - * Create a NetAppResource. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class NetAppResource class. + * @param client Reference to the service client */ - constructor(client: AzureNetAppFilesManagementClientContext) { + constructor(client: NetAppManagementClient) { this.client = client; } /** * Check if a resource name is available. - * @summary Check resource name availability * @param location The location * @param name Resource name to verify. - * @param type Resource type used for verification. Possible values include: - * 'Microsoft.NetApp/netAppAccounts', 'Microsoft.NetApp/netAppAccounts/capacityPools', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' * @param resourceGroup Resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param typeParam Resource type used for verification. + * @param options The options parameters. */ - checkNameAvailability(location: string, name: string, type: Models.CheckNameResourceTypes, resourceGroup: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The location - * @param name Resource name to verify. - * @param type Resource type used for verification. Possible values include: - * 'Microsoft.NetApp/netAppAccounts', 'Microsoft.NetApp/netAppAccounts/capacityPools', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' - * @param resourceGroup Resource group name. - * @param callback The callback - */ - checkNameAvailability(location: string, name: string, type: Models.CheckNameResourceTypes, resourceGroup: string, callback: msRest.ServiceCallback): void; - /** - * @param location The location - * @param name Resource name to verify. - * @param type Resource type used for verification. Possible values include: - * 'Microsoft.NetApp/netAppAccounts', 'Microsoft.NetApp/netAppAccounts/capacityPools', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' - * @param resourceGroup Resource group name. - * @param options The optional parameters - * @param callback The callback - */ - checkNameAvailability(location: string, name: string, type: Models.CheckNameResourceTypes, resourceGroup: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkNameAvailability(location: string, name: string, type: Models.CheckNameResourceTypes, resourceGroup: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + checkNameAvailability( + location: string, + name: string, + resourceGroup: string, + typeParam: CheckNameResourceTypes, + options?: NetAppResourceCheckNameAvailabilityOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - name, - type, - resourceGroup, - options - }, - checkNameAvailabilityOperationSpec, - callback) as Promise; + { location, name, resourceGroup, typeParam, options }, + checkNameAvailabilityOperationSpec + ); } /** * Check if a file path is available. - * @summary Check file path availability * @param location The location * @param name File path to verify. * @param subnetId The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes - * @param [options] The optional parameters - * @returns Promise + * Microsoft.NetApp/volumes + * @param options The options parameters. */ - checkFilePathAvailability(location: string, name: string, subnetId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The location - * @param name File path to verify. - * @param subnetId The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes - * @param callback The callback - */ - checkFilePathAvailability(location: string, name: string, subnetId: string, callback: msRest.ServiceCallback): void; - /** - * @param location The location - * @param name File path to verify. - * @param subnetId The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes - * @param options The optional parameters - * @param callback The callback - */ - checkFilePathAvailability(location: string, name: string, subnetId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkFilePathAvailability(location: string, name: string, subnetId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + checkFilePathAvailability( + location: string, + name: string, + subnetId: string, + options?: NetAppResourceCheckFilePathAvailabilityOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - name, - subnetId, - options - }, - checkFilePathAvailabilityOperationSpec, - callback) as Promise; + { location, name, subnetId, options }, + checkFilePathAvailabilityOperationSpec + ); } /** * Check if a quota is available. - * @summary Check quota availability * @param location The location * @param name Name of the resource to verify. - * @param type Resource type used for verification. Possible values include: - * 'Microsoft.NetApp/netAppAccounts', 'Microsoft.NetApp/netAppAccounts/capacityPools', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' * @param resourceGroup Resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param typeParam Resource type used for verification. + * @param options The options parameters. */ - checkQuotaAvailability(location: string, name: string, type: Models.CheckQuotaNameResourceTypes, resourceGroup: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The location - * @param name Name of the resource to verify. - * @param type Resource type used for verification. Possible values include: - * 'Microsoft.NetApp/netAppAccounts', 'Microsoft.NetApp/netAppAccounts/capacityPools', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' - * @param resourceGroup Resource group name. - * @param callback The callback - */ - checkQuotaAvailability(location: string, name: string, type: Models.CheckQuotaNameResourceTypes, resourceGroup: string, callback: msRest.ServiceCallback): void; - /** - * @param location The location - * @param name Name of the resource to verify. - * @param type Resource type used for verification. Possible values include: - * 'Microsoft.NetApp/netAppAccounts', 'Microsoft.NetApp/netAppAccounts/capacityPools', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', - * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' - * @param resourceGroup Resource group name. - * @param options The optional parameters - * @param callback The callback - */ - checkQuotaAvailability(location: string, name: string, type: Models.CheckQuotaNameResourceTypes, resourceGroup: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkQuotaAvailability(location: string, name: string, type: Models.CheckQuotaNameResourceTypes, resourceGroup: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + checkQuotaAvailability( + location: string, + name: string, + resourceGroup: string, + typeParam: CheckQuotaNameResourceTypes, + options?: NetAppResourceCheckQuotaAvailabilityOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - name, - type, - resourceGroup, - options - }, - checkQuotaAvailabilityOperationSpec, - callback) as Promise; + { location, name, resourceGroup, typeParam, options }, + checkQuotaAvailabilityOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability", - urlParameters: [ - Parameters.subscriptionId, - Parameters.location - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - name: "name", - type: "type", - resourceGroup: "resourceGroup" - }, - mapper: { - ...Mappers.ResourceNameAvailabilityRequest, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.CheckAvailabilityResponse }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const checkFilePathAvailabilityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability", - urlParameters: [ - Parameters.subscriptionId, - Parameters.location - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], requestBody: { parameterPath: { - name: "name", - subnetId: "subnetId" + name: ["name"], + typeParam: ["typeParam"], + resourceGroup: ["resourceGroup"] }, - mapper: { - ...Mappers.FilePathAvailabilityRequest, - required: true - } + mapper: { ...Mappers.ResourceNameAvailabilityRequest, required: true } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const checkFilePathAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.CheckAvailabilityResponse }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const checkQuotaAvailabilityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability", + requestBody: { + parameterPath: { name: ["name"], subnetId: ["subnetId"] }, + mapper: { ...Mappers.FilePathAvailabilityRequest, required: true } + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.location ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - name: "name", - type: "type", - resourceGroup: "resourceGroup" - }, - mapper: { - ...Mappers.QuotaAvailabilityRequest, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const checkQuotaAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.CheckAvailabilityResponse }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} + }, + requestBody: { + parameterPath: { + name: ["name"], + typeParam: ["typeParam"], + resourceGroup: ["resourceGroup"] + }, + mapper: { ...Mappers.QuotaAvailabilityRequest, required: true } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; diff --git a/sdk/netapp/arm-netapp/src/operations/netAppResourceQuotaLimits.ts b/sdk/netapp/arm-netapp/src/operations/netAppResourceQuotaLimits.ts new file mode 100644 index 000000000000..790feae5e260 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operations/netAppResourceQuotaLimits.ts @@ -0,0 +1,150 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { NetAppResourceQuotaLimits } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { + SubscriptionQuotaItem, + NetAppResourceQuotaLimitsListOptionalParams, + NetAppResourceQuotaLimitsListResponse, + NetAppResourceQuotaLimitsGetOptionalParams, + NetAppResourceQuotaLimitsGetResponse +} from "../models"; + +/// +/** Class containing NetAppResourceQuotaLimits operations. */ +export class NetAppResourceQuotaLimitsImpl + implements NetAppResourceQuotaLimits { + private readonly client: NetAppManagementClient; + + /** + * Initialize a new instance of the class NetAppResourceQuotaLimits class. + * @param client Reference to the service client + */ + constructor(client: NetAppManagementClient) { + this.client = client; + } + + /** + * Get the default and current limits for quotas + * @param location The location + * @param options The options parameters. + */ + public list( + location: string, + options?: NetAppResourceQuotaLimitsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, options); + } + }; + } + + private async *listPagingPage( + location: string, + options?: NetAppResourceQuotaLimitsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + options?: NetAppResourceQuotaLimitsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } + } + + /** + * Get the default and current limits for quotas + * @param location The location + * @param options The options parameters. + */ + private _list( + location: string, + options?: NetAppResourceQuotaLimitsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listOperationSpec + ); + } + + /** + * Get the default and current subscription quota limit + * @param location The location + * @param quotaLimitName The name of the Quota Limit + * @param options The options parameters. + */ + get( + location: string, + quotaLimitName: string, + options?: NetAppResourceQuotaLimitsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, quotaLimitName, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionQuotaItemList + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubscriptionQuotaItem + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.quotaLimitName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/netapp/arm-netapp/src/operations/operations.ts b/sdk/netapp/arm-netapp/src/operations/operations.ts index f257b21ae248..cf6f8a4c0a61 100644 --- a/sdk/netapp/arm-netapp/src/operations/operations.ts +++ b/sdk/netapp/arm-netapp/src/operations/operations.ts @@ -3,72 +3,94 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/operationsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { + Operation, + OperationsListOptionalParams, + OperationsListResponse +} from "../models"; -/** Class representing a Operations. */ -export class Operations { - private readonly client: AzureNetAppFilesManagementClientContext; +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: NetAppManagementClient; /** - * Create a Operations. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client */ - constructor(client: AzureNetAppFilesManagementClientContext) { + constructor(client: NetAppManagementClient) { this.client = client; } /** * Lists all of the available Microsoft.NetApp Rest API operations - * @summary Describes the Resource Provider - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + /** - * @param options The optional parameters - * @param callback The callback + * Lists all of the available Microsoft.NetApp Rest API operations + * @param options The options parameters. */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.NetApp/operations", httpMethod: "GET", - path: "providers/Microsoft.NetApp/operations", - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.OperationListResult }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/netapp/arm-netapp/src/operations/pools.ts b/sdk/netapp/arm-netapp/src/operations/pools.ts index 54a1fac737a9..5f4413586682 100644 --- a/sdk/netapp/arm-netapp/src/operations/pools.ts +++ b/sdk/netapp/arm-netapp/src/operations/pools.ts @@ -3,315 +3,515 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/poolsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Pools } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + CapacityPool, + PoolsListNextOptionalParams, + PoolsListOptionalParams, + PoolsListResponse, + PoolsGetOptionalParams, + PoolsGetResponse, + PoolsCreateOrUpdateOptionalParams, + PoolsCreateOrUpdateResponse, + CapacityPoolPatch, + PoolsUpdateOptionalParams, + PoolsUpdateResponse, + PoolsDeleteOptionalParams, + PoolsListNextResponse +} from "../models"; -/** Class representing a Pools. */ -export class Pools { - private readonly client: AzureNetAppFilesManagementClientContext; +/// +/** Class containing Pools operations. */ +export class PoolsImpl implements Pools { + private readonly client: NetAppManagementClient; /** - * Create a Pools. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Pools class. + * @param client Reference to the service client */ - constructor(client: AzureNetAppFilesManagementClientContext) { + constructor(client: NetAppManagementClient) { this.client = client; } /** * List all capacity pools in the NetApp Account - * @summary Describe all Capacity Pools * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param callback The callback - */ - list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public list( + resourceGroupName: string, + accountName: string, + options?: PoolsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, accountName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: PoolsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, accountName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( resourceGroupName, accountName, + continuationToken, options - }, - listOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: PoolsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options + )) { + yield* page; + } } /** - * Get details of the specified capacity pool - * @summary Describe a Capacity Pool - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise; - /** + * List all capacity pools in the NetApp Account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, poolName: string, callback: msRest.ServiceCallback): void; + private _list( + resourceGroupName: string, + accountName: string, + options?: PoolsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listOperationSpec + ); + } + /** + * Get details of the specified capacity pool * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, poolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + accountName: string, + poolName: string, + options?: PoolsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - poolName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, poolName, options }, + getOperationSpec + ); } /** * Create or Update a capacity pool - * @summary Create or Update the specified capacity pool within the resource group - * @param body Capacity pool object supplied in the body of the operation. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool - * @param [options] The optional parameters - * @returns Promise + * @param body Capacity pool object supplied in the body of the operation. + * @param options The options parameters. */ - createOrUpdate(body: Models.CapacityPool, resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(body,resourceGroupName,accountName,poolName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + body: CapacityPool, + options?: PoolsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PoolsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, body, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Patch the specified capacity pool - * @summary Update a capacity pool - * @param body Capacity pool object supplied in the body of the operation. + * Create or Update a capacity pool * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool - * @param [options] The optional parameters - * @returns Promise + * @param body Capacity pool object supplied in the body of the operation. + * @param options The options parameters. */ - update(body: Models.CapacityPoolPatch, resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(body,resourceGroupName,accountName,poolName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + body: CapacityPool, + options?: PoolsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + accountName, + poolName, + body, + options + ); + return poller.pollUntilDone(); } /** - * Delete the specified capacity pool - * @summary Delete a capacity pool + * Patch the specified capacity pool * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool - * @param [options] The optional parameters - * @returns Promise + * @param body Capacity pool object supplied in the body of the operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,accountName,poolName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + body: CapacityPoolPatch, + options?: PoolsUpdateOptionalParams + ): Promise< + PollerLike, PoolsUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, body, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Create or Update a capacity pool - * @summary Create or Update the specified capacity pool within the resource group - * @param body Capacity pool object supplied in the body of the operation. + * Patch the specified capacity pool * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool - * @param [options] The optional parameters - * @returns Promise + * @param body Capacity pool object supplied in the body of the operation. + * @param options The options parameters. */ - beginCreateOrUpdate(body: Models.CapacityPool, resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - body, - resourceGroupName, - accountName, - poolName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + body: CapacityPoolPatch, + options?: PoolsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + poolName, + body, + options + ); + return poller.pollUntilDone(); } /** - * Patch the specified capacity pool - * @summary Update a capacity pool - * @param body Capacity pool object supplied in the body of the operation. + * Delete the specified capacity pool * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(body: Models.CapacityPoolPatch, resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - body, - resourceGroupName, - accountName, - poolName, - options - }, - beginUpdateOperationSpec, - options); + async beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + options?: PoolsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** * Delete the specified capacity pool - * @summary Delete a capacity pool * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + options?: PoolsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + poolName, + options + ); + return poller.pollUntilDone(); } /** - * List all capacity pools in the NetApp Account - * @summary Describe all Capacity Pools - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListNext + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: PoolsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools", + responses: { + 200: { + bodyMapper: Mappers.CapacityPoolList + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CapacityPoolList + bodyMapper: Mappers.CapacityPool }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.CapacityPool }, - default: { - bodyMapper: Mappers.CloudError - } + 201: { + bodyMapper: Mappers.CapacityPool + }, + 202: { + bodyMapper: Mappers.CapacityPool + }, + 204: { + bodyMapper: Mappers.CapacityPool + }, + default: {} }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", + requestBody: Parameters.body5, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.CapacityPool, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.CapacityPool @@ -319,92 +519,59 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.CapacityPool }, - default: { - bodyMapper: Mappers.CloudError - } + 202: { + bodyMapper: Mappers.CapacityPool + }, + 204: { + bodyMapper: Mappers.CapacityPool + }, + default: {} }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", + requestBody: Parameters.body6, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.CapacityPoolPatch, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CapacityPool - }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CapacityPoolList }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts b/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts index 1e5b9c72c5f8..fc2b1d058bd6 100644 --- a/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts +++ b/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts @@ -3,26 +3,43 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/snapshotPoliciesMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SnapshotPolicies } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + SnapshotPolicy, + SnapshotPoliciesListOptionalParams, + SnapshotPoliciesListResponse, + SnapshotPoliciesGetOptionalParams, + SnapshotPoliciesGetResponse, + SnapshotPoliciesCreateOptionalParams, + SnapshotPoliciesCreateResponse, + SnapshotPolicyPatch, + SnapshotPoliciesUpdateOptionalParams, + SnapshotPoliciesUpdateResponse, + SnapshotPoliciesDeleteOptionalParams, + SnapshotPoliciesListVolumesOptionalParams, + SnapshotPoliciesListVolumesResponse +} from "../models"; -/** Class representing a SnapshotPolicies. */ -export class SnapshotPolicies { - private readonly client: AzureNetAppFilesManagementClientContext; +/// +/** Class containing SnapshotPolicies operations. */ +export class SnapshotPoliciesImpl implements SnapshotPolicies { + private readonly client: NetAppManagementClient; /** - * Create a SnapshotPolicies. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class SnapshotPolicies class. + * @param client Reference to the service client */ - constructor(client: AzureNetAppFilesManagementClientContext) { + constructor(client: NetAppManagementClient) { this.client = client; } @@ -30,292 +47,382 @@ export class SnapshotPolicies { * List snapshot policy * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param callback The callback - */ - list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + public list( + resourceGroupName: string, + accountName: string, + options?: SnapshotPoliciesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, accountName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: SnapshotPoliciesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, accountName, options); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: SnapshotPoliciesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options + )) { + yield* page; + } + } + /** + * List snapshot policy * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + resourceGroupName: string, + accountName: string, + options?: SnapshotPoliciesListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, options }, + listOperationSpec + ); } /** * Get a snapshot Policy * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param callback The callback - */ - get(resourceGroupName: string, accountName: string, snapshotPolicyName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param options The optional parameters - * @param callback The callback + * @param snapshotPolicyName The name of the snapshot policy + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + options?: SnapshotPoliciesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - snapshotPolicyName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, snapshotPolicyName, options }, + getOperationSpec + ); } /** * Create a snapshot policy - * @param body Snapshot policy object supplied in the body of the operation. - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param [options] The optional parameters - * @returns Promise - */ - create(body: Models.SnapshotPolicy, resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param body Snapshot policy object supplied in the body of the operation. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param callback The callback - */ - create(body: Models.SnapshotPolicy, resourceGroupName: string, accountName: string, snapshotPolicyName: string, callback: msRest.ServiceCallback): void; - /** + * @param snapshotPolicyName The name of the snapshot policy * @param body Snapshot policy object supplied in the body of the operation. - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - create(body: Models.SnapshotPolicy, resourceGroupName: string, accountName: string, snapshotPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(body: Models.SnapshotPolicy, resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + body: SnapshotPolicy, + options?: SnapshotPoliciesCreateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - body, - resourceGroupName, - accountName, - snapshotPolicyName, - options - }, - createOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, snapshotPolicyName, body, options }, + createOperationSpec + ); } /** * Patch a snapshot policy - * @param body Snapshot policy object supplied in the body of the operation. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param [options] The optional parameters - * @returns Promise + * @param snapshotPolicyName The name of the snapshot policy + * @param body Snapshot policy object supplied in the body of the operation. + * @param options The options parameters. */ - update(body: Models.SnapshotPolicyPatch, resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(body,resourceGroupName,accountName,snapshotPolicyName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginUpdate( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + body: SnapshotPolicyPatch, + options?: SnapshotPoliciesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotPoliciesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, snapshotPolicyName, body, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Delete snapshot policy + * Patch a snapshot policy * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param [options] The optional parameters - * @returns Promise + * @param snapshotPolicyName The name of the snapshot policy + * @param body Snapshot policy object supplied in the body of the operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,accountName,snapshotPolicyName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + body: SnapshotPolicyPatch, + options?: SnapshotPoliciesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + snapshotPolicyName, + body, + options + ); + return poller.pollUntilDone(); } /** - * Get volumes associated with snapshot policy - * @summary Get volumes for snapshot policy - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param [options] The optional parameters - * @returns Promise - */ - listVolumes(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param callback The callback - */ - listVolumes(resourceGroupName: string, accountName: string, snapshotPolicyName: string, callback: msRest.ServiceCallback): void; - /** + * Delete snapshot policy * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param options The optional parameters - * @param callback The callback + * @param snapshotPolicyName The name of the snapshot policy + * @param options The options parameters. */ - listVolumes(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listVolumes(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - snapshotPolicyName, - options - }, - listVolumesOperationSpec, - callback) as Promise; + async beginDelete( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + options?: SnapshotPoliciesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, snapshotPolicyName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Patch a snapshot policy - * @param body Snapshot policy object supplied in the body of the operation. + * Delete snapshot policy * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param [options] The optional parameters - * @returns Promise + * @param snapshotPolicyName The name of the snapshot policy + * @param options The options parameters. */ - beginUpdate(body: Models.SnapshotPolicyPatch, resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - body, - resourceGroupName, - accountName, - snapshotPolicyName, - options - }, - beginUpdateOperationSpec, - options); + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + options?: SnapshotPoliciesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + snapshotPolicyName, + options + ); + return poller.pollUntilDone(); } /** - * Delete snapshot policy + * Get volumes associated with snapshot policy * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param snapshotPolicyName The name of the snapshot policy target - * @param [options] The optional parameters - * @returns Promise + * @param snapshotPolicyName The name of the snapshot policy + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - snapshotPolicyName, - options - }, - beginDeleteMethodOperationSpec, - options); + listVolumes( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + options?: SnapshotPoliciesListVolumesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, snapshotPolicyName, options }, + listVolumesOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies", + responses: { + 200: { + bodyMapper: Mappers.SnapshotPoliciesList + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SnapshotPoliciesList + bodyMapper: Mappers.SnapshotPolicy }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.snapshotPolicyName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.SnapshotPolicy }, - default: { - bodyMapper: Mappers.CloudError - } + 201: { + bodyMapper: Mappers.SnapshotPolicy + }, + default: {} }, - serializer -}; - -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", + requestBody: Parameters.body15, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.snapshotPolicyName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.SnapshotPolicy, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.SnapshotPolicy @@ -323,97 +430,60 @@ const createOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.SnapshotPolicy }, - default: { - bodyMapper: Mappers.CloudError - } + 202: { + bodyMapper: Mappers.SnapshotPolicy + }, + 204: { + bodyMapper: Mappers.SnapshotPolicy + }, + default: {} }, - serializer -}; - -const listVolumesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/volumes", + requestBody: Parameters.body16, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.snapshotPolicyName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.SnapshotPolicyVolumeList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.snapshotPolicyName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.SnapshotPolicyPatch, - required: true - } - }, + serializer +}; +const listVolumesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/volumes", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SnapshotPolicy - }, - 202: { - bodyMapper: Mappers.SnapshotPolicy + bodyMapper: Mappers.SnapshotPolicyVolumeList }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.snapshotPolicyName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/netapp/arm-netapp/src/operations/snapshots.ts b/sdk/netapp/arm-netapp/src/operations/snapshots.ts index 56c2ac26e8d0..e3848b734a4f 100644 --- a/sdk/netapp/arm-netapp/src/operations/snapshots.ts +++ b/sdk/netapp/arm-netapp/src/operations/snapshots.ts @@ -3,208 +3,457 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/snapshotsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Snapshots } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Snapshot, + SnapshotsListOptionalParams, + SnapshotsListResponse, + SnapshotsGetOptionalParams, + SnapshotsGetResponse, + SnapshotsCreateOptionalParams, + SnapshotsCreateResponse, + SnapshotsUpdateOptionalParams, + SnapshotsUpdateResponse, + SnapshotsDeleteOptionalParams +} from "../models"; -/** Class representing a Snapshots. */ -export class Snapshots { - private readonly client: AzureNetAppFilesManagementClientContext; +/// +/** Class containing Snapshots operations. */ +export class SnapshotsImpl implements Snapshots { + private readonly client: NetAppManagementClient; /** - * Create a Snapshots. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Snapshots class. + * @param client Reference to the service client */ - constructor(client: AzureNetAppFilesManagementClientContext) { + constructor(client: NetAppManagementClient) { this.client = client; } /** * List all snapshots associated with the volume - * @summary Describe all snapshots * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; + public list( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: SnapshotsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: SnapshotsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: SnapshotsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + poolName, + volumeName, + options + )) { + yield* page; + } + } + /** + * List all snapshots associated with the volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param callback The callback + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; + private _list( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: SnapshotsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, poolName, volumeName, options }, + listOperationSpec + ); + } + /** + * Get details of the specified snapshot * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback + * @param snapshotName The name of the snapshot + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + options?: SnapshotsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, poolName, volumeName, + snapshotName, options }, - listOperationSpec, - callback) as Promise; + getOperationSpec + ); } /** - * Get details of the specified snapshot - * @summary Describe a snapshot - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param snapshotName The name of the mount target - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param snapshotName The name of the mount target - * @param callback The callback - */ - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, callback: msRest.ServiceCallback): void; - /** + * Create the specified snapshot within the given volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param snapshotName The name of the mount target - * @param options The optional parameters - * @param callback The callback + * @param snapshotName The name of the snapshot + * @param body Snapshot object supplied in the body of the operation. + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + async beginCreate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: Snapshot, + options?: SnapshotsCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { resourceGroupName, accountName, poolName, volumeName, snapshotName, + body, options }, - getOperationSpec, - callback) as Promise; + createOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** * Create the specified snapshot within the given volume - * @summary Create a snapshot * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param snapshotName The name of the mount target - * @param location Resource location - * @param [options] The optional parameters - * @returns Promise - */ - create(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, location: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(resourceGroupName,accountName,poolName,volumeName,snapshotName,location,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Patch a snapshot - * @summary Update a snapshot + * @param snapshotName The name of the snapshot * @param body Snapshot object supplied in the body of the operation. - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param snapshotName The name of the mount target - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update(body: any, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(body,resourceGroupName,accountName,poolName,volumeName,snapshotName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: Snapshot, + options?: SnapshotsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + accountName, + poolName, + volumeName, + snapshotName, + body, + options + ); + return poller.pollUntilDone(); } /** - * Delete snapshot - * @summary Delete a snapshot + * Patch a snapshot * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param snapshotName The name of the mount target - * @param [options] The optional parameters - * @returns Promise + * @param snapshotName The name of the snapshot + * @param body Snapshot object supplied in the body of the operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,accountName,poolName,volumeName,snapshotName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } + async beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: Record, + options?: SnapshotsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Create the specified snapshot within the given volume - * @summary Create a snapshot - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param snapshotName The name of the mount target - * @param location Resource location - * @param [options] The optional parameters - * @returns Promise - */ - beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, location: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + const lro = new LroImpl( + sendOperation, { resourceGroupName, accountName, poolName, volumeName, snapshotName, - location, + body, options }, - beginCreateOperationSpec, - options); + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** * Patch a snapshot - * @summary Update a snapshot + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param snapshotName The name of the snapshot * @param body Snapshot object supplied in the body of the operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: Record, + options?: SnapshotsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + poolName, + volumeName, + snapshotName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete snapshot * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param snapshotName The name of the mount target - * @param [options] The optional parameters - * @returns Promise + * @param snapshotName The name of the snapshot + * @param options The options parameters. */ - beginUpdate(body: any, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + async beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + options?: SnapshotsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { - body, resourceGroupName, accountName, poolName, @@ -212,69 +461,81 @@ export class Snapshots { snapshotName, options }, - beginUpdateOperationSpec, - options); + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** * Delete snapshot - * @summary Delete a snapshot * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param snapshotName The name of the mount target - * @param [options] The optional parameters - * @returns Promise + * @param snapshotName The name of the snapshot + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - snapshotName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + options?: SnapshotsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + poolName, + volumeName, + snapshotName, + options + ); + return poller.pollUntilDone(); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots", + responses: { + 200: { + bodyMapper: Mappers.SnapshotsList + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SnapshotsList + bodyMapper: Mappers.Snapshot }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, @@ -282,27 +543,32 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.volumeName, Parameters.snapshotName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Snapshot }, - default: { - bodyMapper: Mappers.CloudError - } + 201: { + bodyMapper: Mappers.Snapshot + }, + 202: { + bodyMapper: Mappers.Snapshot + }, + 204: { + bodyMapper: Mappers.Snapshot + }, + default: {} }, - serializer -}; - -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", + requestBody: Parameters.body13, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, @@ -310,37 +576,33 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.volumeName, Parameters.snapshotName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - location: "location" - }, - mapper: { - ...Mappers.Snapshot, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", + httpMethod: "PATCH", responses: { + 200: { + bodyMapper: Mappers.Snapshot + }, 201: { bodyMapper: Mappers.Snapshot }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } + 202: { + bodyMapper: Mappers.Snapshot + }, + 204: { + bodyMapper: Mappers.Snapshot + }, + default: {} }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", + requestBody: Parameters.body14, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, @@ -348,38 +610,18 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.volumeName, Parameters.snapshotName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - required: true, - serializedName: "body", - type: { - name: "Object" - } - } - }, - responses: { - 200: { - bodyMapper: Mappers.Snapshot - }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, @@ -387,19 +629,5 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.volumeName, Parameters.snapshotName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; diff --git a/sdk/netapp/arm-netapp/src/operations/vaults.ts b/sdk/netapp/arm-netapp/src/operations/vaults.ts index 6d85268322bd..c8488eac0a49 100644 --- a/sdk/netapp/arm-netapp/src/operations/vaults.ts +++ b/sdk/netapp/arm-netapp/src/operations/vaults.ts @@ -3,85 +3,115 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/vaultsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Vaults } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { Vault, VaultsListOptionalParams, VaultsListResponse } from "../models"; -/** Class representing a Vaults. */ -export class Vaults { - private readonly client: AzureNetAppFilesManagementClientContext; +/// +/** Class containing Vaults operations. */ +export class VaultsImpl implements Vaults { + private readonly client: NetAppManagementClient; /** - * Create a Vaults. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Vaults class. + * @param client Reference to the service client */ - constructor(client: AzureNetAppFilesManagementClientContext) { + constructor(client: NetAppManagementClient) { this.client = client; } /** * List vaults for a Netapp Account - * @summary List vaults * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param callback The callback - */ - list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + public list( + resourceGroupName: string, + accountName: string, + options?: VaultsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, accountName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: VaultsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, accountName, options); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: VaultsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options + )) { + yield* page; + } + } + /** + * List vaults for a Netapp Account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + resourceGroupName: string, + accountName: string, + options?: VaultsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, options }, + listOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/vaults", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/vaults", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.VaultList }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/netapp/arm-netapp/src/operations/volumeGroups.ts b/sdk/netapp/arm-netapp/src/operations/volumeGroups.ts new file mode 100644 index 000000000000..05ddd2287ad6 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operations/volumeGroups.ts @@ -0,0 +1,408 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { VolumeGroups } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + VolumeGroup, + VolumeGroupsListByNetAppAccountOptionalParams, + VolumeGroupsListByNetAppAccountResponse, + VolumeGroupsGetOptionalParams, + VolumeGroupsGetResponse, + VolumeGroupDetails, + VolumeGroupsCreateOptionalParams, + VolumeGroupsCreateResponse, + VolumeGroupsDeleteOptionalParams +} from "../models"; + +/// +/** Class containing VolumeGroups operations. */ +export class VolumeGroupsImpl implements VolumeGroups { + private readonly client: NetAppManagementClient; + + /** + * Initialize a new instance of the class VolumeGroups class. + * @param client Reference to the service client + */ + constructor(client: NetAppManagementClient) { + this.client = client; + } + + /** + * List all volume groups for given account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param options The options parameters. + */ + public listByNetAppAccount( + resourceGroupName: string, + accountName: string, + options?: VolumeGroupsListByNetAppAccountOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByNetAppAccountPagingAll( + resourceGroupName, + accountName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByNetAppAccountPagingPage( + resourceGroupName, + accountName, + options + ); + } + }; + } + + private async *listByNetAppAccountPagingPage( + resourceGroupName: string, + accountName: string, + options?: VolumeGroupsListByNetAppAccountOptionalParams + ): AsyncIterableIterator { + let result = await this._listByNetAppAccount( + resourceGroupName, + accountName, + options + ); + yield result.value || []; + } + + private async *listByNetAppAccountPagingAll( + resourceGroupName: string, + accountName: string, + options?: VolumeGroupsListByNetAppAccountOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByNetAppAccountPagingPage( + resourceGroupName, + accountName, + options + )) { + yield* page; + } + } + + /** + * List all volume groups for given account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param options The options parameters. + */ + private _listByNetAppAccount( + resourceGroupName: string, + accountName: string, + options?: VolumeGroupsListByNetAppAccountOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listByNetAppAccountOperationSpec + ); + } + + /** + * Get details of the specified volume group + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param volumeGroupName The name of the volumeGroup + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + volumeGroupName: string, + options?: VolumeGroupsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, volumeGroupName, options }, + getOperationSpec + ); + } + + /** + * Create a volume group along with specified volumes + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param volumeGroupName The name of the volumeGroup + * @param body Volume Group object supplied in the body of the operation. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + accountName: string, + volumeGroupName: string, + body: VolumeGroupDetails, + options?: VolumeGroupsCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VolumeGroupsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, volumeGroupName, body, options }, + createOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Create a volume group along with specified volumes + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param volumeGroupName The name of the volumeGroup + * @param body Volume Group object supplied in the body of the operation. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + accountName: string, + volumeGroupName: string, + body: VolumeGroupDetails, + options?: VolumeGroupsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + accountName, + volumeGroupName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete the specified volume group only if there are no volumes under volume group. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param volumeGroupName The name of the volumeGroup + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + accountName: string, + volumeGroupName: string, + options?: VolumeGroupsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, volumeGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Delete the specified volume group only if there are no volumes under volume group. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param volumeGroupName The name of the volumeGroup + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + volumeGroupName: string, + options?: VolumeGroupsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + volumeGroupName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByNetAppAccountOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VolumeGroupList + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VolumeGroupDetails + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.volumeGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.VolumeGroupDetails + }, + 201: { + bodyMapper: Mappers.VolumeGroupDetails + }, + 202: { + bodyMapper: Mappers.VolumeGroupDetails + }, + 204: { + bodyMapper: Mappers.VolumeGroupDetails + }, + default: {} + }, + requestBody: Parameters.body21, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.volumeGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.volumeGroupName + ], + serializer +}; diff --git a/sdk/netapp/arm-netapp/src/operations/volumes.ts b/sdk/netapp/arm-netapp/src/operations/volumes.ts index b2c575cb359a..9869c054324a 100644 --- a/sdk/netapp/arm-netapp/src/operations/volumes.ts +++ b/sdk/netapp/arm-netapp/src/operations/volumes.ts @@ -3,676 +3,1249 @@ * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/volumesMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Volumes } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Volume, + VolumesListNextOptionalParams, + VolumesListOptionalParams, + VolumesListResponse, + VolumesGetOptionalParams, + VolumesGetResponse, + VolumesCreateOrUpdateOptionalParams, + VolumesCreateOrUpdateResponse, + VolumePatch, + VolumesUpdateOptionalParams, + VolumesUpdateResponse, + VolumesDeleteOptionalParams, + VolumeRevert, + VolumesRevertOptionalParams, + VolumesBreakReplicationOptionalParams, + VolumesReplicationStatusOptionalParams, + VolumesReplicationStatusResponse, + VolumesResyncReplicationOptionalParams, + VolumesDeleteReplicationOptionalParams, + AuthorizeRequest, + VolumesAuthorizeReplicationOptionalParams, + VolumesReInitializeReplicationOptionalParams, + PoolChangeRequest, + VolumesPoolChangeOptionalParams, + VolumesListNextResponse +} from "../models"; -/** Class representing a Volumes. */ -export class Volumes { - private readonly client: AzureNetAppFilesManagementClientContext; +/// +/** Class containing Volumes operations. */ +export class VolumesImpl implements Volumes { + private readonly client: NetAppManagementClient; /** - * Create a Volumes. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Volumes class. + * @param client Reference to the service client */ - constructor(client: AzureNetAppFilesManagementClientContext) { + constructor(client: NetAppManagementClient) { this.client = client; } /** * List all volumes within the capacity pool - * @summary Describe all volumes * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param callback The callback - */ - list(resourceGroupName: string, accountName: string, poolName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, accountName: string, poolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public list( + resourceGroupName: string, + accountName: string, + poolName: string, + options?: VolumesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + accountName, + poolName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + accountName, + poolName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + poolName: string, + options?: VolumesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + accountName, + poolName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( resourceGroupName, accountName, poolName, + continuationToken, options - }, - listOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + poolName: string, + options?: VolumesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + poolName, + options + )) { + yield* page; + } } /** - * Get the details of the specified volume - * @summary Describe a volume - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; - /** + * List all volumes within the capacity pool * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; + private _list( + resourceGroupName: string, + accountName: string, + poolName: string, + options?: VolumesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, poolName, options }, + listOperationSpec + ); + } + /** + * Get the details of the specified volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, poolName, volumeName, options }, + getOperationSpec + ); } /** * Create or update the specified volume within the capacity pool - * @summary Create or Update a volume - * @param body Volume object supplied in the body of the operation. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param body Volume object supplied in the body of the operation. + * @param options The options parameters. */ - createOrUpdate(body: Models.Volume, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(body,resourceGroupName,accountName,poolName,volumeName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: Volume, + options?: VolumesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VolumesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, volumeName, body, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); } /** - * Patch the specified volume - * @summary Update a volume - * @param body Volume object supplied in the body of the operation. + * Create or update the specified volume within the capacity pool * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param body Volume object supplied in the body of the operation. + * @param options The options parameters. */ - update(body: Models.VolumePatch, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(body,resourceGroupName,accountName,poolName,volumeName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: Volume, + options?: VolumesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + accountName, + poolName, + volumeName, + body, + options + ); + return poller.pollUntilDone(); } /** - * Delete the specified volume - * @summary Delete a volume + * Patch the specified volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param body Volume object supplied in the body of the operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,accountName,poolName,volumeName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: VolumePatch, + options?: VolumesUpdateOptionalParams + ): Promise< + PollerLike, VolumesUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, volumeName, body, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Revert a volume to the snapshot specified in the body - * @summary Revert a volume to one of its snapshots + * Patch the specified volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param body Volume object supplied in the body of the operation. + * @param options The options parameters. */ - revert(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesRevertOptionalParams): Promise { - return this.beginRevert(resourceGroupName,accountName,poolName,volumeName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: VolumePatch, + options?: VolumesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + poolName, + volumeName, + body, + options + ); + return poller.pollUntilDone(); } /** - * Break the replication connection on the destination volume - * @summary Break volume replication + * Delete the specified volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - breakReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesBreakReplicationOptionalParams): Promise { - return this.beginBreakReplication(resourceGroupName,accountName,poolName,volumeName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, volumeName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Get the status of the replication - * @summary Get volume replication status - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise - */ - replicationStatusMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param callback The callback - */ - replicationStatusMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; - /** + * Delete the specified volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - replicationStatusMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - replicationStatusMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - replicationStatusMethodOperationSpec, - callback) as Promise; + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return poller.pollUntilDone(); } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it - * will reverse-resync the connection and sync from destination to source. - * @summary Resync volume replication + * Revert a volume to the snapshot specified in the body * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param body Object for snapshot to revert supplied in the body of the operation. + * @param options The options parameters. */ - resyncReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginResyncReplication(resourceGroupName,accountName,poolName,volumeName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginRevert( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: VolumeRevert, + options?: VolumesRevertOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, volumeName, body, options }, + revertOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Delete the replication connection on the destination volume, and send release to the source - * replication - * @summary Delete volume replication + * Revert a volume to the snapshot specified in the body * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param body Object for snapshot to revert supplied in the body of the operation. + * @param options The options parameters. */ - deleteReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteReplication(resourceGroupName,accountName,poolName,volumeName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginRevertAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: VolumeRevert, + options?: VolumesRevertOptionalParams + ): Promise { + const poller = await this.beginRevert( + resourceGroupName, + accountName, + poolName, + volumeName, + body, + options + ); + return poller.pollUntilDone(); } /** - * Authorize the replication connection on the source volume - * @summary Authorize source volume replication + * Break the replication connection on the destination volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - authorizeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesAuthorizeReplicationOptionalParams): Promise { - return this.beginAuthorizeReplication(resourceGroupName,accountName,poolName,volumeName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginBreakReplication( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesBreakReplicationOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, volumeName, options }, + breakReplicationOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Re-Initializes the replication connection on the destination volume - * @summary ReInitialize volume replication + * Break the replication connection on the destination volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - reInitializeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginReInitializeReplication(resourceGroupName,accountName,poolName,volumeName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginBreakReplicationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesBreakReplicationOptionalParams + ): Promise { + const poller = await this.beginBreakReplication( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return poller.pollUntilDone(); } /** - * Moves volume to another pool - * @summary Change pool for volume + * Get the status of the replication * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param newPoolResourceId Resource id of the pool to move volume to - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - poolChange(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, newPoolResourceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginPoolChange(resourceGroupName,accountName,poolName,volumeName,newPoolResourceId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + replicationStatus( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesReplicationStatusOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, poolName, volumeName, options }, + replicationStatusOperationSpec + ); } /** - * Create or update the specified volume within the capacity pool - * @summary Create or Update a volume - * @param body Volume object supplied in the body of the operation. + * Resync the connection on the destination volume. If the operation is ran on the source volume it + * will reverse-resync the connection and sync from destination to source. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(body: Models.Volume, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - body, - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginResyncReplication( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesResyncReplicationOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, volumeName, options }, + resyncReplicationOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Patch the specified volume - * @summary Update a volume - * @param body Volume object supplied in the body of the operation. + * Resync the connection on the destination volume. If the operation is ran on the source volume it + * will reverse-resync the connection and sync from destination to source. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(body: Models.VolumePatch, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - body, - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - beginUpdateOperationSpec, - options); + async beginResyncReplicationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesResyncReplicationOptionalParams + ): Promise { + const poller = await this.beginResyncReplication( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return poller.pollUntilDone(); } /** - * Delete the specified volume - * @summary Delete a volume + * Delete the replication connection on the destination volume, and send release to the source + * replication * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteReplication( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesDeleteReplicationOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, volumeName, options }, + deleteReplicationOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Revert a volume to the snapshot specified in the body - * @summary Revert a volume to one of its snapshots + * Delete the replication connection on the destination volume, and send release to the source + * replication * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRevert(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesBeginRevertOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - beginRevertOperationSpec, - options); + async beginDeleteReplicationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesDeleteReplicationOptionalParams + ): Promise { + const poller = await this.beginDeleteReplication( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return poller.pollUntilDone(); } /** - * Break the replication connection on the destination volume - * @summary Break volume replication + * Authorize the replication connection on the source volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param body Authorize request object supplied in the body of the operation. + * @param options The options parameters. */ - beginBreakReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesBeginBreakReplicationOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - beginBreakReplicationOperationSpec, - options); + async beginAuthorizeReplication( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: AuthorizeRequest, + options?: VolumesAuthorizeReplicationOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, volumeName, body, options }, + authorizeReplicationOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it - * will reverse-resync the connection and sync from destination to source. - * @summary Resync volume replication + * Authorize the replication connection on the source volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param body Authorize request object supplied in the body of the operation. + * @param options The options parameters. */ - beginResyncReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - beginResyncReplicationOperationSpec, - options); + async beginAuthorizeReplicationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: AuthorizeRequest, + options?: VolumesAuthorizeReplicationOptionalParams + ): Promise { + const poller = await this.beginAuthorizeReplication( + resourceGroupName, + accountName, + poolName, + volumeName, + body, + options + ); + return poller.pollUntilDone(); } /** - * Delete the replication connection on the destination volume, and send release to the source - * replication - * @summary Delete volume replication + * Re-Initializes the replication connection on the destination volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - beginDeleteReplicationOperationSpec, - options); + async beginReInitializeReplication( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesReInitializeReplicationOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, volumeName, options }, + reInitializeReplicationOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** - * Authorize the replication connection on the source volume - * @summary Authorize source volume replication + * Re-Initializes the replication connection on the destination volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginAuthorizeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesBeginAuthorizeReplicationOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - beginAuthorizeReplicationOperationSpec, - options); + async beginReInitializeReplicationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesReInitializeReplicationOptionalParams + ): Promise { + const poller = await this.beginReInitializeReplication( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return poller.pollUntilDone(); } /** - * Re-Initializes the replication connection on the destination volume - * @summary ReInitialize volume replication + * Moves volume to another pool * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise + * @param body Move volume to the pool supplied in the body of the operation. + * @param options The options parameters. */ - beginReInitializeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - beginReInitializeReplicationOperationSpec, - options); + async beginPoolChange( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: PoolChangeRequest, + options?: VolumesPoolChangeOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, poolName, volumeName, body, options }, + poolChangeOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); } /** * Moves volume to another pool - * @summary Change pool for volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param newPoolResourceId Resource id of the pool to move volume to - * @param [options] The optional parameters - * @returns Promise + * @param body Move volume to the pool supplied in the body of the operation. + * @param options The options parameters. */ - beginPoolChange(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, newPoolResourceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - newPoolResourceId, - options - }, - beginPoolChangeOperationSpec, - options); + async beginPoolChangeAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: PoolChangeRequest, + options?: VolumesPoolChangeOptionalParams + ): Promise { + const poller = await this.beginPoolChange( + resourceGroupName, + accountName, + poolName, + volumeName, + body, + options + ); + return poller.pollUntilDone(); } /** - * List all volumes within the capacity pool - * @summary Describe all volumes - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListNext + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + resourceGroupName: string, + accountName: string, + poolName: string, + nextLink: string, + options?: VolumesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { resourceGroupName, accountName, poolName, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.poolName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.VolumeList }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.poolName, - Parameters.volumeName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.poolName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Volume }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, - serializer -}; - -const replicationStatusMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/replicationStatus", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ReplicationStatus + bodyMapper: Mappers.Volume }, - default: { - bodyMapper: Mappers.CloudError - } + 201: { + bodyMapper: Mappers.Volume + }, + 202: { + bodyMapper: Mappers.Volume + }, + 204: { + bodyMapper: Mappers.Volume + }, + default: {} }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", + requestBody: Parameters.body7, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.Volume, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.Volume @@ -680,319 +1253,210 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.Volume }, - 202: {}, + 202: { + bodyMapper: Mappers.Volume + }, + 204: { + bodyMapper: Mappers.Volume + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", + requestBody: Parameters.body8, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.VolumePatch, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Volume - }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const beginRevertOperationSpec: msRest.OperationSpec = { +const revertOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revert", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revert", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + requestBody: Parameters.body9, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - snapshotId: [ - "options", - "snapshotId" - ] - }, - mapper: { - ...Mappers.VolumeRevert, - required: true - } - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const beginBreakReplicationOperationSpec: msRest.OperationSpec = { +const breakReplicationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - forceBreakReplication: [ - "options", - "forceBreakReplication" - ] - }, - mapper: Mappers.BreakReplicationRequest - }, + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; +const replicationStatusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/replicationStatus", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } + 200: { + bodyMapper: Mappers.ReplicationStatus + }, + default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginResyncReplicationOperationSpec: msRest.OperationSpec = { +const resyncReplicationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const beginDeleteReplicationOperationSpec: msRest.OperationSpec = { +const deleteReplicationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const beginAuthorizeReplicationOperationSpec: msRest.OperationSpec = { +const authorizeReplicationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - remoteVolumeResourceId: [ - "options", - "remoteVolumeResourceId" - ] - }, - mapper: { - ...Mappers.AuthorizeRequest, - required: true - } - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const beginReInitializeReplicationOperationSpec: msRest.OperationSpec = { +const reInitializeReplicationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reinitializeReplication", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reinitializeReplication", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const beginPoolChangeOperationSpec: msRest.OperationSpec = { +const poolChangeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/poolChange", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/poolChange", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + requestBody: Parameters.body12, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.poolName, Parameters.volumeName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - newPoolResourceId: "newPoolResourceId" - }, - mapper: { - ...Mappers.PoolChangeRequest, - required: true - } - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VolumeList }, - default: { - bodyMapper: Mappers.CloudError - } + default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.nextLink, + Parameters.poolName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/accountBackups.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/accountBackups.ts new file mode 100644 index 000000000000..e1662a6c1429 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/accountBackups.ts @@ -0,0 +1,72 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Backup, + AccountBackupsListOptionalParams, + AccountBackupsGetOptionalParams, + AccountBackupsGetResponse, + AccountBackupsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a AccountBackups. */ +export interface AccountBackups { + /** + * List all Backups for a Netapp Account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: AccountBackupsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the specified backup for a Netapp Account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param backupName The name of the backup + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + backupName: string, + options?: AccountBackupsGetOptionalParams + ): Promise; + /** + * Delete the specified Backup for a Netapp Account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param backupName The name of the backup + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + backupName: string, + options?: AccountBackupsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete the specified Backup for a Netapp Account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param backupName The name of the backup + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + backupName: string, + options?: AccountBackupsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/accounts.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/accounts.ts new file mode 100644 index 000000000000..735eab31552d --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/accounts.ts @@ -0,0 +1,139 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + NetAppAccount, + AccountsListBySubscriptionOptionalParams, + AccountsListOptionalParams, + AccountsGetOptionalParams, + AccountsGetResponse, + AccountsCreateOrUpdateOptionalParams, + AccountsCreateOrUpdateResponse, + AccountsDeleteOptionalParams, + NetAppAccountPatch, + AccountsUpdateOptionalParams, + AccountsUpdateResponse +} from "../models"; + +/// +/** Interface representing a Accounts. */ +export interface Accounts { + /** + * List and describe all NetApp accounts in the subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: AccountsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * List and describe all NetApp accounts in the resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: AccountsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the NetApp account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + options?: AccountsGetOptionalParams + ): Promise; + /** + * Create or update the specified NetApp account within the resource group + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param body NetApp Account object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + body: NetAppAccount, + options?: AccountsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccountsCreateOrUpdateResponse + > + >; + /** + * Create or update the specified NetApp account within the resource group + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param body NetApp Account object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + body: NetAppAccount, + options?: AccountsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete the specified NetApp account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete the specified NetApp account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + options?: AccountsDeleteOptionalParams + ): Promise; + /** + * Patch the specified NetApp account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param body NetApp Account object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + body: NetAppAccountPatch, + options?: AccountsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccountsUpdateResponse + > + >; + /** + * Patch the specified NetApp account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param body NetApp Account object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + body: NetAppAccountPatch, + options?: AccountsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/backupPolicies.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/backupPolicies.ts new file mode 100644 index 000000000000..d11b27b89354 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/backupPolicies.ts @@ -0,0 +1,147 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + BackupPolicy, + BackupPoliciesListOptionalParams, + BackupPoliciesGetOptionalParams, + BackupPoliciesGetResponse, + BackupPoliciesCreateOptionalParams, + BackupPoliciesCreateResponse, + BackupPolicyPatch, + BackupPoliciesUpdateOptionalParams, + BackupPoliciesUpdateResponse, + BackupPoliciesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a BackupPolicies. */ +export interface BackupPolicies { + /** + * List backup policies for Netapp Account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: BackupPoliciesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a particular backup Policy + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param backupPolicyName Backup policy Name which uniquely identify backup policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + options?: BackupPoliciesGetOptionalParams + ): Promise; + /** + * Create a backup policy for Netapp Account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param backupPolicyName Backup policy Name which uniquely identify backup policy. + * @param body Backup policy object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + body: BackupPolicy, + options?: BackupPoliciesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + BackupPoliciesCreateResponse + > + >; + /** + * Create a backup policy for Netapp Account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param backupPolicyName Backup policy Name which uniquely identify backup policy. + * @param body Backup policy object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + body: BackupPolicy, + options?: BackupPoliciesCreateOptionalParams + ): Promise; + /** + * Patch a backup policy for Netapp Account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param backupPolicyName Backup policy Name which uniquely identify backup policy. + * @param body Backup policy object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + body: BackupPolicyPatch, + options?: BackupPoliciesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + BackupPoliciesUpdateResponse + > + >; + /** + * Patch a backup policy for Netapp Account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param backupPolicyName Backup policy Name which uniquely identify backup policy. + * @param body Backup policy object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + body: BackupPolicyPatch, + options?: BackupPoliciesUpdateOptionalParams + ): Promise; + /** + * Delete backup policy + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param backupPolicyName Backup policy Name which uniquely identify backup policy. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + options?: BackupPoliciesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete backup policy + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param backupPolicyName Backup policy Name which uniquely identify backup policy. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + backupPolicyName: string, + options?: BackupPoliciesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/backups.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/backups.ts new file mode 100644 index 000000000000..55cbe62c9e4f --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/backups.ts @@ -0,0 +1,202 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Backup, + BackupsListOptionalParams, + BackupsGetStatusOptionalParams, + BackupsGetStatusResponse, + BackupsGetVolumeRestoreStatusOptionalParams, + BackupsGetVolumeRestoreStatusResponse, + BackupsGetOptionalParams, + BackupsGetResponse, + BackupsCreateOptionalParams, + BackupsCreateResponse, + BackupsUpdateOptionalParams, + BackupsUpdateResponse, + BackupsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Backups. */ +export interface Backups { + /** + * List all backups for a volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: BackupsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the status of the backup for a volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + getStatus( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: BackupsGetStatusOptionalParams + ): Promise; + /** + * Get the status of the restore for a volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + getVolumeRestoreStatus( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: BackupsGetVolumeRestoreStatusOptionalParams + ): Promise; + /** + * Gets the specified backup of the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param backupName The name of the backup + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + options?: BackupsGetOptionalParams + ): Promise; + /** + * Create a backup for the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param backupName The name of the backup + * @param body Backup object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + body: Backup, + options?: BackupsCreateOptionalParams + ): Promise< + PollerLike, BackupsCreateResponse> + >; + /** + * Create a backup for the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param backupName The name of the backup + * @param body Backup object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + body: Backup, + options?: BackupsCreateOptionalParams + ): Promise; + /** + * Patch a backup for the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param backupName The name of the backup + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + options?: BackupsUpdateOptionalParams + ): Promise< + PollerLike, BackupsUpdateResponse> + >; + /** + * Patch a backup for the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param backupName The name of the backup + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + options?: BackupsUpdateOptionalParams + ): Promise; + /** + * Delete a backup of the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param backupName The name of the backup + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + options?: BackupsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a backup of the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param backupName The name of the backup + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + backupName: string, + options?: BackupsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..f7bd6727d8ca --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts @@ -0,0 +1,21 @@ +/* + * 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. + */ + +export * from "./operations"; +export * from "./netAppResource"; +export * from "./netAppResourceQuotaLimits"; +export * from "./accounts"; +export * from "./pools"; +export * from "./volumes"; +export * from "./snapshots"; +export * from "./snapshotPolicies"; +export * from "./backups"; +export * from "./accountBackups"; +export * from "./backupPolicies"; +export * from "./vaults"; +export * from "./volumeGroups"; diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResource.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResource.ts new file mode 100644 index 000000000000..64b6993303bf --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResource.ts @@ -0,0 +1,66 @@ +/* + * 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. + */ + +import { + CheckNameResourceTypes, + NetAppResourceCheckNameAvailabilityOptionalParams, + NetAppResourceCheckNameAvailabilityResponse, + NetAppResourceCheckFilePathAvailabilityOptionalParams, + NetAppResourceCheckFilePathAvailabilityResponse, + CheckQuotaNameResourceTypes, + NetAppResourceCheckQuotaAvailabilityOptionalParams, + NetAppResourceCheckQuotaAvailabilityResponse +} from "../models"; + +/** Interface representing a NetAppResource. */ +export interface NetAppResource { + /** + * Check if a resource name is available. + * @param location The location + * @param name Resource name to verify. + * @param resourceGroup Resource group name. + * @param typeParam Resource type used for verification. + * @param options The options parameters. + */ + checkNameAvailability( + location: string, + name: string, + resourceGroup: string, + typeParam: CheckNameResourceTypes, + options?: NetAppResourceCheckNameAvailabilityOptionalParams + ): Promise; + /** + * Check if a file path is available. + * @param location The location + * @param name File path to verify. + * @param subnetId The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/volumes + * @param options The options parameters. + */ + checkFilePathAvailability( + location: string, + name: string, + subnetId: string, + options?: NetAppResourceCheckFilePathAvailabilityOptionalParams + ): Promise; + /** + * Check if a quota is available. + * @param location The location + * @param name Name of the resource to verify. + * @param resourceGroup Resource group name. + * @param typeParam Resource type used for verification. + * @param options The options parameters. + */ + checkQuotaAvailability( + location: string, + name: string, + resourceGroup: string, + typeParam: CheckQuotaNameResourceTypes, + options?: NetAppResourceCheckQuotaAvailabilityOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResourceQuotaLimits.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResourceQuotaLimits.ts new file mode 100644 index 000000000000..0d76ebff341f --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/netAppResourceQuotaLimits.ts @@ -0,0 +1,40 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SubscriptionQuotaItem, + NetAppResourceQuotaLimitsListOptionalParams, + NetAppResourceQuotaLimitsGetOptionalParams, + NetAppResourceQuotaLimitsGetResponse +} from "../models"; + +/// +/** Interface representing a NetAppResourceQuotaLimits. */ +export interface NetAppResourceQuotaLimits { + /** + * Get the default and current limits for quotas + * @param location The location + * @param options The options parameters. + */ + list( + location: string, + options?: NetAppResourceQuotaLimitsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the default and current subscription quota limit + * @param location The location + * @param quotaLimitName The name of the Quota Limit + * @param options The options parameters. + */ + get( + location: string, + quotaLimitName: string, + options?: NetAppResourceQuotaLimitsGetOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/operations.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..2f1bec7ad1eb --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Lists all of the available Microsoft.NetApp Rest API operations + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/pools.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/pools.ts new file mode 100644 index 000000000000..830a155a1e54 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/pools.ts @@ -0,0 +1,144 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + CapacityPool, + PoolsListOptionalParams, + PoolsGetOptionalParams, + PoolsGetResponse, + PoolsCreateOrUpdateOptionalParams, + PoolsCreateOrUpdateResponse, + CapacityPoolPatch, + PoolsUpdateOptionalParams, + PoolsUpdateResponse, + PoolsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Pools. */ +export interface Pools { + /** + * List all capacity pools in the NetApp Account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: PoolsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get details of the specified capacity pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + poolName: string, + options?: PoolsGetOptionalParams + ): Promise; + /** + * Create or Update a capacity pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param body Capacity pool object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + body: CapacityPool, + options?: PoolsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PoolsCreateOrUpdateResponse + > + >; + /** + * Create or Update a capacity pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param body Capacity pool object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + body: CapacityPool, + options?: PoolsCreateOrUpdateOptionalParams + ): Promise; + /** + * Patch the specified capacity pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param body Capacity pool object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + body: CapacityPoolPatch, + options?: PoolsUpdateOptionalParams + ): Promise< + PollerLike, PoolsUpdateResponse> + >; + /** + * Patch the specified capacity pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param body Capacity pool object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + body: CapacityPoolPatch, + options?: PoolsUpdateOptionalParams + ): Promise; + /** + * Delete the specified capacity pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + options?: PoolsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete the specified capacity pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + options?: PoolsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/snapshotPolicies.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/snapshotPolicies.ts new file mode 100644 index 000000000000..1c10c6cae6d4 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/snapshotPolicies.ts @@ -0,0 +1,142 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SnapshotPolicy, + SnapshotPoliciesListOptionalParams, + SnapshotPoliciesGetOptionalParams, + SnapshotPoliciesGetResponse, + SnapshotPoliciesCreateOptionalParams, + SnapshotPoliciesCreateResponse, + SnapshotPolicyPatch, + SnapshotPoliciesUpdateOptionalParams, + SnapshotPoliciesUpdateResponse, + SnapshotPoliciesDeleteOptionalParams, + SnapshotPoliciesListVolumesOptionalParams, + SnapshotPoliciesListVolumesResponse +} from "../models"; + +/// +/** Interface representing a SnapshotPolicies. */ +export interface SnapshotPolicies { + /** + * List snapshot policy + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: SnapshotPoliciesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a snapshot Policy + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param snapshotPolicyName The name of the snapshot policy + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + options?: SnapshotPoliciesGetOptionalParams + ): Promise; + /** + * Create a snapshot policy + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param snapshotPolicyName The name of the snapshot policy + * @param body Snapshot policy object supplied in the body of the operation. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + body: SnapshotPolicy, + options?: SnapshotPoliciesCreateOptionalParams + ): Promise; + /** + * Patch a snapshot policy + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param snapshotPolicyName The name of the snapshot policy + * @param body Snapshot policy object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + body: SnapshotPolicyPatch, + options?: SnapshotPoliciesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotPoliciesUpdateResponse + > + >; + /** + * Patch a snapshot policy + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param snapshotPolicyName The name of the snapshot policy + * @param body Snapshot policy object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + body: SnapshotPolicyPatch, + options?: SnapshotPoliciesUpdateOptionalParams + ): Promise; + /** + * Delete snapshot policy + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param snapshotPolicyName The name of the snapshot policy + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + options?: SnapshotPoliciesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete snapshot policy + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param snapshotPolicyName The name of the snapshot policy + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + options?: SnapshotPoliciesDeleteOptionalParams + ): Promise; + /** + * Get volumes associated with snapshot policy + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param snapshotPolicyName The name of the snapshot policy + * @param options The options parameters. + */ + listVolumes( + resourceGroupName: string, + accountName: string, + snapshotPolicyName: string, + options?: SnapshotPoliciesListVolumesOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/snapshots.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/snapshots.ts new file mode 100644 index 000000000000..ae359c2df859 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/snapshots.ts @@ -0,0 +1,178 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Snapshot, + SnapshotsListOptionalParams, + SnapshotsGetOptionalParams, + SnapshotsGetResponse, + SnapshotsCreateOptionalParams, + SnapshotsCreateResponse, + SnapshotsUpdateOptionalParams, + SnapshotsUpdateResponse, + SnapshotsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Snapshots. */ +export interface Snapshots { + /** + * List all snapshots associated with the volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: SnapshotsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get details of the specified snapshot + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param snapshotName The name of the snapshot + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + options?: SnapshotsGetOptionalParams + ): Promise; + /** + * Create the specified snapshot within the given volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param snapshotName The name of the snapshot + * @param body Snapshot object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: Snapshot, + options?: SnapshotsCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotsCreateResponse + > + >; + /** + * Create the specified snapshot within the given volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param snapshotName The name of the snapshot + * @param body Snapshot object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: Snapshot, + options?: SnapshotsCreateOptionalParams + ): Promise; + /** + * Patch a snapshot + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param snapshotName The name of the snapshot + * @param body Snapshot object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: Record, + options?: SnapshotsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotsUpdateResponse + > + >; + /** + * Patch a snapshot + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param snapshotName The name of the snapshot + * @param body Snapshot object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: Record, + options?: SnapshotsUpdateOptionalParams + ): Promise; + /** + * Delete snapshot + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param snapshotName The name of the snapshot + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + options?: SnapshotsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete snapshot + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param snapshotName The name of the snapshot + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + options?: SnapshotsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/vaults.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/vaults.ts new file mode 100644 index 000000000000..cc2528209ae7 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/vaults.ts @@ -0,0 +1,26 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Vault, VaultsListOptionalParams } from "../models"; + +/// +/** Interface representing a Vaults. */ +export interface Vaults { + /** + * List vaults for a Netapp Account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: VaultsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/volumeGroups.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/volumeGroups.ts new file mode 100644 index 000000000000..ffbc48940e0b --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/volumeGroups.ts @@ -0,0 +1,110 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VolumeGroup, + VolumeGroupsListByNetAppAccountOptionalParams, + VolumeGroupsGetOptionalParams, + VolumeGroupsGetResponse, + VolumeGroupDetails, + VolumeGroupsCreateOptionalParams, + VolumeGroupsCreateResponse, + VolumeGroupsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a VolumeGroups. */ +export interface VolumeGroups { + /** + * List all volume groups for given account + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param options The options parameters. + */ + listByNetAppAccount( + resourceGroupName: string, + accountName: string, + options?: VolumeGroupsListByNetAppAccountOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get details of the specified volume group + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param volumeGroupName The name of the volumeGroup + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + volumeGroupName: string, + options?: VolumeGroupsGetOptionalParams + ): Promise; + /** + * Create a volume group along with specified volumes + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param volumeGroupName The name of the volumeGroup + * @param body Volume Group object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + accountName: string, + volumeGroupName: string, + body: VolumeGroupDetails, + options?: VolumeGroupsCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VolumeGroupsCreateResponse + > + >; + /** + * Create a volume group along with specified volumes + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param volumeGroupName The name of the volumeGroup + * @param body Volume Group object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + accountName: string, + volumeGroupName: string, + body: VolumeGroupDetails, + options?: VolumeGroupsCreateOptionalParams + ): Promise; + /** + * Delete the specified volume group only if there are no volumes under volume group. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param volumeGroupName The name of the volumeGroup + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + volumeGroupName: string, + options?: VolumeGroupsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete the specified volume group only if there are no volumes under volume group. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param volumeGroupName The name of the volumeGroup + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + volumeGroupName: string, + options?: VolumeGroupsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/volumes.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/volumes.ts new file mode 100644 index 000000000000..ac6e3a4a0781 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/volumes.ts @@ -0,0 +1,413 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Volume, + VolumesListOptionalParams, + VolumesGetOptionalParams, + VolumesGetResponse, + VolumesCreateOrUpdateOptionalParams, + VolumesCreateOrUpdateResponse, + VolumePatch, + VolumesUpdateOptionalParams, + VolumesUpdateResponse, + VolumesDeleteOptionalParams, + VolumeRevert, + VolumesRevertOptionalParams, + VolumesBreakReplicationOptionalParams, + VolumesReplicationStatusOptionalParams, + VolumesReplicationStatusResponse, + VolumesResyncReplicationOptionalParams, + VolumesDeleteReplicationOptionalParams, + AuthorizeRequest, + VolumesAuthorizeReplicationOptionalParams, + VolumesReInitializeReplicationOptionalParams, + PoolChangeRequest, + VolumesPoolChangeOptionalParams +} from "../models"; + +/// +/** Interface representing a Volumes. */ +export interface Volumes { + /** + * List all volumes within the capacity pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + poolName: string, + options?: VolumesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the details of the specified volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesGetOptionalParams + ): Promise; + /** + * Create or update the specified volume within the capacity pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param body Volume object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: Volume, + options?: VolumesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VolumesCreateOrUpdateResponse + > + >; + /** + * Create or update the specified volume within the capacity pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param body Volume object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: Volume, + options?: VolumesCreateOrUpdateOptionalParams + ): Promise; + /** + * Patch the specified volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param body Volume object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: VolumePatch, + options?: VolumesUpdateOptionalParams + ): Promise< + PollerLike, VolumesUpdateResponse> + >; + /** + * Patch the specified volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param body Volume object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: VolumePatch, + options?: VolumesUpdateOptionalParams + ): Promise; + /** + * Delete the specified volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete the specified volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesDeleteOptionalParams + ): Promise; + /** + * Revert a volume to the snapshot specified in the body + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param body Object for snapshot to revert supplied in the body of the operation. + * @param options The options parameters. + */ + beginRevert( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: VolumeRevert, + options?: VolumesRevertOptionalParams + ): Promise, void>>; + /** + * Revert a volume to the snapshot specified in the body + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param body Object for snapshot to revert supplied in the body of the operation. + * @param options The options parameters. + */ + beginRevertAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: VolumeRevert, + options?: VolumesRevertOptionalParams + ): Promise; + /** + * Break the replication connection on the destination volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginBreakReplication( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesBreakReplicationOptionalParams + ): Promise, void>>; + /** + * Break the replication connection on the destination volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginBreakReplicationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesBreakReplicationOptionalParams + ): Promise; + /** + * Get the status of the replication + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + replicationStatus( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesReplicationStatusOptionalParams + ): Promise; + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it + * will reverse-resync the connection and sync from destination to source. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginResyncReplication( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesResyncReplicationOptionalParams + ): Promise, void>>; + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it + * will reverse-resync the connection and sync from destination to source. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginResyncReplicationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesResyncReplicationOptionalParams + ): Promise; + /** + * Delete the replication connection on the destination volume, and send release to the source + * replication + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginDeleteReplication( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesDeleteReplicationOptionalParams + ): Promise, void>>; + /** + * Delete the replication connection on the destination volume, and send release to the source + * replication + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginDeleteReplicationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesDeleteReplicationOptionalParams + ): Promise; + /** + * Authorize the replication connection on the source volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param body Authorize request object supplied in the body of the operation. + * @param options The options parameters. + */ + beginAuthorizeReplication( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: AuthorizeRequest, + options?: VolumesAuthorizeReplicationOptionalParams + ): Promise, void>>; + /** + * Authorize the replication connection on the source volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param body Authorize request object supplied in the body of the operation. + * @param options The options parameters. + */ + beginAuthorizeReplicationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: AuthorizeRequest, + options?: VolumesAuthorizeReplicationOptionalParams + ): Promise; + /** + * Re-Initializes the replication connection on the destination volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginReInitializeReplication( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesReInitializeReplicationOptionalParams + ): Promise, void>>; + /** + * Re-Initializes the replication connection on the destination volume + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The options parameters. + */ + beginReInitializeReplicationAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: VolumesReInitializeReplicationOptionalParams + ): Promise; + /** + * Moves volume to another pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param body Move volume to the pool supplied in the body of the operation. + * @param options The options parameters. + */ + beginPoolChange( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: PoolChangeRequest, + options?: VolumesPoolChangeOptionalParams + ): Promise, void>>; + /** + * Moves volume to another pool + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param body Move volume to the pool supplied in the body of the operation. + * @param options The options parameters. + */ + beginPoolChangeAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + body: PoolChangeRequest, + options?: VolumesPoolChangeOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/test/sampleTest.ts b/sdk/netapp/arm-netapp/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/netapp/arm-netapp/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * 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. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/netapp/arm-netapp/tsconfig.json b/sdk/netapp/arm-netapp/tsconfig.json index 422b584abd5e..6e3251194117 100644 --- a/sdk/netapp/arm-netapp/tsconfig.json +++ b/sdk/netapp/arm-netapp/tsconfig.json @@ -3,7 +3,7 @@ "module": "es6", "moduleResolution": "node", "strict": true, - "target": "es5", + "target": "es6", "sourceMap": true, "declarationMap": true, "esModuleInterop": true, @@ -11,9 +11,9 @@ "forceConsistentCasingInFileNames": true, "lib": ["es6", "dom"], "declaration": true, - "outDir": "./esm", + "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts"], + "include": ["./src/**/*.ts", "./test/**/*.ts"], "exclude": ["node_modules"] } diff --git a/sdk/netapp/ci.yml b/sdk/netapp/ci.yml new file mode 100644 index 000000000000..f6f1a8580fe0 --- /dev/null +++ b/sdk/netapp/ci.yml @@ -0,0 +1,29 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/netapp/ + +pr: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/netapp/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: netapp + Artifacts: + - name: azure-arm-netapp + safeName: azurearmnetapp + \ No newline at end of file