diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 2c70e35614c6..bd669038e9d5 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3002,7 +3002,7 @@ packages: version: 0.0.0 '@rush-temp/arm-migrate@file:projects/arm-migrate.tgz': - resolution: {integrity: sha512-QhMhgtj6EmtxfbyE3DKpguFi6Da5c15xAUZqCpCR/mAQXKGlPd8Dkb5OHKFFQaxNH5qUv7gQIzG5Ql5OQSJrbw==, tarball: file:projects/arm-migrate.tgz} + resolution: {integrity: sha512-pIvMKfeTqoI+waZmgRGUODzlM0hB8ofkOBqtycpdRYSGR+Cu7/JHGw5Odm87kU0DYZIsmxhZrqKGVkzUf86p+g==, tarball: file:projects/arm-migrate.tgz} version: 0.0.0 '@rush-temp/arm-migrationassessment@file:projects/arm-migrationassessment.tgz': @@ -14496,6 +14496,7 @@ snapshots: '@vitest/browser': 3.1.3(playwright@1.52.0)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(vitest@3.1.3) '@vitest/coverage-istanbul': 3.1.3(vitest@3.1.3) dotenv: 16.5.0 + eslint: 9.26.0 playwright: 1.52.0 tslib: 2.8.1 typescript: 5.8.3 diff --git a/sdk/migrate/arm-migrate/CHANGELOG.md b/sdk/migrate/arm-migrate/CHANGELOG.md index ce73e0131f22..8d26f828fc35 100644 --- a/sdk/migrate/arm-migrate/CHANGELOG.md +++ b/sdk/migrate/arm-migrate/CHANGELOG.md @@ -1,15 +1,234 @@ # Release History - -## 2.0.4 (Unreleased) - + +## 3.0.0-beta.1 (2025-05-13) +Compared with version 2.0.3 + ### Features Added -### Breaking Changes + - Added operation group AvsAssessedMachinesV2OperationsOperations + - Added operation group AvsAssessmentsV2OperationsOperations + - Added operation group AvsAssessmentV2SummaryOperationsOperations + - Added operation group AvsGraphAssessmentOptionsOperationsOperations + - Added Interface AssessmentDetails + - Added Interface AvsAssessedDiskV2 + - Added Interface AvsAssessedMachineExtendedDetails + - Added Interface AvsAssessedMachinePropertiesV2 + - Added Interface AvsAssessedMachinesV2OperationsGetOptionalParams + - Added Interface AvsAssessedMachinesV2OperationsListByParentOptionalParams + - Added Interface AvsAssessedMachineV2 + - Added Interface AvsAssessedNetworkAdapter + - Added Interface AvsAssessmentOptionsOutboundEdgeGroup + - Added Interface AvsAssessmentPropertiesV2 + - Added Interface AvsAssessmentSettings + - Added Interface AvsAssessmentSummaryPropertiesV2 + - Added Interface AvsAssessmentsV2OperationsCreateOptionalParams + - Added Interface AvsAssessmentsV2OperationsDeleteOptionalParams + - Added Interface AvsAssessmentsV2OperationsDownloadUrlOptionalParams + - Added Interface AvsAssessmentsV2OperationsGetOptionalParams + - Added Interface AvsAssessmentsV2OperationsListByParentOptionalParams + - Added Interface AvsAssessmentV2 + - Added Interface AvsAssessmentV2Summary + - Added Interface AvsAssessmentV2SummaryOperationsGetOptionalParams + - Added Interface AvsAssessmentV2SummaryOperationsListByParentOptionalParams + - Added Interface AvsEstimatedExternalStorage + - Added Interface AvsEstimatedNetwork + - Added Interface AvsEstimatedNode + - Added Interface AvsGraphAssessmentOptions + - Added Interface AvsGraphAssessmentOptionsOperationsGetOptionalParams + - Added Interface AvsGraphAssessmentOptionsOperationsListByParentOptionalParams + - Added Interface AvsGraphAssessmentOptionsProperties + - Added Interface AvsRecommendationsMigrationIssuesMigrationSuitabilitySkus + - Added Interface BillingSettings + - Added Interface Configuration + - Added Interface CostDetailsCommon + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorModel + - Added Interface ErrorResponse + - Added Interface Linkages + - Added Interface ManagementDetails + - Added Interface MigrateClientOptionalParams + - Added Interface MigrationDetails + - Added Interface MigrationIssues + - Added Interface MigrationSuitability + - Added Interface MoreInformation + - Added Interface NameValuePair + - Added Interface NameValuePairCloudSuitabilityCommon + - Added Interface NameValuePairCostType + - Added Interface NameValuePairSavingsType + - Added Interface PagedAsyncIterableIterator + - Added Interface PageSettings + - Added Interface PerformanceData + - Added Interface ProxyResource + - Added Interface RecommendedFor + - Added Interface Resource + - Added Interface RestorePollerOptions + - Added Interface SavingsDetailsCommon + - Added Interface SavingsSettings + - Added Interface Scope + - Added Interface SecuritySuitability + - Added Interface SkuDetails + - Added Interface SkusMigrationSuitability + - Added Interface SourceDetails + - Added Interface SourceRecommendationMigrationSuitability + - Added Interface SystemData + - Added Interface TargetDetails + - Added Interface TargetSourcePair + - Added Class MigrateClient + - Added Type Alias ActionType + - Added Type Alias AssessedMachineType + - Added Type Alias AssessmentSource + - Added Type Alias AvsAssessmentScenario + - Added Type Alias AzureAvsNodeType + - Added Type Alias AzureAvsSuitabilityExplanation + - Added Type Alias AzureCurrency + - Added Type Alias AzureManagementOfferingType + - Added Type Alias AzureOffer + - Added Type Alias AzureReservedInstance + - Added Type Alias AzureTarget + - Added Type Alias CloudSuitabilityCommon + - Added Type Alias ContinuablePage + - Added Type Alias CostType + - Added Type Alias CreatedByType + - Added Type Alias EnvironmentType + - Added Type Alias ExternalStorageType + - Added Type Alias FttAndRaidLevel + - Added Type Alias GuestOperatingSystemArchitecture + - Added Type Alias LicensingProgram + - Added Type Alias LinkageKind + - Added Type Alias LinkageType + - Added Type Alias MigrateWorkloadType + - Added Type Alias MigrationIssuesCategory + - Added Type Alias MigrationPlatform + - Added Type Alias MigrationType + - Added Type Alias NetworkSkuType + - Added Type Alias Origin + - Added Type Alias SavingsOptions + - Added Type Alias SavingsType + - Added Type Alias ScopeType + - Added Type Alias SkuKind + - Added Type Alias SkuType + - Added Type Alias StrategyType + - Added Type Alias SummaryType + - Interface Operation has a new optional parameter actionType + - Interface Operation has a new optional parameter isDataAction + - Added Enum KnownActionType + - Added Enum KnownAssessedMachineType + - Added Enum KnownAssessmentSource + - Added Enum KnownAvsApiVersions + - Added Enum KnownAvsAssessmentScenario + - Added Enum KnownAzureAvsNodeType + - Added Enum KnownAzureAvsSuitabilityExplanation + - Added Enum KnownAzureCurrency + - Added Enum KnownAzureManagementOfferingType + - Added Enum KnownAzureOffer + - Added Enum KnownAzureReservedInstance + - Added Enum KnownAzureTarget + - Added Enum KnownCloudSuitabilityCommon + - Added Enum KnownCostType + - Added Enum KnownCreatedByType + - Added Enum KnownEnvironmentType + - Added Enum KnownExternalStorageType + - Added Enum KnownFttAndRaidLevel + - Added Enum KnownGuestOperatingSystemArchitecture + - Added Enum KnownLicensingProgram + - Added Enum KnownLinkageKind + - Added Enum KnownLinkageType + - Added Enum KnownMigrateWorkloadType + - Added Enum KnownMigrationIssuesCategory + - Added Enum KnownMigrationPlatform + - Added Enum KnownMigrationType + - Added Enum KnownNetworkSkuType + - Added Enum KnownOrigin + - Added Enum KnownSavingsOptions + - Added Enum KnownSavingsType + - Added Enum KnownScopeType + - Added Enum KnownSkuKind + - Added Enum KnownSkuType + - Added Enum KnownStrategyType + - Added Enum KnownSummaryType + - Enum KnownAssessmentStatus has a new value Deleted + - Enum KnownAssessmentStatus has a new value Failed + - Enum KnownAzureLocation has a new value AustraliaCentral + - Enum KnownAzureLocation has a new value AustraliaCentral2 + - Enum KnownAzureLocation has a new value ChinaEast2 + - Enum KnownAzureLocation has a new value ChinaNorth2 + - Enum KnownAzureLocation has a new value FranceCentral + - Enum KnownAzureLocation has a new value FranceSouth + - Enum KnownAzureLocation has a new value GermanyNorth + - Enum KnownAzureLocation has a new value GermanyWestCentral + - Enum KnownAzureLocation has a new value IsraelCentral + - Enum KnownAzureLocation has a new value ItalyNorth + - Enum KnownAzureLocation has a new value JioIndiaWest + - Enum KnownAzureLocation has a new value MexicoCentral + - Enum KnownAzureLocation has a new value NewZealandNorth + - Enum KnownAzureLocation has a new value NorwayEast + - Enum KnownAzureLocation has a new value NorwayWest + - Enum KnownAzureLocation has a new value PolandCentral + - Enum KnownAzureLocation has a new value QatarCentral + - Enum KnownAzureLocation has a new value SouthAfricaNorth + - Enum KnownAzureLocation has a new value SouthAfricaWest + - Enum KnownAzureLocation has a new value SpainCentral + - Enum KnownAzureLocation has a new value SwedenCentral + - Enum KnownAzureLocation has a new value SwitzerlandNorth + - Enum KnownAzureLocation has a new value SwitzerlandWest + - Enum KnownAzureLocation has a new value UAECentral + - Enum KnownAzureLocation has a new value UAENorth + - Enum KnownAzureLocation has a new value UsNatEast + - Enum KnownAzureLocation has a new value UsNatWest + - Enum KnownAzureLocation has a new value UsSecCentral + - Enum KnownAzureLocation has a new value UsSecEast + - Enum KnownAzureLocation has a new value UsSecWest + - Enum KnownMachineBootType has a new value NotSpecified + - Enum KnownPercentile has a new value PercentileUnknown + - Enum KnownProvisioningState has a new value Canceled + - Enum KnownProvisioningState has a new value Provisioning + - Enum KnownProvisioningState has a new value Updating + - Added function restorePoller -### Bugs Fixed - -### Other Changes +### Breaking Changes + - Removed operation group AssessedMachines + - Removed operation group Assessments + - Removed operation group Groups + - Removed operation group HyperVCollectors + - Removed operation group ImportCollectors + - Removed operation group Machines + - Removed operation group PrivateEndpointConnectionOperations + - Removed operation group PrivateLinkResourceOperations + - Removed operation group Projects + - Removed operation group ServerCollectors + - Removed operation group VMwareCollectors + - Deleted Class AzureMigrateV2 + - Parameter assessmentReportUrl of interface DownloadUrl is now required + - Parameter expirationTime of interface DownloadUrl is now required + - Type of parameter origin of interface Operation is changed from string to Origin + - Removed Enum KnownAssessmentStage + - Removed Enum KnownAzureDiskSize + - Removed Enum KnownAzureDiskSuitabilityDetail + - Removed Enum KnownAzureDiskSuitabilityExplanation + - Removed Enum KnownAzureDiskType + - Removed Enum KnownAzureHybridUseBenefit + - Removed Enum KnownAzureNetworkAdapterSuitabilityDetail + - Removed Enum KnownAzureNetworkAdapterSuitabilityExplanation + - Removed Enum KnownAzureOfferCode + - Removed Enum KnownAzurePricingTier + - Removed Enum KnownAzureStorageRedundancy + - Removed Enum KnownAzureVmFamily + - Removed Enum KnownAzureVmSize + - Removed Enum KnownAzureVmSuitabilityDetail + - Removed Enum KnownAzureVmSuitabilityExplanation + - Removed Enum KnownCurrency + - Removed Enum KnownGroupStatus + - Removed Enum KnownGroupUpdateOperation + - Removed Enum KnownPrivateEndpointConnectionPropertiesProvisioningState + - Removed Enum KnownPrivateLinkServiceConnectionStateStatus + - Removed Enum KnownProjectStatus + - Removed Enum KnownReservedInstance + - Enum KnownProvisioningState no longer has value Creating + - Enum KnownProvisioningState no longer has value Moving + - Removed function getContinuationToken + ## 2.0.3 (2023-01-29) ### Features Added @@ -40,4 +259,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. 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/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/migrate/arm-migrate/LICENSE b/sdk/migrate/arm-migrate/LICENSE index b2f52a2bad4e..63447fd8bbbf 100644 --- a/sdk/migrate/arm-migrate/LICENSE +++ b/sdk/migrate/arm-migrate/LICENSE @@ -18,4 +18,4 @@ 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. +SOFTWARE. \ No newline at end of file diff --git a/sdk/migrate/arm-migrate/README.md b/sdk/migrate/arm-migrate/README.md index e8f44d91c7bc..11b364ed996a 100644 --- a/sdk/migrate/arm-migrate/README.md +++ b/sdk/migrate/arm-migrate/README.md @@ -1,13 +1,15 @@ -# AzureMigrateV2 client library for JavaScript +# Azure Migrate client library for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMigrateV2 client. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Migrate client. -Assess your workloads for Azure. +Azure Migrate Resource Provider management API. -[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/migrate/arm-migrate) | -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-migrate) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-migrate) | -[Samples](https://github.com/Azure-Samples/azure-samples-js-management) +Key links: + +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/migrate/arm-migrate) +- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-migrate) +- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-migrate?view=azure-node-preview) +- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/migrate/arm-migrate/samples) ## Getting started @@ -24,16 +26,16 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP ### Install the `@azure/arm-migrate` package -Install the AzureMigrateV2 client library for JavaScript with `npm`: +Install the Azure Migrate client library for JavaScript with `npm`: ```bash npm install @azure/arm-migrate ``` -### Create and authenticate a `AzureMigrateV2` +### Create and authenticate a `MigrateClient` -To create a client object to access the AzureMigrateV2 API, you will need the `endpoint` of your AzureMigrateV2 resource and a `credential`. The AzureMigrateV2 client can use Azure Active Directory credentials to authenticate. -You can find the endpoint for your AzureMigrateV2 resource in the [Azure Portal][azure_portal]. +To create a client object to access the Azure Migrate API, you will need the `endpoint` of your Azure Migrate resource and a `credential`. The Azure Migrate client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure Migrate 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). @@ -43,44 +45,42 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below npm install @azure/identity ``` -You will also need to **register a new AAD application and grant access to AzureMigrateV2** 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`. +You will also need to **register a new AAD application and grant access to Azure Migrate** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client. ```ts snippet:ReadmeSampleCreateClient_Node -import { AzureMigrateV2 } from "@azure/arm-migrate"; +import { MigrateClient } from "@azure/arm-migrate"; import { DefaultAzureCredential } from "@azure/identity"; const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const client = new AzureMigrateV2(new DefaultAzureCredential(), subscriptionId); +const client = new MigrateClient(new DefaultAzureCredential(), subscriptionId); ``` For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate. ```ts snippet:ReadmeSampleCreateClient_Browser import { InteractiveBrowserCredential } from "@azure/identity"; -import { AzureMigrateV2 } from "@azure/arm-migrate"; +import { MigrateClient } from "@azure/arm-migrate"; -const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", - clientId: "", -}); -const client = new AzureMigrateV2(credential, subscriptionId); + clientId: "" + }); +const client = new MigrateClient(credential, subscriptionId); ``` -### JavaScript Bundle +### 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 -### AzureMigrateV2 +### MigrateClient -`AzureMigrateV2` is the primary interface for developers using the AzureMigrateV2 client library. Explore the methods on this client object to understand the different features of the AzureMigrateV2 service that you can access. +`MigrateClient` is the primary interface for developers using the Azure Migrate client library. Explore the methods on this client object to understand the different features of the Azure Migrate service that you can access. ## Troubleshooting @@ -98,7 +98,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur ## 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. +Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/migrate/arm-migrate/samples) directory for detailed examples on how to use this library. ## Contributing @@ -108,8 +108,6 @@ If you'd like to contribute to this library, please read the [contributing guide - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) -[azure_cli]: https://learn.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 diff --git a/sdk/migrate/arm-migrate/_meta.json b/sdk/migrate/arm-migrate/_meta.json deleted file mode 100644 index d3c31a01f078..000000000000 --- a/sdk/migrate/arm-migrate/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "commit": "d967edeee8fd6af6d40bffe53cceed1bd053d7ad", - "readme": "specification\\migrate\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\migrate\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.7 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.0", - "use": "@autorest/typescript@6.0.0-rc.7" -} diff --git a/sdk/migrate/arm-migrate/assets.json b/sdk/migrate/arm-migrate/assets.json deleted file mode 100644 index 54a426c7d9ab..000000000000 --- a/sdk/migrate/arm-migrate/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/migrate/arm-migrate", - "Tag": "js/migrate/arm-migrate_6bd1a824e4" -} diff --git a/sdk/migrate/arm-migrate/eslint.config.mjs b/sdk/migrate/arm-migrate/eslint.config.mjs new file mode 100644 index 000000000000..6d2f8a5914c3 --- /dev/null +++ b/sdk/migrate/arm-migrate/eslint.config.mjs @@ -0,0 +1,14 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", + }, + }, +]); diff --git a/sdk/migrate/arm-migrate/package.json b/sdk/migrate/arm-migrate/package.json index 74b7bdc69bff..d6ea54e63b83 100644 --- a/sdk/migrate/arm-migrate/package.json +++ b/sdk/migrate/arm-migrate/package.json @@ -1,110 +1,128 @@ { "name": "@azure/arm-migrate", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", - "description": "A generated SDK for AzureMigrateV2.", - "version": "2.0.4", + "version": "3.0.0-beta.1", + "description": "A generated SDK for MigrateClient.", "engines": { "node": ">=18.0.0" }, - "dependencies": { - "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", - "@azure/core-paging": "^1.6.2", - "@azure/core-rest-pipeline": "^1.19.0", - "tslib": "^2.8.1" + "sideEffects": false, + "autoPublish": false, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts", + "./api": "./src/api/index.ts", + "./api/avsGraphAssessmentOptionsOperations": "./src/api/avsGraphAssessmentOptionsOperations/index.ts", + "./api/avsAssessmentV2SummaryOperations": "./src/api/avsAssessmentV2SummaryOperations/index.ts", + "./api/avsAssessedMachinesV2Operations": "./src/api/avsAssessedMachinesV2Operations/index.ts", + "./api/avsAssessmentsV2Operations": "./src/api/avsAssessmentsV2Operations/index.ts", + "./api/operations": "./src/api/operations/index.ts", + "./models": "./src/models/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false, + "project": "./tsconfig.src.json" }, + "type": "module", "keywords": [ "node", "azure", + "cloud", "typescript", "browser", - "isomorphic", - "cloud" + "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", + "files": [ + "dist/", + "README.md", + "LICENSE", + "review/", + "CHANGELOG.md" + ], + "sdk-type": "mgmt", + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/migrate/arm-migrate/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/api/migrateContext.ts", + "prefix": "userAgentInfo" + } + ] + }, + "dependencies": { + "@azure-rest/core-client": "^2.3.1", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-lro": "^3.1.0", + "@azure/core-rest-pipeline": "^1.20.0", + "@azure/core-util": "^1.12.0", + "@azure/logger": "^1.2.0", + "tslib": "^2.8.1" + }, "devDependencies": { "@azure-tools/test-credential": "^2.0.0", "@azure-tools/test-recorder": "^4.1.0", "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.6.0", - "@azure/logger": "^1.1.4", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "^4.9.1", "@types/node": "^18.0.0", "@vitest/browser": "^3.0.9", "@vitest/coverage-istanbul": "^3.0.9", "dotenv": "^16.0.0", - "playwright": "^1.50.1", + "eslint": "^9.9.0", + "playwright": "^1.52.0", "typescript": "~5.8.2", "vitest": "^3.0.9" }, - "repository": "github:Azure/azure-sdk-for-js", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/", - "README.md", - "LICENSE", - "review/", - "CHANGELOG.md" - ], "scripts": { "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "build:samples": "echo skipped.", - "check-format": "echo skipped", + "build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", - "format": "echo skipped", - "lint": "echo skipped", + "execute:samples": "dev-tool samples run samples-dev", + "extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "generate:client": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", - "prepack": "npm run build", - "test": "npm run test:node && npm run test:browser", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", "test:browser": "echo skipped", "test:node": "dev-tool run test:vitest", - "test:node:esm": "dev-tool run test:vitest --esm", - "update-snippets": "dev-tool run update-snippets" + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser", + "unit-test:node": "dev-tool run test:vitest", + "update-snippets": "dev-tool run update-snippets", + "test:node:esm": "dev-tool run test:vitest --esm" }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/azureMigrateV2.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/migrate/arm-migrate", "//sampleConfiguration": { - "productName": "", + "productName": "@azure/arm-migrate", "productSlugs": [ "azure" ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-migrate?view=azure-node-preview" }, - "type": "module", - "tshy": { - "project": "./tsconfig.src.json", - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], - "selfLink": false - }, "browser": "./dist/browser/index.js", "react-native": "./dist/react-native/index.js", "exports": { @@ -126,6 +144,135 @@ "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" } + }, + "./api": { + "browser": { + "types": "./dist/browser/api/index.d.ts", + "default": "./dist/browser/api/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/index.d.ts", + "default": "./dist/react-native/api/index.js" + }, + "import": { + "types": "./dist/esm/api/index.d.ts", + "default": "./dist/esm/api/index.js" + }, + "require": { + "types": "./dist/commonjs/api/index.d.ts", + "default": "./dist/commonjs/api/index.js" + } + }, + "./api/avsGraphAssessmentOptionsOperations": { + "browser": { + "types": "./dist/browser/api/avsGraphAssessmentOptionsOperations/index.d.ts", + "default": "./dist/browser/api/avsGraphAssessmentOptionsOperations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/avsGraphAssessmentOptionsOperations/index.d.ts", + "default": "./dist/react-native/api/avsGraphAssessmentOptionsOperations/index.js" + }, + "import": { + "types": "./dist/esm/api/avsGraphAssessmentOptionsOperations/index.d.ts", + "default": "./dist/esm/api/avsGraphAssessmentOptionsOperations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/avsGraphAssessmentOptionsOperations/index.d.ts", + "default": "./dist/commonjs/api/avsGraphAssessmentOptionsOperations/index.js" + } + }, + "./api/avsAssessmentV2SummaryOperations": { + "browser": { + "types": "./dist/browser/api/avsAssessmentV2SummaryOperations/index.d.ts", + "default": "./dist/browser/api/avsAssessmentV2SummaryOperations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/avsAssessmentV2SummaryOperations/index.d.ts", + "default": "./dist/react-native/api/avsAssessmentV2SummaryOperations/index.js" + }, + "import": { + "types": "./dist/esm/api/avsAssessmentV2SummaryOperations/index.d.ts", + "default": "./dist/esm/api/avsAssessmentV2SummaryOperations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/avsAssessmentV2SummaryOperations/index.d.ts", + "default": "./dist/commonjs/api/avsAssessmentV2SummaryOperations/index.js" + } + }, + "./api/avsAssessedMachinesV2Operations": { + "browser": { + "types": "./dist/browser/api/avsAssessedMachinesV2Operations/index.d.ts", + "default": "./dist/browser/api/avsAssessedMachinesV2Operations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/avsAssessedMachinesV2Operations/index.d.ts", + "default": "./dist/react-native/api/avsAssessedMachinesV2Operations/index.js" + }, + "import": { + "types": "./dist/esm/api/avsAssessedMachinesV2Operations/index.d.ts", + "default": "./dist/esm/api/avsAssessedMachinesV2Operations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/avsAssessedMachinesV2Operations/index.d.ts", + "default": "./dist/commonjs/api/avsAssessedMachinesV2Operations/index.js" + } + }, + "./api/avsAssessmentsV2Operations": { + "browser": { + "types": "./dist/browser/api/avsAssessmentsV2Operations/index.d.ts", + "default": "./dist/browser/api/avsAssessmentsV2Operations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/avsAssessmentsV2Operations/index.d.ts", + "default": "./dist/react-native/api/avsAssessmentsV2Operations/index.js" + }, + "import": { + "types": "./dist/esm/api/avsAssessmentsV2Operations/index.d.ts", + "default": "./dist/esm/api/avsAssessmentsV2Operations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/avsAssessmentsV2Operations/index.d.ts", + "default": "./dist/commonjs/api/avsAssessmentsV2Operations/index.js" + } + }, + "./api/operations": { + "browser": { + "types": "./dist/browser/api/operations/index.d.ts", + "default": "./dist/browser/api/operations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/operations/index.d.ts", + "default": "./dist/react-native/api/operations/index.js" + }, + "import": { + "types": "./dist/esm/api/operations/index.d.ts", + "default": "./dist/esm/api/operations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/operations/index.d.ts", + "default": "./dist/commonjs/api/operations/index.js" + } + }, + "./models": { + "browser": { + "types": "./dist/browser/models/index.d.ts", + "default": "./dist/browser/models/index.js" + }, + "react-native": { + "types": "./dist/react-native/models/index.d.ts", + "default": "./dist/react-native/models/index.js" + }, + "import": { + "types": "./dist/esm/models/index.d.ts", + "default": "./dist/esm/models/index.js" + }, + "require": { + "types": "./dist/commonjs/models/index.d.ts", + "default": "./dist/commonjs/models/index.js" + } } - } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js" } diff --git a/sdk/migrate/arm-migrate/review/arm-migrate-api-avsAssessedMachinesV2Operations.api.md b/sdk/migrate/arm-migrate/review/arm-migrate-api-avsAssessedMachinesV2Operations.api.md new file mode 100644 index 000000000000..98bfc711559e --- /dev/null +++ b/sdk/migrate/arm-migrate/review/arm-migrate-api-avsAssessedMachinesV2Operations.api.md @@ -0,0 +1,30 @@ +## API Report File for "@azure/arm-migrate" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; + +// @public +export interface AvsAssessedMachinesV2OperationsGetOptionalParams extends OperationOptions { +} + +// @public +export interface AvsAssessedMachinesV2OperationsListByParentOptionalParams extends OperationOptions { + continuationToken?: string; + filter?: string; + pageSize?: number; + totalRecordCount?: number; +} + +// @public +export function get(context: MigrateContext, resourceGroupName: string, projectName: string, assessmentName: string, avsAssessedMachineName: string, options?: AvsAssessedMachinesV2OperationsGetOptionalParams): Promise; + +// @public +export function listByParent(context: MigrateContext, resourceGroupName: string, projectName: string, assessmentName: string, options?: AvsAssessedMachinesV2OperationsListByParentOptionalParams): PagedAsyncIterableIterator; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/migrate/arm-migrate/review/arm-migrate-api-avsAssessmentV2SummaryOperations.api.md b/sdk/migrate/arm-migrate/review/arm-migrate-api-avsAssessmentV2SummaryOperations.api.md new file mode 100644 index 000000000000..499e608a7518 --- /dev/null +++ b/sdk/migrate/arm-migrate/review/arm-migrate-api-avsAssessmentV2SummaryOperations.api.md @@ -0,0 +1,26 @@ +## API Report File for "@azure/arm-migrate" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; + +// @public +export interface AvsAssessmentV2SummaryOperationsGetOptionalParams extends OperationOptions { +} + +// @public +export interface AvsAssessmentV2SummaryOperationsListByParentOptionalParams extends OperationOptions { +} + +// @public +export function get(context: MigrateContext, resourceGroupName: string, projectName: string, assessmentName: string, summaryName: string, options?: AvsAssessmentV2SummaryOperationsGetOptionalParams): Promise; + +// @public +export function listByParent(context: MigrateContext, resourceGroupName: string, projectName: string, assessmentName: string, options?: AvsAssessmentV2SummaryOperationsListByParentOptionalParams): PagedAsyncIterableIterator; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/migrate/arm-migrate/review/arm-migrate-api-avsAssessmentsV2Operations.api.md b/sdk/migrate/arm-migrate/review/arm-migrate-api-avsAssessmentsV2Operations.api.md new file mode 100644 index 000000000000..d2db83525552 --- /dev/null +++ b/sdk/migrate/arm-migrate/review/arm-migrate-api-avsAssessmentsV2Operations.api.md @@ -0,0 +1,51 @@ +## API Report File for "@azure/arm-migrate" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: MigrateContext, resourceGroupName: string, projectName: string, assessmentName: string, options?: AvsAssessmentsV2OperationsDeleteOptionalParams): Promise; + +// @public +export interface AvsAssessmentsV2OperationsCreateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface AvsAssessmentsV2OperationsDeleteOptionalParams extends OperationOptions { +} + +// @public +export interface AvsAssessmentsV2OperationsDownloadUrlOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface AvsAssessmentsV2OperationsGetOptionalParams extends OperationOptions { +} + +// @public +export interface AvsAssessmentsV2OperationsListByParentOptionalParams extends OperationOptions { +} + +// @public +export function create(context: MigrateContext, resourceGroupName: string, projectName: string, assessmentName: string, resource: AvsAssessmentV2, options?: AvsAssessmentsV2OperationsCreateOptionalParams): PollerLike, AvsAssessmentV2>; + +// @public +export function downloadUrl(context: MigrateContext, resourceGroupName: string, projectName: string, assessmentName: string, body: Record, options?: AvsAssessmentsV2OperationsDownloadUrlOptionalParams): PollerLike, DownloadUrl>; + +// @public +export function get(context: MigrateContext, resourceGroupName: string, projectName: string, assessmentName: string, options?: AvsAssessmentsV2OperationsGetOptionalParams): Promise; + +// @public +export function listByParent(context: MigrateContext, resourceGroupName: string, projectName: string, options?: AvsAssessmentsV2OperationsListByParentOptionalParams): PagedAsyncIterableIterator; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/migrate/arm-migrate/review/arm-migrate-api-avsGraphAssessmentOptionsOperations.api.md b/sdk/migrate/arm-migrate/review/arm-migrate-api-avsGraphAssessmentOptionsOperations.api.md new file mode 100644 index 000000000000..8c0e86fab8a5 --- /dev/null +++ b/sdk/migrate/arm-migrate/review/arm-migrate-api-avsGraphAssessmentOptionsOperations.api.md @@ -0,0 +1,26 @@ +## API Report File for "@azure/arm-migrate" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; + +// @public +export interface AvsGraphAssessmentOptionsOperationsGetOptionalParams extends OperationOptions { +} + +// @public +export interface AvsGraphAssessmentOptionsOperationsListByParentOptionalParams extends OperationOptions { +} + +// @public +export function get(context: MigrateContext, resourceGroupName: string, projectName: string, options?: AvsGraphAssessmentOptionsOperationsGetOptionalParams): Promise; + +// @public +export function listByParent(context: MigrateContext, resourceGroupName: string, projectName: string, options?: AvsGraphAssessmentOptionsOperationsListByParentOptionalParams): PagedAsyncIterableIterator; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/migrate/arm-migrate/review/arm-migrate-api-operations.api.md b/sdk/migrate/arm-migrate/review/arm-migrate-api-operations.api.md new file mode 100644 index 000000000000..dc676c0aa0ac --- /dev/null +++ b/sdk/migrate/arm-migrate/review/arm-migrate-api-operations.api.md @@ -0,0 +1,19 @@ +## API Report File for "@azure/arm-migrate" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; + +// @public +export function list(context: MigrateContext, options?: OperationsListOptionalParams): PagedAsyncIterableIterator; + +// @public +export interface OperationsListOptionalParams extends OperationOptions { +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/migrate/arm-migrate/review/arm-migrate-api.api.md b/sdk/migrate/arm-migrate/review/arm-migrate-api.api.md new file mode 100644 index 000000000000..f76162e288e6 --- /dev/null +++ b/sdk/migrate/arm-migrate/review/arm-migrate-api.api.md @@ -0,0 +1,27 @@ +## API Report File for "@azure/arm-migrate" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { ClientOptions } from '@azure-rest/core-client'; +import { TokenCredential } from '@azure/core-auth'; + +// @public +export function createMigrate(credential: TokenCredential, subscriptionId: string, options?: MigrateClientOptionalParams): MigrateContext; + +// @public +export interface MigrateClientOptionalParams extends ClientOptions { + apiVersion?: string; +} + +// @public +export interface MigrateContext extends Client { + apiVersion: string; + subscriptionId: string; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/migrate/arm-migrate/review/arm-migrate-models.api.md b/sdk/migrate/arm-migrate/review/arm-migrate-models.api.md new file mode 100644 index 000000000000..91c03f57ed99 --- /dev/null +++ b/sdk/migrate/arm-migrate/review/arm-migrate-models.api.md @@ -0,0 +1,1071 @@ +## API Report File for "@azure/arm-migrate" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export type ActionType = string; + +// @public +export type AssessedMachineType = string; + +// @public +export interface AssessmentDetails { + readonly confidenceRatingInPercentage?: number; + readonly createdTimestamp?: Date; + readonly pricesTimestamp?: Date; + readonly status?: AssessmentStatus; + readonly updatedTimestamp?: Date; +} + +// @public +export type AssessmentSizingCriterion = string; + +// @public +export type AssessmentSource = string; + +// @public +export type AssessmentStatus = string; + +// @public +export interface AvsAssessedDiskV2 { + readonly assessedExternalStorageType?: ExternalStorageType; + readonly displayName?: string; + readonly estimatedDiskSizeInGB?: number; + readonly gigabytesProvisioned?: number; + readonly megabytesPerSecondOfRead?: number; + readonly megabytesPerSecondOfWrite?: number; + readonly name?: string; + readonly numberOfReadOperationsPerSecond?: number; + readonly numberOfWriteOperationsPerSecond?: number; +} + +// @public +export interface AvsAssessedMachineExtendedDetails { + readonly avsTargetNode?: AzureAvsNodeType; + readonly bootType?: MachineBootType; + readonly datacenterManagementServerName?: string; + readonly description?: string; + readonly disks?: AvsAssessedDiskV2[]; + readonly displayName?: string; + readonly errors?: ErrorModel[]; + readonly megabytesOfMemory?: number; + readonly networkAdapters?: AvsAssessedNetworkAdapter[]; + readonly numberOfCores?: number; + readonly operatingSystemArchitecture?: GuestOperatingSystemArchitecture; + readonly operatingSystemName?: string; + readonly operatingSystemType?: string; + readonly operatingSystemVersion?: string; + readonly percentageCoresUtilization?: number; + readonly percentageMemoryUtilization?: number; + readonly storageInUseGB?: number; +} + +// @public +export interface AvsAssessedMachinePropertiesV2 { + readonly assessedMachineType?: AssessedMachineType; + readonly createdTimestamp?: Date; + readonly extendedDetails?: AvsAssessedMachineExtendedDetails; + readonly linkages?: Linkages[]; + readonly recommendations?: AvsRecommendationsMigrationIssuesMigrationSuitabilitySkus[]; + readonly updatedTimestamp?: Date; + readonly workloadType?: MigrateWorkloadType; +} + +// @public +export interface AvsAssessedMachineV2 extends ProxyResource { + properties?: AvsAssessedMachinePropertiesV2; +} + +// @public +export interface AvsAssessedNetworkAdapter { + readonly displayName?: string; + readonly ipAddresses?: string[]; + readonly macAddress?: string; + readonly megabytesPerSecondRecieved?: number; + readonly megabytesPerSecondTransmitted?: number; + readonly name?: string; +} + +// @public +export interface AvsAssessmentOptionsOutboundEdgeGroup { + avsExternalStorageTypes: ExternalStorageType[]; + avsNodes: AzureAvsNodeType[]; + currencies: AzureCurrency[]; + failuresToTolerateAndRaidLevelValues: FttAndRaidLevel[]; + licensingProgram: LicensingProgram[]; + savingsOptions: SavingsOptions[]; + targetLocations: AzureLocation[]; +} + +// @public +export interface AvsAssessmentPropertiesV2 { + details?: AssessmentDetails; + fallbackMachineAssessmentArmId?: string; + readonly provisioningState?: ProvisioningState; + scope?: Scope; + settings?: AvsAssessmentSettings; +} + +// @public +export type AvsAssessmentScenario = string; + +// @public +export interface AvsAssessmentSettings { + avsAssessmentScenario?: AvsAssessmentScenario; + azureLocation?: string; + billingSettings?: BillingSettings; + cpuHeadroom?: number; + currency?: AzureCurrency; + dedupeCompression?: number; + discountPercentage?: number; + environmentType?: EnvironmentType; + externalStorageTypes?: ExternalStorageType[]; + failuresToTolerateAndRaidLevelList?: FttAndRaidLevel[]; + isStretchClusterEnabled?: boolean; + isVcfByolEnabled?: boolean; + memOvercommit?: number; + nodeTypes?: AzureAvsNodeType[]; + performanceData?: PerformanceData; + savingsSettings?: SavingsSettings; + scalingFactor?: number; + sizingCriterion?: AssessmentSizingCriterion; + vcpuOversubscription?: number; +} + +// @public +export interface AvsAssessmentSummaryPropertiesV2 { + readonly avsEstimatedExternalStorages?: AvsEstimatedExternalStorage[]; + readonly avsEstimatedNetworks?: AvsEstimatedNetwork[]; + readonly avsEstimatedNodes?: AvsEstimatedNode[]; + readonly costComponents?: CostDetailsCommon[]; + readonly cpuUtilization?: number; + readonly limitingFactor?: string; + readonly numberOfNodes?: number; + readonly ramUtilization?: number; + readonly savingsComponents?: SavingsDetailsCommon[]; + readonly sources?: SourceDetails[]; + readonly storageUtilization?: number; + readonly suitability?: CloudSuitability; + readonly suitabilityExplanation?: AzureAvsSuitabilityExplanation; + readonly summaryName?: string; + readonly summaryType?: SummaryType; + readonly targets?: TargetDetails[]; + readonly targetSourceMapping?: TargetSourcePair[]; + readonly totalCpuCores?: number; + readonly totalRamInGB?: number; + readonly totalStorageInGB?: number; +} + +// @public +export interface AvsAssessmentV2 extends ProxyResource { + properties?: AvsAssessmentPropertiesV2; +} + +// @public +export interface AvsAssessmentV2Summary extends ProxyResource { + properties?: AvsAssessmentSummaryPropertiesV2; +} + +// @public +export interface AvsEstimatedExternalStorage { + monthlyPrice?: number; + storageType?: ExternalStorageType; + storageUtilization?: number; + totalStorageInGB?: number; +} + +// @public +export interface AvsEstimatedNetwork { + monthlyPrice?: number; + networkType?: NetworkSkuType; +} + +// @public +export interface AvsEstimatedNode { + cpuUtilization?: number; + fttRaidLevel?: FttAndRaidLevel; + monthlyPrice?: number; + nodeNumber?: number; + nodeType?: AzureAvsNodeType; + pricingModel?: AzureReservedInstance; + ramUtilization?: number; + storageUtilization?: number; + totalCpu?: number; + totalRam?: number; + totalStorage?: number; +} + +// @public +export interface AvsGraphAssessmentOptions extends ProxyResource { + properties?: AvsGraphAssessmentOptionsProperties; +} + +// @public +export interface AvsGraphAssessmentOptionsProperties { + edges: Record; +} + +// @public +export interface AvsRecommendationsMigrationIssuesMigrationSuitabilitySkus { + readonly confidenceScore?: number; + readonly configuration?: Configuration; + fallbackMachineAssessmentArmId?: string; + readonly migrationIssues?: MigrationIssues[]; + readonly migrationPlatform?: MigrationPlatform; + readonly migrationSuitability?: MigrationSuitability; + readonly recommendedFor?: RecommendedFor; + readonly securitySuitability?: SecuritySuitability; + readonly skus?: SkusMigrationSuitability[]; + readonly totalCost?: CostDetailsCommon[]; + readonly totalSavings?: SavingsDetailsCommon[]; +} + +// @public +export type AzureAvsNodeType = string; + +// @public +export type AzureAvsSuitabilityExplanation = string; + +// @public +export type AzureCurrency = string; + +// @public +export type AzureLocation = string; + +// @public +export type AzureManagementOfferingType = string; + +// @public +export type AzureOffer = string; + +// @public +export type AzureReservedInstance = string; + +// @public +export type AzureTarget = string; + +// @public +export interface BillingSettings { + licensingProgram?: LicensingProgram; + subscriptionId?: string; +} + +// @public +export type CloudSuitability = string; + +// @public +export type CloudSuitabilityCommon = string; + +// @public +export interface Configuration { + readonly azureTarget?: AzureTarget; + readonly sizingCriterion?: AssessmentSizingCriterion; +} + +// @public +export interface CostDetailsCommon { + readonly costDetail?: NameValuePairCostType[]; + readonly savingOptions?: SavingsOptions; +} + +// @public +export type CostType = string; + +// @public +export type CreatedByType = string; + +// @public +export interface DownloadUrl { + readonly assessmentReportUrl: string; + readonly expirationTime: Date; +} + +// @public +export type EnvironmentType = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorModel { + readonly agentScenario?: string; + readonly applianceName?: string; + readonly code?: string; + readonly id?: number; + readonly impactedAssessmentType?: string; + readonly message?: string; + readonly messageParameters?: NameValuePair[]; + readonly possibleCauses?: string; + readonly recommendedAction?: string; + readonly runAsAccountId?: string; + readonly severity?: string; + readonly summaryMessage?: string; + readonly updatedTimeStamp?: Date; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export type ExternalStorageType = string; + +// @public +export type FttAndRaidLevel = string; + +// @public +export type GuestOperatingSystemArchitecture = string; + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownAssessedMachineType { + AssessedMachine = "AssessedMachine", + AvsAssessedMachine = "AvsAssessedMachine", + SqlAssessedMachine = "SqlAssessedMachine", + Unknown = "Unknown" +} + +// @public +export enum KnownAssessmentSizingCriterion { + AsOnPremises = "AsOnPremises", + PerformanceBased = "PerformanceBased" +} + +// @public +export enum KnownAssessmentSource { + IIS = "IIS", + Machine = "Machine", + MySQLServer = "MySQLServer", + OracleDatabase = "OracleDatabase", + OracleServer = "OracleServer", + SAPInstance = "SAPInstance", + SpringbootApplication = "SpringbootApplication", + SqlDatabase = "SqlDatabase", + SqlInstance = "SqlInstance", + TomCat = "TomCat", + Unknown = "Unknown", + WebApps = "WebApps" +} + +// @public +export enum KnownAssessmentStatus { + Completed = "Completed", + Created = "Created", + Deleted = "Deleted", + Failed = "Failed", + Invalid = "Invalid", + OutDated = "OutDated", + OutOfSync = "OutOfSync", + Running = "Running", + Updated = "Updated" +} + +// @public +export enum KnownAvsApiVersions { + V20240303Preview = "2024-03-03-preview" +} + +// @public +export enum KnownAvsAssessmentScenario { + AvsSddcExpansion = "AvsSddcExpansion", + NewAvsSddc = "NewAvsSddc", + Unknown = "Unknown" +} + +// @public +export enum KnownAzureAvsNodeType { + AV36 = "AV36", + AV36P = "AV36P", + AV52 = "AV52", + AV64 = "AV64", + Unknown = "Unknown" +} + +// @public +export enum KnownAzureAvsSuitabilityExplanation { + InternalErrorInRecommendation = "InternalErrorInRecommendation", + NotApplicable = "NotApplicable", + Unknown = "Unknown", + UnsupportedLocationForSelectedExternalStorageTypes = "UnsupportedLocationForSelectedExternalStorageTypes", + UnsupportedLocationForSelectedNode = "UnsupportedLocationForSelectedNode" +} + +// @public +export enum KnownAzureCurrency { + ARS = "ARS", + AUD = "AUD", + BRL = "BRL", + CAD = "CAD", + CHF = "CHF", + CNY = "CNY", + DKK = "DKK", + EUR = "EUR", + GBP = "GBP", + HKD = "HKD", + IDR = "IDR", + INR = "INR", + JPY = "JPY", + KRW = "KRW", + MXN = "MXN", + MYR = "MYR", + NOK = "NOK", + NZD = "NZD", + RUB = "RUB", + SAR = "SAR", + SEK = "SEK", + TRY = "TRY", + TWD = "TWD", + Unknown = "Unknown", + USD = "USD", + ZAR = "ZAR" +} + +// @public +export enum KnownAzureLocation { + AustraliaCentral = "AustraliaCentral", + AustraliaCentral2 = "AustraliaCentral2", + AustraliaEast = "AustraliaEast", + AustraliaSoutheast = "AustraliaSoutheast", + BrazilSouth = "BrazilSouth", + CanadaCentral = "CanadaCentral", + CanadaEast = "CanadaEast", + CentralIndia = "CentralIndia", + CentralUs = "CentralUs", + ChinaEast = "ChinaEast", + ChinaEast2 = "ChinaEast2", + ChinaNorth = "ChinaNorth", + ChinaNorth2 = "ChinaNorth2", + EastAsia = "EastAsia", + EastUs = "EastUs", + EastUs2 = "EastUs2", + FranceCentral = "FranceCentral", + FranceSouth = "FranceSouth", + GermanyCentral = "GermanyCentral", + GermanyNorth = "GermanyNorth", + GermanyNortheast = "GermanyNortheast", + GermanyWestCentral = "GermanyWestCentral", + IsraelCentral = "IsraelCentral", + ItalyNorth = "ItalyNorth", + JapanEast = "JapanEast", + JapanWest = "JapanWest", + JioIndiaWest = "JioIndiaWest", + KoreaCentral = "KoreaCentral", + KoreaSouth = "KoreaSouth", + MexicoCentral = "MexicoCentral", + NewZealandNorth = "NewZealandNorth", + NorthCentralUs = "NorthCentralUs", + NorthEurope = "NorthEurope", + NorwayEast = "NorwayEast", + NorwayWest = "NorwayWest", + PolandCentral = "PolandCentral", + QatarCentral = "QatarCentral", + SouthAfricaNorth = "SouthAfricaNorth", + SouthAfricaWest = "SouthAfricaWest", + SouthCentralUs = "SouthCentralUs", + SoutheastAsia = "SoutheastAsia", + SouthIndia = "SouthIndia", + SpainCentral = "SpainCentral", + SwedenCentral = "SwedenCentral", + SwitzerlandNorth = "SwitzerlandNorth", + SwitzerlandWest = "SwitzerlandWest", + UAECentral = "UAECentral", + UAENorth = "UAENorth", + UkSouth = "UkSouth", + UkWest = "UkWest", + Unknown = "Unknown", + USDoDCentral = "USDoDCentral", + USDoDEast = "USDoDEast", + USGovArizona = "USGovArizona", + USGovIowa = "USGovIowa", + USGovTexas = "USGovTexas", + USGovVirginia = "USGovVirginia", + UsNatEast = "UsNatEast", + UsNatWest = "UsNatWest", + UsSecCentral = "UsSecCentral", + UsSecEast = "UsSecEast", + UsSecWest = "UsSecWest", + WestCentralUs = "WestCentralUs", + WestEurope = "WestEurope", + WestIndia = "WestIndia", + WestUs = "WestUs", + WestUs2 = "WestUs2" +} + +// @public +export enum KnownAzureManagementOfferingType { + AUM = "AUM", + AzMon = "AzMon", + AzureBackup = "AzureBackup", + No = "No", + Scommi = "SCOMMI" +} + +// @public +export enum KnownAzureOffer { + EA = "EA", + Msazr0003P = "MSAZR0003P", + Msazr0023P = "MSAZR0023P", + Msazrusgov0003P = "MSAZRUSGOV0003P", + Msmcazr0044P = "MSMCAZR0044P", + Msmcazr0059P = "MSMCAZR0059P", + Msmcazr0060P = "MSMCAZR0060P", + Msmcazr0063P = "MSMCAZR0063P", + SavingsPlan1Year = "SavingsPlan1Year", + SavingsPlan3Year = "SavingsPlan3Year", + Unknown = "Unknown" +} + +// @public +export enum KnownAzureReservedInstance { + None = "None", + RI1Year = "RI1Year", + RI3Year = "RI3Year" +} + +// @public +export enum KnownAzureTarget { + AKS = "AKS", + Avs = "Avs", + AzureAppService = "AzureAppService", + AzureAppServiceContainer = "AzureAppServiceContainer", + AzureSpringApps = "AzureSpringApps", + AzureSqlvm = "AzureSQLVM", + AzureVM = "AzureVM", + FlexServerPG = "FlexServerPG", + MySQLAzureFlexServer = "MySQLAzureFlexServer", + OracleIaasVM = "OracleIaasVM", + SAPAzureInstance = "SAPAzureInstance", + SqlDatabase = "SqlDatabase", + SqlMI = "SqlMI", + Unknown = "Unknown" +} + +// @public +export enum KnownCloudSuitability { + ConditionallySuitable = "ConditionallySuitable", + NotSuitable = "NotSuitable", + ReadinessUnknown = "ReadinessUnknown", + Suitable = "Suitable", + Unknown = "Unknown" +} + +// @public +export enum KnownCloudSuitabilityCommon { + ConditionallySuitable = "ConditionallySuitable", + NotSuitable = "NotSuitable", + ReadinessUnknown = "ReadinessUnknown", + Suitable = "Suitable", + SuitableWithWarnings = "SuitableWithWarnings", + Unknown = "Unknown" +} + +// @public +export enum KnownCostType { + DataProtectionService = "DataProtectionService", + MonitoringService = "MonitoringService", + MonthlyAvsExternalStorageCost = "MonthlyAvsExternalStorageCost", + MonthlyAvsNetworkCost = "MonthlyAvsNetworkCost", + MonthlyAvsNodeCost = "MonthlyAvsNodeCost", + MonthlyAzureHybridCost = "MonthlyAzureHybridCost", + MonthlyBandwidthCost = "MonthlyBandwidthCost", + MonthlyComputeCost = "MonthlyComputeCost", + MonthlyLicensingCost = "MonthlyLicensingCost", + MonthlyLinuxAzureHybridCost = "MonthlyLinuxAzureHybridCost", + MonthlyManagementCost = "MonthlyManagementCost", + MonthlyPremiumStorageCost = "MonthlyPremiumStorageCost", + MonthlyPremiumV2StorageCost = "MonthlyPremiumV2StorageCost", + MonthlySecurityCost = "MonthlySecurityCost", + MonthlyStandardHddStorageCost = "MonthlyStandardHddStorageCost", + MonthlyStandardSsdStorageCost = "MonthlyStandardSsdStorageCost", + MonthlyStorageCost = "MonthlyStorageCost", + MonthlyUltraDiskCost = "MonthlyUltraDiskCost", + MonthlyUltraStorageCost = "MonthlyUltraStorageCost", + PatchingService = "PatchingService", + TotalMonthlyCost = "TotalMonthlyCost" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + +// @public +export enum KnownEnvironmentType { + DevTest = "DevTest", + Production = "Production", + Unknown = "Unknown" +} + +// @public +export enum KnownExternalStorageType { + AnfPremium = "AnfPremium", + AnfStandard = "AnfStandard", + AnfUltra = "AnfUltra", + None = "None", + Unknown = "Unknown" +} + +// @public +export enum KnownFttAndRaidLevel { + Ftt1Raid1 = "Ftt1Raid1", + Ftt1Raid5 = "Ftt1Raid5", + Ftt2Raid1 = "Ftt2Raid1", + Ftt2Raid6 = "Ftt2Raid6", + Ftt3Raid1 = "Ftt3Raid1", + Unknown = "Unknown" +} + +// @public +export enum KnownGuestOperatingSystemArchitecture { + Unknown = "Unknown", + X64 = "X64", + X86 = "X86" +} + +// @public +export enum KnownLicensingProgram { + EA = "EA", + MCA = "MCA", + Retail = "Retail", + Unknown = "Unknown" +} + +// @public +export enum KnownLinkageKind { + Database = "Database", + Instance = "Instance", + Machine = "Machine", + Server = "Server", + Unknown = "Unknown", + WebApplication = "WebApplication", + WebServer = "WebServer" +} + +// @public +export enum KnownLinkageType { + Parent = "Parent", + Source = "Source" +} + +// @public +export enum KnownMachineBootType { + Bios = "BIOS", + EFI = "EFI", + NotSpecified = "NotSpecified", + Unknown = "Unknown" +} + +// @public +export enum KnownMigrateWorkloadType { + Database = "Database", + Host = "Host", + Instance = "Instance", + Machine = "Machine", + ManagementServer = "ManagementServer", + Server = "Server", + Unknown = "Unknown", + WebApplication = "WebApplication", + WebServer = "WebServer" +} + +// @public +export enum KnownMigrationIssuesCategory { + Internal = "Internal", + Issue = "Issue", + Warning = "Warning" +} + +// @public +export enum KnownMigrationPlatform { + IaaS = "IaaS", + PaaS = "PaaS", + SaaS = "SaaS", + Unknown = "Unknown" +} + +// @public +export enum KnownMigrationType { + Rearchitect = "Rearchitect", + Rehost = "Rehost", + Replatform = "Replatform", + Retain = "Retain", + Unknown = "Unknown" +} + +// @public +export enum KnownNetworkSkuType { + ExpressRouteUltra = "ExpressRouteUltra", + None = "None", + Unknown = "Unknown" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownPercentile { + Percentile50 = "Percentile50", + Percentile90 = "Percentile90", + Percentile95 = "Percentile95", + Percentile99 = "Percentile99", + PercentileUnknown = "PercentileUnknown" +} + +// @public +export enum KnownProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownSavingsOptions { + CustomAzureOfferCode = "CustomAzureOfferCode", + None = "None", + RI1Year = "RI1Year", + RI3Year = "RI3Year", + SavingsPlan1Year = "SavingsPlan1Year", + SavingsPlan3Year = "SavingsPlan3Year" +} + +// @public +export enum KnownSavingsType { + MonthlyAhubSqlCostSavings = "MonthlyAhubSqlCostSavings", + MonthlyAzureHybridCostSavings = "MonthlyAzureHybridCostSavings", + MonthlyLinuxAzureHybridCostSavings = "MonthlyLinuxAzureHybridCostSavings", + MonthlyVcfByolCostDifference = "MonthlyVcfByolCostDifference" +} + +// @public +export enum KnownScopeType { + AzureResourceGraphQuery = "AzureResourceGraphQuery", + ServerGroupId = "ServerGroupId" +} + +// @public +export enum KnownSkuKind { + Details = "Details", + Endpoint = "Endpoint" +} + +// @public +export enum KnownSkuType { + AppServicePlan = "AppServicePlan", + AzureSpringApps = "AzureSpringApps", + Compute = "Compute", + Network = "Network", + Storage = "Storage", + Unknown = "Unknown" +} + +// @public +export enum KnownStrategyType { + CostOptimized = "CostOptimized", + EffortOptimized = "EffortOptimized", + PaaSPreferred = "PaaSPreferred" +} + +// @public +export enum KnownSummaryType { + Strategy = "Strategy", + Target = "Target", + Unknown = "Unknown" +} + +// @public +export enum KnownTimeRange { + Custom = "Custom", + Day = "Day", + Month = "Month", + Week = "Week" +} + +// @public +export type LicensingProgram = string; + +// @public +export type LinkageKind = string; + +// @public +export interface Linkages { + readonly armId?: string; + readonly kind?: LinkageKind; + readonly linkageType?: LinkageType; + readonly workloadName?: string; +} + +// @public +export type LinkageType = string; + +// @public +export type MachineBootType = string; + +// @public +export interface ManagementDetails { + readonly name?: AzureManagementOfferingType; + readonly readinessSummary?: NameValuePairCloudSuitabilityCommon[]; +} + +// @public +export type MigrateWorkloadType = string; + +// @public +export interface MigrationDetails { + readonly migrationType?: MigrationType; + readonly readinessSummary?: NameValuePairCloudSuitabilityCommon[]; +} + +// @public +export interface MigrationIssues { + readonly issueCategory?: MigrationIssuesCategory; + readonly issueCode?: string; + readonly issueDescription?: string; + readonly moreInformation?: MoreInformation[]; + readonly possibleCause?: string; + readonly recommendedActions?: string[]; +} + +// @public +export type MigrationIssuesCategory = string; + +// @public +export type MigrationPlatform = string; + +// @public +export interface MigrationSuitability { + readonly readiness?: CloudSuitabilityCommon; +} + +// @public +export type MigrationType = string; + +// @public +export interface MoreInformation { + readonly title: string; + readonly url: string; +} + +// @public +export interface NameValuePair { + readonly name?: string; + readonly value?: string; +} + +// @public +export interface NameValuePairCloudSuitabilityCommon { + readonly name?: CloudSuitabilityCommon; + readonly value?: number; +} + +// @public +export interface NameValuePairCostType { + readonly name?: CostType; + readonly value?: number; +} + +// @public +export interface NameValuePairSavingsType { + readonly name?: SavingsType; + readonly value?: number; +} + +// @public +export type NetworkSkuType = string; + +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export type Origin = string; + +// @public +export type Percentile = string; + +// @public +export interface PerformanceData { + percentile?: Percentile; + perfDataEndTime?: Date; + perfDataStartTime?: Date; + timeRange?: TimeRange; +} + +// @public +export type ProvisioningState = string; + +// @public +export interface ProxyResource extends Resource { +} + +// @public +export interface RecommendedFor { + readonly strategies?: StrategyType[]; +} + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface SavingsDetailsCommon { + readonly savingOptions?: SavingsOptions; + readonly savingsDetail?: NameValuePairSavingsType[]; +} + +// @public +export type SavingsOptions = string; + +// @public +export interface SavingsSettings { + azureOfferCode?: AzureOffer; + savingsOptions?: SavingsOptions; +} + +// @public +export type SavingsType = string; + +// @public +export interface Scope { + azureResourceGraphQuery?: string; + scopeType?: ScopeType; + serverGroupId?: string; +} + +// @public +export type ScopeType = string; + +// @public +export interface SecuritySuitability { + readonly readiness?: CloudSuitabilityCommon; +} + +// @public +export interface SkuDetails { + readonly capabilities?: NameValuePair[]; + readonly skuName?: string; + readonly skuType?: SkuType; + readonly totalCost?: CostDetailsCommon[]; + readonly totalSavings?: SavingsDetailsCommon[]; +} + +// @public +export type SkuKind = string; + +// @public +export interface SkusMigrationSuitability { + readonly details?: SkuDetails; + readonly displayName?: string; + readonly id?: string; + readonly kind?: SkuKind; + readonly resourceUri?: string; + readonly sources?: SourceRecommendationMigrationSuitability[]; + readonly type?: SkuType; +} + +// @public +export type SkuType = string; + +// @public +export interface SourceDetails { + readonly count?: number; + readonly platform?: MigrationPlatform; + readonly sourceName?: AssessmentSource; + readonly sourceType?: MigrateWorkloadType; +} + +// @public +export interface SourceRecommendationMigrationSuitability { + readonly migrationSuitability?: MigrationSuitability; + readonly name?: string; +} + +// @public +export type StrategyType = string; + +// @public +export type SummaryType = string; + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TargetDetails { + readonly count?: number; + readonly platform?: MigrationPlatform; + readonly targetName?: AzureTarget; + readonly targetType?: MigrateWorkloadType; +} + +// @public +export interface TargetSourcePair { + readonly confidenceScore?: number; + readonly costDetails?: CostDetailsCommon[]; + readonly managementDetails?: ManagementDetails[]; + readonly migrationDetails?: MigrationDetails; + readonly savingsDetails?: SavingsDetailsCommon[]; + readonly sourceCount?: number; + readonly sourceRef?: AssessmentSource; + readonly targetCount?: number; + readonly targetRef?: AzureTarget; +} + +// @public +export type TimeRange = string; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/migrate/arm-migrate/review/arm-migrate.api.md b/sdk/migrate/arm-migrate/review/arm-migrate.api.md index 4f5b23bbcb0e..c60fda2be707 100644 --- a/sdk/migrate/arm-migrate/review/arm-migrate.api.md +++ b/sdk/migrate/arm-migrate/review/arm-migrate.api.md @@ -4,1877 +4,1205 @@ ```ts -import * as coreAuth from '@azure/core-auth'; -import * as coreClient from '@azure/core-client'; -import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { AbortSignalLike } from '@azure/abort-controller'; +import { ClientOptions } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PathUncheckedResponse } from '@azure-rest/core-client'; +import { Pipeline } from '@azure/core-rest-pipeline'; +import { PollerLike } from '@azure/core-lro'; +import { TokenCredential } from '@azure/core-auth'; // @public -export interface AssessedDisk { - readonly displayName?: string; - readonly gigabytesForRecommendedDiskSize?: number; - readonly gigabytesProvisioned?: number; - readonly megabytesPerSecondOfRead?: number; - readonly megabytesPerSecondOfWrite?: number; - readonly monthlyStorageCost?: number; - readonly name?: string; - readonly numberOfReadOperationsPerSecond?: number; - readonly numberOfWriteOperationsPerSecond?: number; - readonly recommendedDiskSize?: AzureDiskSize; - readonly recommendedDiskType?: AzureDiskType; - readonly suitability?: CloudSuitability; - readonly suitabilityDetail?: AzureDiskSuitabilityDetail; - readonly suitabilityExplanation?: AzureDiskSuitabilityExplanation; -} - -// @public -export interface AssessedMachine { - eTag?: string; - readonly id?: string; - readonly name?: string; - properties?: AssessedMachineProperties; - readonly type?: string; -} - -// @public -export interface AssessedMachineProperties { - readonly bootType?: MachineBootType; - readonly confidenceRatingInPercentage?: number; - readonly createdTimestamp?: Date; - readonly datacenterMachineArmId?: string; - readonly datacenterManagementServerArmId?: string; - readonly datacenterManagementServerName?: string; - readonly description?: string; - readonly disks?: { - [propertyName: string]: AssessedDisk; - }; - readonly displayName?: string; - readonly megabytesOfMemory?: number; - readonly megabytesOfMemoryForRecommendedSize?: number; - readonly monthlyBandwidthCost?: number; - readonly monthlyComputeCostForRecommendedSize?: number; - readonly monthlyPremiumStorageCost?: number; - readonly monthlyStandardSSDStorageCost?: number; - readonly monthlyStorageCost?: number; - readonly networkAdapters?: { - [propertyName: string]: AssessedNetworkAdapter; - }; - readonly numberOfCores?: number; - readonly numberOfCoresForRecommendedSize?: number; - readonly operatingSystemName?: string; - readonly operatingSystemType?: string; - readonly operatingSystemVersion?: string; - readonly percentageCoresUtilization?: number; - readonly percentageMemoryUtilization?: number; - readonly recommendedSize?: AzureVmSize; - readonly suitability?: CloudSuitability; - readonly suitabilityDetail?: AzureVmSuitabilityDetail; - readonly suitabilityExplanation?: AzureVmSuitabilityExplanation; - readonly updatedTimestamp?: Date; -} - -// @public -export interface AssessedMachineResultList { - // (undocumented) - nextLink?: string; - value?: AssessedMachine[]; -} - -// @public -export interface AssessedMachines { - get(resourceGroupName: string, projectName: string, groupName: string, assessmentName: string, assessedMachineName: string, options?: AssessedMachinesGetOptionalParams): Promise; - listByAssessment(resourceGroupName: string, projectName: string, groupName: string, assessmentName: string, options?: AssessedMachinesListByAssessmentOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AssessedMachinesGetHeaders { - xMsRequestId?: string; -} - -// @public -export interface AssessedMachinesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AssessedMachinesGetResponse = AssessedMachinesGetHeaders & AssessedMachine; - -// @public -export interface AssessedMachinesListByAssessmentHeaders { - xMsRequestId?: string; -} - -// @public -export interface AssessedMachinesListByAssessmentNextHeaders { - xMsRequestId?: string; -} - -// @public -export interface AssessedMachinesListByAssessmentNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AssessedMachinesListByAssessmentNextResponse = AssessedMachinesListByAssessmentNextHeaders & AssessedMachineResultList; - -// @public -export interface AssessedMachinesListByAssessmentOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AssessedMachinesListByAssessmentResponse = AssessedMachinesListByAssessmentHeaders & AssessedMachineResultList; - -// @public -export interface AssessedNetworkAdapter { - readonly displayName?: string; - readonly ipAddresses?: string[]; - readonly macAddress?: string; - readonly megabytesPerSecondReceived?: number; - readonly megabytesPerSecondTransmitted?: number; - readonly monthlyBandwidthCosts?: number; - netGigabytesTransmittedPerMonth?: number; - readonly suitability?: CloudSuitability; - readonly suitabilityDetail?: AzureNetworkAdapterSuitabilityDetail; - readonly suitabilityExplanation?: AzureNetworkAdapterSuitabilityExplanation; -} - -// @public -export interface Assessment { - eTag?: string; - readonly id?: string; - readonly name?: string; - properties: AssessmentProperties; - readonly type?: string; -} - -// @public -export interface AssessmentOptions { - readonly id?: string; - readonly name?: string; - properties: AssessmentOptionsProperties; -} - -// @public -export interface AssessmentOptionsProperties { - readonly reservedInstanceSupportedCurrencies?: string[]; - readonly reservedInstanceSupportedLocations?: string[]; - readonly reservedInstanceSupportedOffers?: string[]; - readonly reservedInstanceVmFamilies?: string[]; - readonly vmFamilies?: VmFamily[]; -} +export type ActionType = string; // @public -export interface AssessmentOptionsResultList { - value?: AssessmentOptions[]; -} +export type AssessedMachineType = string; // @public -export interface AssessmentProperties { - azureDiskType: AzureDiskType; - azureHybridUseBenefit: AzureHybridUseBenefit; - azureLocation: AzureLocation; - azureOfferCode: AzureOfferCode; - azurePricingTier: AzurePricingTier; - azureStorageRedundancy: AzureStorageRedundancy; - azureVmFamilies: AzureVmFamily[]; +export interface AssessmentDetails { readonly confidenceRatingInPercentage?: number; readonly createdTimestamp?: Date; - currency: Currency; - discountPercentage: number; - readonly eaSubscriptionId?: string; - readonly monthlyBandwidthCost?: number; - readonly monthlyComputeCost?: number; - readonly monthlyPremiumStorageCost?: number; - readonly monthlyStandardSSDStorageCost?: number; - readonly monthlyStorageCost?: number; - readonly numberOfMachines?: number; - percentile: Percentile; - readonly perfDataEndTime?: Date; - readonly perfDataStartTime?: Date; readonly pricesTimestamp?: Date; - reservedInstance: ReservedInstance; - scalingFactor: number; - sizingCriterion: AssessmentSizingCriterion; - stage: AssessmentStage; readonly status?: AssessmentStatus; - timeRange: TimeRange; readonly updatedTimestamp?: Date; - vmUptime: VmUptime; -} - -// @public -export interface AssessmentResultList { - value?: Assessment[]; -} - -// @public -export interface Assessments { - create(resourceGroupName: string, projectName: string, groupName: string, assessmentName: string, options?: AssessmentsCreateOptionalParams): Promise; - delete(resourceGroupName: string, projectName: string, groupName: string, assessmentName: string, options?: AssessmentsDeleteOptionalParams): Promise; - get(resourceGroupName: string, projectName: string, groupName: string, assessmentName: string, options?: AssessmentsGetOptionalParams): Promise; - getReportDownloadUrl(resourceGroupName: string, projectName: string, groupName: string, assessmentName: string, options?: AssessmentsGetReportDownloadUrlOptionalParams): Promise; - listByGroup(resourceGroupName: string, projectName: string, groupName: string, options?: AssessmentsListByGroupOptionalParams): PagedAsyncIterableIterator; - listByProject(resourceGroupName: string, projectName: string, options?: AssessmentsListByProjectOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AssessmentsCreateHeaders { - xMsRequestId?: string; -} - -// @public -export interface AssessmentsCreateOptionalParams extends coreClient.OperationOptions { - assessment?: Assessment; -} - -// @public -export type AssessmentsCreateResponse = AssessmentsCreateHeaders & Assessment; - -// @public -export interface AssessmentsDeleteHeaders { - xMsRequestId?: string; -} - -// @public -export interface AssessmentsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AssessmentsDeleteResponse = AssessmentsDeleteHeaders; - -// @public -export interface AssessmentsGetHeaders { - xMsRequestId?: string; -} - -// @public -export interface AssessmentsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface AssessmentsGetReportDownloadUrlHeaders { - xMsRequestId?: string; -} - -// @public -export interface AssessmentsGetReportDownloadUrlOptionalParams extends coreClient.OperationOptions { } -// @public -export type AssessmentsGetReportDownloadUrlResponse = AssessmentsGetReportDownloadUrlHeaders & DownloadUrl; - -// @public -export type AssessmentsGetResponse = AssessmentsGetHeaders & Assessment; - // @public export type AssessmentSizingCriterion = string; // @public -export interface AssessmentsListByGroupHeaders { - xMsRequestId?: string; -} - -// @public -export interface AssessmentsListByGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AssessmentsListByGroupResponse = AssessmentsListByGroupHeaders & AssessmentResultList; - -// @public -export interface AssessmentsListByProjectHeaders { - xMsRequestId?: string; -} - -// @public -export interface AssessmentsListByProjectOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AssessmentsListByProjectResponse = AssessmentsListByProjectHeaders & AssessmentResultList; - -// @public -export type AssessmentStage = string; +export type AssessmentSource = string; // @public export type AssessmentStatus = string; // @public -export type AzureDiskSize = string; - -// @public -export type AzureDiskSuitabilityDetail = string; - -// @public -export type AzureDiskSuitabilityExplanation = string; - -// @public -export type AzureDiskType = string; - -// @public -export type AzureHybridUseBenefit = string; - -// @public -export type AzureLocation = string; - -// @public (undocumented) -export class AzureMigrateV2 extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureMigrateV2OptionalParams); - // (undocumented) - apiVersion: string; - // (undocumented) - assessedMachines: AssessedMachines; - // (undocumented) - assessments: Assessments; - // (undocumented) - groups: Groups; - // (undocumented) - hyperVCollectors: HyperVCollectors; - // (undocumented) - importCollectors: ImportCollectors; - // (undocumented) - machines: Machines; - // (undocumented) - operations: Operations; - // (undocumented) - privateEndpointConnectionOperations: PrivateEndpointConnectionOperations; - // (undocumented) - privateLinkResourceOperations: PrivateLinkResourceOperations; - // (undocumented) - projects: Projects; - // (undocumented) - serverCollectors: ServerCollectors; - // (undocumented) - subscriptionId: string; - // (undocumented) - vMwareCollectors: VMwareCollectors; -} - -// @public -export interface AzureMigrateV2OptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - apiVersion?: string; - endpoint?: string; -} - -// @public -export type AzureNetworkAdapterSuitabilityDetail = string; - -// @public -export type AzureNetworkAdapterSuitabilityExplanation = string; - -// @public -export type AzureOfferCode = string; - -// @public -export type AzurePricingTier = string; - -// @public -export type AzureStorageRedundancy = string; - -// @public -export type AzureVmFamily = string; - -// @public -export type AzureVmSize = string; - -// @public -export type AzureVmSuitabilityDetail = string; - -// @public -export type AzureVmSuitabilityExplanation = string; - -// @public -export interface CloudError { - error?: CloudErrorBody; -} - -// @public -export interface CloudErrorBody { - code?: string; - details?: CloudErrorBody[]; - message?: string; - target?: string; -} - -// @public -export type CloudSuitability = string; - -// @public (undocumented) -export interface CollectorAgentProperties { - readonly id?: string; - readonly lastHeartbeatUtc?: Date; - // (undocumented) - spnDetails?: CollectorBodyAgentSpnProperties; - readonly version?: string; -} - -// @public (undocumented) -export interface CollectorBodyAgentSpnProperties { - applicationId?: string; - audience?: string; - authority?: string; - objectId?: string; - tenantId?: string; -} - -// @public (undocumented) -export interface CollectorProperties { - // (undocumented) - agentProperties?: CollectorAgentProperties; - readonly createdTimestamp?: string; - discoverySiteId?: string; - readonly updatedTimestamp?: string; -} - -// @public -export type Currency = string; - -// @public -export interface Disk { +export interface AvsAssessedDiskV2 { + readonly assessedExternalStorageType?: ExternalStorageType; readonly displayName?: string; - readonly gigabytesAllocated?: number; -} - -// @public -export interface DownloadUrl { - readonly assessmentReportUrl?: string; - readonly expirationTime?: Date; -} - -// @public -export function getContinuationToken(page: unknown): string | undefined; - -// @public -export interface Group { - eTag?: string; - readonly id?: string; + readonly estimatedDiskSizeInGB?: number; + readonly gigabytesProvisioned?: number; + readonly megabytesPerSecondOfRead?: number; + readonly megabytesPerSecondOfWrite?: number; readonly name?: string; - properties: GroupProperties; - readonly type?: string; + readonly numberOfReadOperationsPerSecond?: number; + readonly numberOfWriteOperationsPerSecond?: number; } // @public -export interface GroupBodyProperties { - machines?: string[]; - operationType?: GroupUpdateOperation; +export interface AvsAssessedMachineExtendedDetails { + readonly avsTargetNode?: AzureAvsNodeType; + readonly bootType?: MachineBootType; + readonly datacenterManagementServerName?: string; + readonly description?: string; + readonly disks?: AvsAssessedDiskV2[]; + readonly displayName?: string; + readonly errors?: ErrorModel[]; + readonly megabytesOfMemory?: number; + readonly networkAdapters?: AvsAssessedNetworkAdapter[]; + readonly numberOfCores?: number; + readonly operatingSystemArchitecture?: GuestOperatingSystemArchitecture; + readonly operatingSystemName?: string; + readonly operatingSystemType?: string; + readonly operatingSystemVersion?: string; + readonly percentageCoresUtilization?: number; + readonly percentageMemoryUtilization?: number; + readonly storageInUseGB?: number; } // @public -export interface GroupProperties { - readonly areAssessmentsRunning?: boolean; - readonly assessments?: string[]; +export interface AvsAssessedMachinePropertiesV2 { + readonly assessedMachineType?: AssessedMachineType; readonly createdTimestamp?: Date; - readonly groupStatus?: GroupStatus; - groupType?: string; - readonly machineCount?: number; + readonly extendedDetails?: AvsAssessedMachineExtendedDetails; + readonly linkages?: Linkages[]; + readonly recommendations?: AvsRecommendationsMigrationIssuesMigrationSuitabilitySkus[]; readonly updatedTimestamp?: Date; + readonly workloadType?: MigrateWorkloadType; } // @public -export interface GroupResultList { - value?: Group[]; -} - -// @public -export interface Groups { - create(resourceGroupName: string, projectName: string, groupName: string, options?: GroupsCreateOptionalParams): Promise; - delete(resourceGroupName: string, projectName: string, groupName: string, options?: GroupsDeleteOptionalParams): Promise; - get(resourceGroupName: string, projectName: string, groupName: string, options?: GroupsGetOptionalParams): Promise; - listByProject(resourceGroupName: string, projectName: string, options?: GroupsListByProjectOptionalParams): PagedAsyncIterableIterator; - updateMachines(resourceGroupName: string, projectName: string, groupName: string, options?: GroupsUpdateMachinesOptionalParams): Promise; +export interface AvsAssessedMachinesV2OperationsGetOptionalParams extends OperationOptions { } // @public -export interface GroupsCreateHeaders { - xMsRequestId?: string; +export interface AvsAssessedMachinesV2OperationsListByParentOptionalParams extends OperationOptions { + continuationToken?: string; + filter?: string; + pageSize?: number; + totalRecordCount?: number; } // @public -export interface GroupsCreateOptionalParams extends coreClient.OperationOptions { - group?: Group; +export interface AvsAssessedMachinesV2OperationsOperations { + get: (resourceGroupName: string, projectName: string, assessmentName: string, avsAssessedMachineName: string, options?: AvsAssessedMachinesV2OperationsGetOptionalParams) => Promise; + listByParent: (resourceGroupName: string, projectName: string, assessmentName: string, options?: AvsAssessedMachinesV2OperationsListByParentOptionalParams) => PagedAsyncIterableIterator; } // @public -export type GroupsCreateResponse = GroupsCreateHeaders & Group; - -// @public -export interface GroupsDeleteHeaders { - xMsRequestId?: string; +export interface AvsAssessedMachineV2 extends ProxyResource { + properties?: AvsAssessedMachinePropertiesV2; } // @public -export interface GroupsDeleteOptionalParams extends coreClient.OperationOptions { +export interface AvsAssessedNetworkAdapter { + readonly displayName?: string; + readonly ipAddresses?: string[]; + readonly macAddress?: string; + readonly megabytesPerSecondRecieved?: number; + readonly megabytesPerSecondTransmitted?: number; + readonly name?: string; } // @public -export type GroupsDeleteResponse = GroupsDeleteHeaders; - -// @public -export interface GroupsGetHeaders { - xMsRequestId?: string; +export interface AvsAssessmentOptionsOutboundEdgeGroup { + avsExternalStorageTypes: ExternalStorageType[]; + avsNodes: AzureAvsNodeType[]; + currencies: AzureCurrency[]; + failuresToTolerateAndRaidLevelValues: FttAndRaidLevel[]; + licensingProgram: LicensingProgram[]; + savingsOptions: SavingsOptions[]; + targetLocations: AzureLocation[]; } // @public -export interface GroupsGetOptionalParams extends coreClient.OperationOptions { +export interface AvsAssessmentPropertiesV2 { + details?: AssessmentDetails; + fallbackMachineAssessmentArmId?: string; + readonly provisioningState?: ProvisioningState; + scope?: Scope; + settings?: AvsAssessmentSettings; +} + +// @public +export type AvsAssessmentScenario = string; + +// @public +export interface AvsAssessmentSettings { + avsAssessmentScenario?: AvsAssessmentScenario; + azureLocation?: string; + billingSettings?: BillingSettings; + cpuHeadroom?: number; + currency?: AzureCurrency; + dedupeCompression?: number; + discountPercentage?: number; + environmentType?: EnvironmentType; + externalStorageTypes?: ExternalStorageType[]; + failuresToTolerateAndRaidLevelList?: FttAndRaidLevel[]; + isStretchClusterEnabled?: boolean; + isVcfByolEnabled?: boolean; + memOvercommit?: number; + nodeTypes?: AzureAvsNodeType[]; + performanceData?: PerformanceData; + savingsSettings?: SavingsSettings; + scalingFactor?: number; + sizingCriterion?: AssessmentSizingCriterion; + vcpuOversubscription?: number; +} + +// @public +export interface AvsAssessmentSummaryPropertiesV2 { + readonly avsEstimatedExternalStorages?: AvsEstimatedExternalStorage[]; + readonly avsEstimatedNetworks?: AvsEstimatedNetwork[]; + readonly avsEstimatedNodes?: AvsEstimatedNode[]; + readonly costComponents?: CostDetailsCommon[]; + readonly cpuUtilization?: number; + readonly limitingFactor?: string; + readonly numberOfNodes?: number; + readonly ramUtilization?: number; + readonly savingsComponents?: SavingsDetailsCommon[]; + readonly sources?: SourceDetails[]; + readonly storageUtilization?: number; + readonly suitability?: CloudSuitability; + readonly suitabilityExplanation?: AzureAvsSuitabilityExplanation; + readonly summaryName?: string; + readonly summaryType?: SummaryType; + readonly targets?: TargetDetails[]; + readonly targetSourceMapping?: TargetSourcePair[]; + readonly totalCpuCores?: number; + readonly totalRamInGB?: number; + readonly totalStorageInGB?: number; } // @public -export type GroupsGetResponse = GroupsGetHeaders & Group; - -// @public -export interface GroupsListByProjectHeaders { - xMsRequestId?: string; +export interface AvsAssessmentsV2OperationsCreateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface GroupsListByProjectOptionalParams extends coreClient.OperationOptions { +export interface AvsAssessmentsV2OperationsDeleteOptionalParams extends OperationOptions { } // @public -export type GroupsListByProjectResponse = GroupsListByProjectHeaders & GroupResultList; - -// @public -export type GroupStatus = string; - -// @public -export interface GroupsUpdateMachinesHeaders { - xMsRequestId?: string; +export interface AvsAssessmentsV2OperationsDownloadUrlOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface GroupsUpdateMachinesOptionalParams extends coreClient.OperationOptions { - groupUpdateProperties?: UpdateGroupBody; +export interface AvsAssessmentsV2OperationsGetOptionalParams extends OperationOptions { } // @public -export type GroupsUpdateMachinesResponse = GroupsUpdateMachinesHeaders & Group; - -// @public -export type GroupUpdateOperation = string; - -// @public (undocumented) -export interface HyperVCollector { - // (undocumented) - eTag?: string; - readonly id?: string; - readonly name?: string; - // (undocumented) - properties?: CollectorProperties; - readonly type?: string; +export interface AvsAssessmentsV2OperationsListByParentOptionalParams extends OperationOptions { } // @public -export interface HyperVCollectorList { - value?: HyperVCollector[]; +export interface AvsAssessmentsV2OperationsOperations { + create: (resourceGroupName: string, projectName: string, assessmentName: string, resource: AvsAssessmentV2, options?: AvsAssessmentsV2OperationsCreateOptionalParams) => PollerLike, AvsAssessmentV2>; + delete: (resourceGroupName: string, projectName: string, assessmentName: string, options?: AvsAssessmentsV2OperationsDeleteOptionalParams) => Promise; + downloadUrl: (resourceGroupName: string, projectName: string, assessmentName: string, body: Record, options?: AvsAssessmentsV2OperationsDownloadUrlOptionalParams) => PollerLike, DownloadUrl>; + get: (resourceGroupName: string, projectName: string, assessmentName: string, options?: AvsAssessmentsV2OperationsGetOptionalParams) => Promise; + listByParent: (resourceGroupName: string, projectName: string, options?: AvsAssessmentsV2OperationsListByParentOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface HyperVCollectors { - create(resourceGroupName: string, projectName: string, hyperVCollectorName: string, options?: HyperVCollectorsCreateOptionalParams): Promise; - delete(resourceGroupName: string, projectName: string, hyperVCollectorName: string, options?: HyperVCollectorsDeleteOptionalParams): Promise; - get(resourceGroupName: string, projectName: string, hyperVCollectorName: string, options?: HyperVCollectorsGetOptionalParams): Promise; - listByProject(resourceGroupName: string, projectName: string, options?: HyperVCollectorsListByProjectOptionalParams): PagedAsyncIterableIterator; +export interface AvsAssessmentV2 extends ProxyResource { + properties?: AvsAssessmentPropertiesV2; } // @public -export interface HyperVCollectorsCreateHeaders { - xMsRequestId?: string; +export interface AvsAssessmentV2Summary extends ProxyResource { + properties?: AvsAssessmentSummaryPropertiesV2; } // @public -export interface HyperVCollectorsCreateOptionalParams extends coreClient.OperationOptions { - collectorBody?: HyperVCollector; +export interface AvsAssessmentV2SummaryOperationsGetOptionalParams extends OperationOptions { } // @public -export type HyperVCollectorsCreateResponse = HyperVCollectorsCreateHeaders & HyperVCollector; - -// @public -export interface HyperVCollectorsDeleteHeaders { - xMsRequestId?: string; +export interface AvsAssessmentV2SummaryOperationsListByParentOptionalParams extends OperationOptions { } // @public -export interface HyperVCollectorsDeleteOptionalParams extends coreClient.OperationOptions { +export interface AvsAssessmentV2SummaryOperationsOperations { + get: (resourceGroupName: string, projectName: string, assessmentName: string, summaryName: string, options?: AvsAssessmentV2SummaryOperationsGetOptionalParams) => Promise; + listByParent: (resourceGroupName: string, projectName: string, assessmentName: string, options?: AvsAssessmentV2SummaryOperationsListByParentOptionalParams) => PagedAsyncIterableIterator; } - -// @public -export type HyperVCollectorsDeleteResponse = HyperVCollectorsDeleteHeaders; - -// @public -export interface HyperVCollectorsGetHeaders { - xMsRequestId?: string; -} - -// @public -export interface HyperVCollectorsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HyperVCollectorsGetResponse = HyperVCollectorsGetHeaders & HyperVCollector; - -// @public -export interface HyperVCollectorsListByProjectHeaders { - xMsRequestId?: string; -} - -// @public -export interface HyperVCollectorsListByProjectOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HyperVCollectorsListByProjectResponse = HyperVCollectorsListByProjectHeaders & HyperVCollectorList; - -// @public (undocumented) -export interface ImportCollector { - // (undocumented) - eTag?: string; - readonly id?: string; - readonly name?: string; - // (undocumented) - properties?: ImportCollectorProperties; - readonly type?: string; -} - -// @public -export interface ImportCollectorList { - value?: ImportCollector[]; -} - -// @public (undocumented) -export interface ImportCollectorProperties { - readonly createdTimestamp?: string; - // (undocumented) - discoverySiteId?: string; - readonly updatedTimestamp?: string; -} - -// @public -export interface ImportCollectors { - create(resourceGroupName: string, projectName: string, importCollectorName: string, options?: ImportCollectorsCreateOptionalParams): Promise; - delete(resourceGroupName: string, projectName: string, importCollectorName: string, options?: ImportCollectorsDeleteOptionalParams): Promise; - get(resourceGroupName: string, projectName: string, importCollectorName: string, options?: ImportCollectorsGetOptionalParams): Promise; - listByProject(resourceGroupName: string, projectName: string, options?: ImportCollectorsListByProjectOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ImportCollectorsCreateHeaders { - xMsRequestId?: string; -} - -// @public -export interface ImportCollectorsCreateOptionalParams extends coreClient.OperationOptions { - collectorBody?: ImportCollector; -} - -// @public -export type ImportCollectorsCreateResponse = ImportCollectorsCreateHeaders & ImportCollector; - -// @public -export interface ImportCollectorsDeleteHeaders { - xMsRequestId?: string; -} - -// @public -export interface ImportCollectorsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ImportCollectorsDeleteResponse = ImportCollectorsDeleteHeaders; - -// @public -export interface ImportCollectorsGetHeaders { - xMsRequestId?: string; -} - -// @public -export interface ImportCollectorsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ImportCollectorsGetResponse = ImportCollectorsGetHeaders & ImportCollector; - -// @public -export interface ImportCollectorsListByProjectHeaders { - xMsRequestId?: string; -} - -// @public -export interface ImportCollectorsListByProjectOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ImportCollectorsListByProjectResponse = ImportCollectorsListByProjectHeaders & ImportCollectorList; - -// @public -export enum KnownAssessmentSizingCriterion { - AsOnPremises = "AsOnPremises", - PerformanceBased = "PerformanceBased" -} - -// @public -export enum KnownAssessmentStage { - Approved = "Approved", - InProgress = "InProgress", - UnderReview = "UnderReview" -} - -// @public -export enum KnownAssessmentStatus { - Completed = "Completed", - Created = "Created", - Invalid = "Invalid", - OutDated = "OutDated", - OutOfSync = "OutOfSync", - Running = "Running", - Updated = "Updated" -} - -// @public -export enum KnownAzureDiskSize { - PremiumP10 = "Premium_P10", - PremiumP15 = "Premium_P15", - PremiumP20 = "Premium_P20", - PremiumP30 = "Premium_P30", - PremiumP4 = "Premium_P4", - PremiumP40 = "Premium_P40", - PremiumP50 = "Premium_P50", - PremiumP6 = "Premium_P6", - PremiumP60 = "Premium_P60", - PremiumP70 = "Premium_P70", - PremiumP80 = "Premium_P80", - StandardS10 = "Standard_S10", - StandardS15 = "Standard_S15", - StandardS20 = "Standard_S20", - StandardS30 = "Standard_S30", - StandardS4 = "Standard_S4", - StandardS40 = "Standard_S40", - StandardS50 = "Standard_S50", - StandardS6 = "Standard_S6", - StandardS60 = "Standard_S60", - StandardS70 = "Standard_S70", - StandardS80 = "Standard_S80", - StandardSSDE10 = "StandardSSD_E10", - StandardSSDE15 = "StandardSSD_E15", - StandardSSDE20 = "StandardSSD_E20", - StandardSSDE30 = "StandardSSD_E30", - StandardSSDE4 = "StandardSSD_E4", - StandardSSDE40 = "StandardSSD_E40", - StandardSSDE50 = "StandardSSD_E50", - StandardSSDE6 = "StandardSSD_E6", - StandardSSDE60 = "StandardSSD_E60", - StandardSSDE70 = "StandardSSD_E70", - StandardSSDE80 = "StandardSSD_E80", - Unknown = "Unknown" -} - -// @public -export enum KnownAzureDiskSuitabilityDetail { - DiskGigabytesConsumedMissing = "DiskGigabytesConsumedMissing", - DiskGigabytesConsumedOutOfRange = "DiskGigabytesConsumedOutOfRange", - DiskGigabytesProvisionedMissing = "DiskGigabytesProvisionedMissing", - DiskGigabytesProvisionedOutOfRange = "DiskGigabytesProvisionedOutOfRange", - MegabytesPerSecondOfReadMissing = "MegabytesPerSecondOfReadMissing", - MegabytesPerSecondOfReadOutOfRange = "MegabytesPerSecondOfReadOutOfRange", - MegabytesPerSecondOfWriteMissing = "MegabytesPerSecondOfWriteMissing", - MegabytesPerSecondOfWriteOutOfRange = "MegabytesPerSecondOfWriteOutOfRange", - None = "None", - NumberOfReadOperationsPerSecondMissing = "NumberOfReadOperationsPerSecondMissing", - NumberOfReadOperationsPerSecondOutOfRange = "NumberOfReadOperationsPerSecondOutOfRange", - NumberOfWriteOperationsPerSecondMissing = "NumberOfWriteOperationsPerSecondMissing", - NumberOfWriteOperationsPerSecondOutOfRange = "NumberOfWriteOperationsPerSecondOutOfRange" -} - -// @public -export enum KnownAzureDiskSuitabilityExplanation { - DiskSizeGreaterThanSupported = "DiskSizeGreaterThanSupported", - InternalErrorOccurredForDiskEvaluation = "InternalErrorOccurredForDiskEvaluation", - NoDiskSizeFoundForSelectedRedundancy = "NoDiskSizeFoundForSelectedRedundancy", - NoDiskSizeFoundInSelectedLocation = "NoDiskSizeFoundInSelectedLocation", - NoEaPriceFoundForDiskSize = "NoEaPriceFoundForDiskSize", - NoSuitableDiskSizeForIops = "NoSuitableDiskSizeForIops", - NoSuitableDiskSizeForThroughput = "NoSuitableDiskSizeForThroughput", - NotApplicable = "NotApplicable", - Unknown = "Unknown" -} - -// @public -export enum KnownAzureDiskType { - Premium = "Premium", - Standard = "Standard", - StandardOrPremium = "StandardOrPremium", - StandardSSD = "StandardSSD", - Unknown = "Unknown" -} - -// @public -export enum KnownAzureHybridUseBenefit { - No = "No", - Unknown = "Unknown", - Yes = "Yes" -} - -// @public -export enum KnownAzureLocation { - AustraliaEast = "AustraliaEast", - AustraliaSoutheast = "AustraliaSoutheast", - BrazilSouth = "BrazilSouth", - CanadaCentral = "CanadaCentral", - CanadaEast = "CanadaEast", - CentralIndia = "CentralIndia", - CentralUs = "CentralUs", - ChinaEast = "ChinaEast", - ChinaNorth = "ChinaNorth", - EastAsia = "EastAsia", - EastUs = "EastUs", - EastUs2 = "EastUs2", - GermanyCentral = "GermanyCentral", - GermanyNortheast = "GermanyNortheast", - JapanEast = "JapanEast", - JapanWest = "JapanWest", - KoreaCentral = "KoreaCentral", - KoreaSouth = "KoreaSouth", - NorthCentralUs = "NorthCentralUs", - NorthEurope = "NorthEurope", - SouthCentralUs = "SouthCentralUs", - SoutheastAsia = "SoutheastAsia", - SouthIndia = "SouthIndia", - UkSouth = "UkSouth", - UkWest = "UkWest", - Unknown = "Unknown", - USDoDCentral = "USDoDCentral", - USDoDEast = "USDoDEast", - USGovArizona = "USGovArizona", - USGovIowa = "USGovIowa", - USGovTexas = "USGovTexas", - USGovVirginia = "USGovVirginia", - WestCentralUs = "WestCentralUs", - WestEurope = "WestEurope", - WestIndia = "WestIndia", - WestUs = "WestUs", - WestUs2 = "WestUs2" -} - -// @public -export enum KnownAzureNetworkAdapterSuitabilityDetail { - MegabytesOfDataTransmittedMissing = "MegabytesOfDataTransmittedMissing", - MegabytesOfDataTransmittedOutOfRange = "MegabytesOfDataTransmittedOutOfRange", - None = "None" -} - -// @public -export enum KnownAzureNetworkAdapterSuitabilityExplanation { - InternalErrorOccurred = "InternalErrorOccurred", - NotApplicable = "NotApplicable", - Unknown = "Unknown" -} - -// @public -export enum KnownAzureOfferCode { - EA = "EA", - Msazr0003P = "MSAZR0003P", - Msazr0022P = "MSAZR0022P", - Msazr0023P = "MSAZR0023P", - Msazr0025P = "MSAZR0025P", - Msazr0029P = "MSAZR0029P", - Msazr0036P = "MSAZR0036P", - Msazr0044P = "MSAZR0044P", - Msazr0059P = "MSAZR0059P", - Msazr0060P = "MSAZR0060P", - Msazr0062P = "MSAZR0062P", - Msazr0063P = "MSAZR0063P", - Msazr0064P = "MSAZR0064P", - Msazr0111P = "MSAZR0111P", - Msazr0120P = "MSAZR0120P", - Msazr0121P = "MSAZR0121P", - Msazr0122P = "MSAZR0122P", - Msazr0123P = "MSAZR0123P", - Msazr0124P = "MSAZR0124P", - Msazr0125P = "MSAZR0125P", - Msazr0126P = "MSAZR0126P", - Msazr0127P = "MSAZR0127P", - Msazr0128P = "MSAZR0128P", - Msazr0129P = "MSAZR0129P", - Msazr0130P = "MSAZR0130P", - Msazr0144P = "MSAZR0144P", - Msazr0148P = "MSAZR0148P", - Msazr0149P = "MSAZR0149P", - Msazrde0003P = "MSAZRDE0003P", - Msazrde0044P = "MSAZRDE0044P", - Msazrusgov0003P = "MSAZRUSGOV0003P", - Msmcazr0044P = "MSMCAZR0044P", - Msmcazr0059P = "MSMCAZR0059P", - Msmcazr0060P = "MSMCAZR0060P", - Msmcazr0063P = "MSMCAZR0063P", - Msmcazr0120P = "MSMCAZR0120P", - Msmcazr0121P = "MSMCAZR0121P", - Msmcazr0125P = "MSMCAZR0125P", - Msmcazr0128P = "MSMCAZR0128P", - Unknown = "Unknown" -} - -// @public -export enum KnownAzurePricingTier { - Basic = "Basic", - Standard = "Standard" -} - -// @public -export enum KnownAzureStorageRedundancy { - GeoRedundant = "GeoRedundant", - LocallyRedundant = "LocallyRedundant", - ReadAccessGeoRedundant = "ReadAccessGeoRedundant", - Unknown = "Unknown", - ZoneRedundant = "ZoneRedundant" -} - -// @public -export enum KnownAzureVmFamily { - Av2Series = "Av2_series", - BasicA0A4 = "Basic_A0_A4", - DCSeries = "DC_Series", - DSeries = "D_series", - DSSeries = "DS_series", - DSv2Series = "DSv2_series", - Dsv3Series = "Dsv3_series", - Dv2Series = "Dv2_series", - Dv3Series = "Dv3_series", - Esv3Series = "Esv3_series", - Ev3Series = "Ev3_series", - FSeries = "F_series", - FsSeries = "Fs_series", - Fsv2Series = "Fsv2_series", - GSeries = "G_series", - GSSeries = "GS_series", - HSeries = "H_series", - LsSeries = "Ls_series", - MSeries = "M_series", - StandardA0A7 = "Standard_A0_A7", - StandardA8A11 = "Standard_A8_A11", - Unknown = "Unknown" -} - -// @public -export enum KnownAzureVmSize { - BasicA0 = "Basic_A0", - BasicA1 = "Basic_A1", - BasicA2 = "Basic_A2", - BasicA3 = "Basic_A3", - BasicA4 = "Basic_A4", - StandardA0 = "Standard_A0", - StandardA1 = "Standard_A1", - StandardA10 = "Standard_A10", - StandardA11 = "Standard_A11", - StandardA1V2 = "Standard_A1_v2", - StandardA2 = "Standard_A2", - StandardA2MV2 = "Standard_A2m_v2", - StandardA2V2 = "Standard_A2_v2", - StandardA3 = "Standard_A3", - StandardA4 = "Standard_A4", - StandardA4MV2 = "Standard_A4m_v2", - StandardA4V2 = "Standard_A4_v2", - StandardA5 = "Standard_A5", - StandardA6 = "Standard_A6", - StandardA7 = "Standard_A7", - StandardA8 = "Standard_A8", - StandardA8MV2 = "Standard_A8m_v2", - StandardA8V2 = "Standard_A8_v2", - StandardA9 = "Standard_A9", - StandardD1 = "Standard_D1", - StandardD11 = "Standard_D11", - StandardD11V2 = "Standard_D11_v2", - StandardD12 = "Standard_D12", - StandardD12V2 = "Standard_D12_v2", - StandardD13 = "Standard_D13", - StandardD13V2 = "Standard_D13_v2", - StandardD14 = "Standard_D14", - StandardD14V2 = "Standard_D14_v2", - StandardD15V2 = "Standard_D15_v2", - StandardD16SV3 = "Standard_D16s_v3", - StandardD16V3 = "Standard_D16_v3", - StandardD1V2 = "Standard_D1_v2", - StandardD2 = "Standard_D2", - StandardD2SV3 = "Standard_D2s_v3", - StandardD2V2 = "Standard_D2_v2", - StandardD2V3 = "Standard_D2_v3", - StandardD3 = "Standard_D3", - StandardD32SV3 = "Standard_D32s_v3", - StandardD32V3 = "Standard_D32_v3", - StandardD3V2 = "Standard_D3_v2", - StandardD4 = "Standard_D4", - StandardD4SV3 = "Standard_D4s_v3", - StandardD4V2 = "Standard_D4_v2", - StandardD4V3 = "Standard_D4_v3", - StandardD5V2 = "Standard_D5_v2", - StandardD64SV3 = "Standard_D64s_v3", - StandardD64V3 = "Standard_D64_v3", - StandardD8SV3 = "Standard_D8s_v3", - StandardD8V3 = "Standard_D8_v3", - StandardDS1 = "Standard_DS1", - StandardDS11 = "Standard_DS11", - StandardDS11V2 = "Standard_DS11_v2", - StandardDS12 = "Standard_DS12", - StandardDS12V2 = "Standard_DS12_v2", - StandardDS13 = "Standard_DS13", - StandardDS13V2 = "Standard_DS13_v2", - StandardDS14 = "Standard_DS14", - StandardDS14V2 = "Standard_DS14_v2", - StandardDS15V2 = "Standard_DS15_v2", - StandardDS1V2 = "Standard_DS1_v2", - StandardDS2 = "Standard_DS2", - StandardDS2V2 = "Standard_DS2_v2", - StandardDS3 = "Standard_DS3", - StandardDS3V2 = "Standard_DS3_v2", - StandardDS4 = "Standard_DS4", - StandardDS4V2 = "Standard_DS4_v2", - StandardDS5V2 = "Standard_DS5_v2", - StandardE16SV3 = "Standard_E16s_v3", - StandardE16V3 = "Standard_E16_v3", - StandardE2SV3 = "Standard_E2s_v3", - StandardE2V3 = "Standard_E2_v3", - StandardE32SV3 = "Standard_E32s_v3", - StandardE32V3 = "Standard_E32_v3", - StandardE4SV3 = "Standard_E4s_v3", - StandardE4V3 = "Standard_E4_v3", - StandardE64SV3 = "Standard_E64s_v3", - StandardE64V3 = "Standard_E64_v3", - StandardE8SV3 = "Standard_E8s_v3", - StandardE8V3 = "Standard_E8_v3", - StandardF1 = "Standard_F1", - StandardF16 = "Standard_F16", - StandardF16S = "Standard_F16s", - StandardF16SV2 = "Standard_F16s_v2", - StandardF1S = "Standard_F1s", - StandardF2 = "Standard_F2", - StandardF2S = "Standard_F2s", - StandardF2SV2 = "Standard_F2s_v2", - StandardF32SV2 = "Standard_F32s_v2", - StandardF4 = "Standard_F4", - StandardF4S = "Standard_F4s", - StandardF4SV2 = "Standard_F4s_v2", - StandardF64SV2 = "Standard_F64s_v2", - StandardF72SV2 = "Standard_F72s_v2", - StandardF8 = "Standard_F8", - StandardF8S = "Standard_F8s", - StandardF8SV2 = "Standard_F8s_v2", - StandardG1 = "Standard_G1", - StandardG2 = "Standard_G2", - StandardG3 = "Standard_G3", - StandardG4 = "Standard_G4", - StandardG5 = "Standard_G5", - StandardGS1 = "Standard_GS1", - StandardGS2 = "Standard_GS2", - StandardGS3 = "Standard_GS3", - StandardGS4 = "Standard_GS4", - StandardGS5 = "Standard_GS5", - StandardH16 = "Standard_H16", - StandardH16M = "Standard_H16m", - StandardH16Mr = "Standard_H16mr", - StandardH16R = "Standard_H16r", - StandardH8 = "Standard_H8", - StandardH8M = "Standard_H8m", - StandardL16S = "Standard_L16s", - StandardL32S = "Standard_L32s", - StandardL4S = "Standard_L4s", - StandardL8S = "Standard_L8s", - StandardM128Ms = "Standard_M128ms", - StandardM128S = "Standard_M128s", - StandardM64Ms = "Standard_M64ms", - StandardM64S = "Standard_M64s", - Unknown = "Unknown" -} - -// @public -export enum KnownAzureVmSuitabilityDetail { - CannotReportBandwidthCosts = "CannotReportBandwidthCosts", - CannotReportComputeCost = "CannotReportComputeCost", - CannotReportStorageCost = "CannotReportStorageCost", - None = "None", - PercentageOfCoresUtilizedMissing = "PercentageOfCoresUtilizedMissing", - PercentageOfCoresUtilizedOutOfRange = "PercentageOfCoresUtilizedOutOfRange", - PercentageOfMemoryUtilizedMissing = "PercentageOfMemoryUtilizedMissing", - PercentageOfMemoryUtilizedOutOfRange = "PercentageOfMemoryUtilizedOutOfRange", - RecommendedSizeHasLessNetworkAdapters = "RecommendedSizeHasLessNetworkAdapters" -} - -// @public -export enum KnownAzureVmSuitabilityExplanation { - BootTypeNotSupported = "BootTypeNotSupported", - BootTypeUnknown = "BootTypeUnknown", - CheckCentOsVersion = "CheckCentOsVersion", - CheckCoreOsLinuxVersion = "CheckCoreOsLinuxVersion", - CheckDebianLinuxVersion = "CheckDebianLinuxVersion", - CheckOpenSuseLinuxVersion = "CheckOpenSuseLinuxVersion", - CheckOracleLinuxVersion = "CheckOracleLinuxVersion", - CheckRedHatLinuxVersion = "CheckRedHatLinuxVersion", - CheckSuseLinuxVersion = "CheckSuseLinuxVersion", - CheckUbuntuLinuxVersion = "CheckUbuntuLinuxVersion", - CheckWindowsServer2008R2Version = "CheckWindowsServer2008R2Version", - EndorsedWithConditionsLinuxDistributions = "EndorsedWithConditionsLinuxDistributions", - GuestOperatingSystemArchitectureNotSupported = "GuestOperatingSystemArchitectureNotSupported", - GuestOperatingSystemNotSupported = "GuestOperatingSystemNotSupported", - GuestOperatingSystemUnknown = "GuestOperatingSystemUnknown", - InternalErrorOccurredDuringComputeEvaluation = "InternalErrorOccurredDuringComputeEvaluation", - InternalErrorOccurredDuringNetworkEvaluation = "InternalErrorOccurredDuringNetworkEvaluation", - InternalErrorOccurredDuringStorageEvaluation = "InternalErrorOccurredDuringStorageEvaluation", - MoreDisksThanSupported = "MoreDisksThanSupported", - NoGuestOperatingSystemConditionallySupported = "NoGuestOperatingSystemConditionallySupported", - NoSuitableVmSizeFound = "NoSuitableVmSizeFound", - NotApplicable = "NotApplicable", - NoVmSizeForBasicPricingTier = "NoVmSizeForBasicPricingTier", - NoVmSizeForSelectedAzureLocation = "NoVmSizeForSelectedAzureLocation", - NoVmSizeForSelectedPricingTier = "NoVmSizeForSelectedPricingTier", - NoVmSizeForStandardPricingTier = "NoVmSizeForStandardPricingTier", - NoVmSizeSupportsNetworkPerformance = "NoVmSizeSupportsNetworkPerformance", - NoVmSizeSupportsStoragePerformance = "NoVmSizeSupportsStoragePerformance", - OneOrMoreAdaptersNotSuitable = "OneOrMoreAdaptersNotSuitable", - OneOrMoreDisksNotSuitable = "OneOrMoreDisksNotSuitable", - UnendorsedLinuxDistributions = "UnendorsedLinuxDistributions", - Unknown = "Unknown", - WindowsClientVersionsConditionallySupported = "WindowsClientVersionsConditionallySupported", - WindowsOSNoLongerUnderMSSupport = "WindowsOSNoLongerUnderMSSupport", - WindowsServerVersionConditionallySupported = "WindowsServerVersionConditionallySupported", - WindowsServerVersionsSupportedWithCaveat = "WindowsServerVersionsSupportedWithCaveat" -} - -// @public -export enum KnownCloudSuitability { - ConditionallySuitable = "ConditionallySuitable", - NotSuitable = "NotSuitable", - ReadinessUnknown = "ReadinessUnknown", - Suitable = "Suitable", - Unknown = "Unknown" -} - -// @public -export enum KnownCurrency { - ARS = "ARS", - AUD = "AUD", - BRL = "BRL", - CAD = "CAD", - CHF = "CHF", - CNY = "CNY", - DKK = "DKK", - EUR = "EUR", - GBP = "GBP", - HKD = "HKD", - IDR = "IDR", - INR = "INR", - JPY = "JPY", - KRW = "KRW", - MXN = "MXN", - MYR = "MYR", - NOK = "NOK", - NZD = "NZD", - RUB = "RUB", - SAR = "SAR", - SEK = "SEK", - TRY = "TRY", - TWD = "TWD", - Unknown = "Unknown", - USD = "USD", - ZAR = "ZAR" -} - -// @public -export enum KnownGroupStatus { - Completed = "Completed", - Created = "Created", - Invalid = "Invalid", - Running = "Running", - Updated = "Updated" -} - -// @public -export enum KnownGroupUpdateOperation { - Add = "Add", - Remove = "Remove" -} - -// @public -export enum KnownMachineBootType { - Bios = "BIOS", - EFI = "EFI", - Unknown = "Unknown" -} - -// @public -export enum KnownPercentile { - Percentile50 = "Percentile50", - Percentile90 = "Percentile90", - Percentile95 = "Percentile95", - Percentile99 = "Percentile99" -} - -// @public -export enum KnownPrivateEndpointConnectionPropertiesProvisioningState { - Accepted = "Accepted", - Failed = "Failed", - InProgress = "InProgress", - Succeeded = "Succeeded" -} - -// @public -export enum KnownPrivateLinkServiceConnectionStateStatus { - Approved = "Approved", - Disconnected = "Disconnected", - Pending = "Pending", - Rejected = "Rejected" -} - -// @public -export enum KnownProjectStatus { - Active = "Active", - Inactive = "Inactive" -} - -// @public -export enum KnownProvisioningState { - Accepted = "Accepted", - Creating = "Creating", - Deleting = "Deleting", - Failed = "Failed", - Moving = "Moving", - Succeeded = "Succeeded" -} - -// @public -export enum KnownReservedInstance { - None = "None", - RI1Year = "RI1Year", - RI3Year = "RI3Year" -} - -// @public -export enum KnownTimeRange { - Custom = "Custom", - Day = "Day", - Month = "Month", - Week = "Week" -} - -// @public -export interface Machine { - eTag?: string; - readonly id?: string; - readonly name?: string; - properties?: MachineProperties; - readonly type?: string; -} - -// @public -export type MachineBootType = string; - -// @public -export interface MachineProperties { - readonly bootType?: MachineBootType; - readonly createdTimestamp?: Date; - readonly datacenterManagementServerArmId?: string; - readonly datacenterManagementServerName?: string; - readonly description?: string; - readonly discoveryMachineArmId?: string; - readonly disks?: { - [propertyName: string]: Disk; - }; - readonly displayName?: string; - readonly groups?: string[]; - readonly megabytesOfMemory?: number; - readonly networkAdapters?: { - [propertyName: string]: NetworkAdapter; - }; - readonly numberOfCores?: number; - readonly operatingSystemName?: string; - readonly operatingSystemType?: string; - readonly operatingSystemVersion?: string; - readonly updatedTimestamp?: Date; + +// @public +export interface AvsEstimatedExternalStorage { + monthlyPrice?: number; + storageType?: ExternalStorageType; + storageUtilization?: number; + totalStorageInGB?: number; } // @public -export interface MachineResultList { - // (undocumented) - nextLink?: string; - value?: Machine[]; +export interface AvsEstimatedNetwork { + monthlyPrice?: number; + networkType?: NetworkSkuType; } // @public -export interface Machines { - get(resourceGroupName: string, projectName: string, machineName: string, options?: MachinesGetOptionalParams): Promise; - listByProject(resourceGroupName: string, projectName: string, options?: MachinesListByProjectOptionalParams): PagedAsyncIterableIterator; +export interface AvsEstimatedNode { + cpuUtilization?: number; + fttRaidLevel?: FttAndRaidLevel; + monthlyPrice?: number; + nodeNumber?: number; + nodeType?: AzureAvsNodeType; + pricingModel?: AzureReservedInstance; + ramUtilization?: number; + storageUtilization?: number; + totalCpu?: number; + totalRam?: number; + totalStorage?: number; } // @public -export interface MachinesGetHeaders { - xMsRequestId?: string; +export interface AvsGraphAssessmentOptions extends ProxyResource { + properties?: AvsGraphAssessmentOptionsProperties; } // @public -export interface MachinesGetOptionalParams extends coreClient.OperationOptions { +export interface AvsGraphAssessmentOptionsOperationsGetOptionalParams extends OperationOptions { } // @public -export type MachinesGetResponse = MachinesGetHeaders & Machine; +export interface AvsGraphAssessmentOptionsOperationsListByParentOptionalParams extends OperationOptions { +} // @public -export interface MachinesListByProjectHeaders { - xMsRequestId?: string; +export interface AvsGraphAssessmentOptionsOperationsOperations { + get: (resourceGroupName: string, projectName: string, options?: AvsGraphAssessmentOptionsOperationsGetOptionalParams) => Promise; + listByParent: (resourceGroupName: string, projectName: string, options?: AvsGraphAssessmentOptionsOperationsListByParentOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface MachinesListByProjectNextHeaders { - xMsRequestId?: string; +export interface AvsGraphAssessmentOptionsProperties { + edges: Record; } // @public -export interface MachinesListByProjectNextOptionalParams extends coreClient.OperationOptions { +export interface AvsRecommendationsMigrationIssuesMigrationSuitabilitySkus { + readonly confidenceScore?: number; + readonly configuration?: Configuration; + fallbackMachineAssessmentArmId?: string; + readonly migrationIssues?: MigrationIssues[]; + readonly migrationPlatform?: MigrationPlatform; + readonly migrationSuitability?: MigrationSuitability; + readonly recommendedFor?: RecommendedFor; + readonly securitySuitability?: SecuritySuitability; + readonly skus?: SkusMigrationSuitability[]; + readonly totalCost?: CostDetailsCommon[]; + readonly totalSavings?: SavingsDetailsCommon[]; } // @public -export type MachinesListByProjectNextResponse = MachinesListByProjectNextHeaders & MachineResultList; +export type AzureAvsNodeType = string; // @public -export interface MachinesListByProjectOptionalParams extends coreClient.OperationOptions { -} +export type AzureAvsSuitabilityExplanation = string; // @public -export type MachinesListByProjectResponse = MachinesListByProjectHeaders & MachineResultList; +export type AzureCurrency = string; // @public -export interface NetworkAdapter { - readonly displayName?: string; - readonly ipAddresses?: string[]; - readonly macAddress?: string; -} +export type AzureLocation = string; // @public -export interface Operation { - readonly display?: OperationDisplay; - readonly name?: string; - readonly origin?: string; -} +export type AzureManagementOfferingType = string; // @public -export interface OperationDisplay { - readonly description?: string; - readonly operation?: string; - readonly provider?: string; - readonly resource?: string; -} +export type AzureOffer = string; // @public -export interface OperationResultList { - value?: Operation[]; -} +export type AzureReservedInstance = string; // @public -export interface Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; -} +export type AzureTarget = string; // @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { +export interface BillingSettings { + licensingProgram?: LicensingProgram; + subscriptionId?: string; } // @public -export type OperationsListResponse = OperationResultList; +export type CloudSuitability = string; // @public -export type Percentile = string; +export type CloudSuitabilityCommon = string; // @public -export interface PrivateEndpointConnection { - eTag?: string; - readonly id?: string; - readonly name?: string; - properties: PrivateEndpointConnectionProperties; - readonly type?: string; +export interface Configuration { + readonly azureTarget?: AzureTarget; + readonly sizingCriterion?: AssessmentSizingCriterion; } // @public -export interface PrivateEndpointConnectionCollection { - readonly nextLink?: string; - readonly value?: PrivateEndpointConnection[]; -} +export type ContinuablePage = TPage & { + continuationToken?: string; +}; // @public -export interface PrivateEndpointConnectionDeleteHeaders { - xMsRequestId?: string; +export interface CostDetailsCommon { + readonly costDetail?: NameValuePairCostType[]; + readonly savingOptions?: SavingsOptions; } // @public -export interface PrivateEndpointConnectionDeleteOptionalParams extends coreClient.OperationOptions { -} +export type CostType = string; // @public -export type PrivateEndpointConnectionDeleteResponse = PrivateEndpointConnectionDeleteHeaders; +export type CreatedByType = string; // @public -export interface PrivateEndpointConnectionGetHeaders { - xMsRequestId?: string; +export interface DownloadUrl { + readonly assessmentReportUrl: string; + readonly expirationTime: Date; } // @public -export interface PrivateEndpointConnectionGetOptionalParams extends coreClient.OperationOptions { -} +export type EnvironmentType = string; // @public -export type PrivateEndpointConnectionGetResponse = PrivateEndpointConnectionGetHeaders & PrivateEndpointConnection; +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} // @public -export interface PrivateEndpointConnectionListByProjectHeaders { - xMsRequestId?: string; +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; } // @public -export interface PrivateEndpointConnectionListByProjectOptionalParams extends coreClient.OperationOptions { +export interface ErrorModel { + readonly agentScenario?: string; + readonly applianceName?: string; + readonly code?: string; + readonly id?: number; + readonly impactedAssessmentType?: string; + readonly message?: string; + readonly messageParameters?: NameValuePair[]; + readonly possibleCauses?: string; + readonly recommendedAction?: string; + readonly runAsAccountId?: string; + readonly severity?: string; + readonly summaryMessage?: string; + readonly updatedTimeStamp?: Date; } // @public -export type PrivateEndpointConnectionListByProjectResponse = PrivateEndpointConnectionListByProjectHeaders & PrivateEndpointConnectionCollection; +export interface ErrorResponse { + error?: ErrorDetail; +} // @public -export interface PrivateEndpointConnectionOperations { - delete(resourceGroupName: string, projectName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams): Promise; - get(resourceGroupName: string, projectName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionGetOptionalParams): Promise; - listByProject(resourceGroupName: string, projectName: string, options?: PrivateEndpointConnectionListByProjectOptionalParams): Promise; - update(resourceGroupName: string, projectName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionUpdateOptionalParams): Promise; -} +export type ExternalStorageType = string; // @public -export interface PrivateEndpointConnectionProperties { - readonly privateEndpoint?: ResourceId; - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - readonly provisioningState?: PrivateEndpointConnectionPropertiesProvisioningState; -} +export type FttAndRaidLevel = string; // @public -export type PrivateEndpointConnectionPropertiesProvisioningState = string; +export type GuestOperatingSystemArchitecture = string; // @public -export interface PrivateEndpointConnectionUpdateHeaders { - xMsRequestId?: string; +export enum KnownActionType { + Internal = "Internal" } // @public -export interface PrivateEndpointConnectionUpdateOptionalParams extends coreClient.OperationOptions { - privateEndpointConnectionBody?: PrivateEndpointConnection; +export enum KnownAssessedMachineType { + AssessedMachine = "AssessedMachine", + AvsAssessedMachine = "AvsAssessedMachine", + SqlAssessedMachine = "SqlAssessedMachine", + Unknown = "Unknown" } // @public -export type PrivateEndpointConnectionUpdateResponse = PrivateEndpointConnectionUpdateHeaders & PrivateEndpointConnection; +export enum KnownAssessmentSizingCriterion { + AsOnPremises = "AsOnPremises", + PerformanceBased = "PerformanceBased" +} // @public -export interface PrivateLinkResource { - readonly id?: string; - readonly name?: string; - readonly properties?: PrivateLinkResourceProperties; - readonly type?: string; +export enum KnownAssessmentSource { + IIS = "IIS", + Machine = "Machine", + MySQLServer = "MySQLServer", + OracleDatabase = "OracleDatabase", + OracleServer = "OracleServer", + SAPInstance = "SAPInstance", + SpringbootApplication = "SpringbootApplication", + SqlDatabase = "SqlDatabase", + SqlInstance = "SqlInstance", + TomCat = "TomCat", + Unknown = "Unknown", + WebApps = "WebApps" } // @public -export interface PrivateLinkResourceCollection { - readonly nextLink?: string; - readonly value?: PrivateLinkResource[]; +export enum KnownAssessmentStatus { + Completed = "Completed", + Created = "Created", + Deleted = "Deleted", + Failed = "Failed", + Invalid = "Invalid", + OutDated = "OutDated", + OutOfSync = "OutOfSync", + Running = "Running", + Updated = "Updated" } // @public -export interface PrivateLinkResourceGetHeaders { - xMsRequestId?: string; +export enum KnownAvsApiVersions { + V20240303Preview = "2024-03-03-preview" } // @public -export interface PrivateLinkResourceGetOptionalParams extends coreClient.OperationOptions { +export enum KnownAvsAssessmentScenario { + AvsSddcExpansion = "AvsSddcExpansion", + NewAvsSddc = "NewAvsSddc", + Unknown = "Unknown" } // @public -export type PrivateLinkResourceGetResponse = PrivateLinkResourceGetHeaders & PrivateLinkResource; +export enum KnownAzureAvsNodeType { + AV36 = "AV36", + AV36P = "AV36P", + AV52 = "AV52", + AV64 = "AV64", + Unknown = "Unknown" +} // @public -export interface PrivateLinkResourceListByProjectHeaders { - xMsRequestId?: string; +export enum KnownAzureAvsSuitabilityExplanation { + InternalErrorInRecommendation = "InternalErrorInRecommendation", + NotApplicable = "NotApplicable", + Unknown = "Unknown", + UnsupportedLocationForSelectedExternalStorageTypes = "UnsupportedLocationForSelectedExternalStorageTypes", + UnsupportedLocationForSelectedNode = "UnsupportedLocationForSelectedNode" } // @public -export interface PrivateLinkResourceListByProjectOptionalParams extends coreClient.OperationOptions { +export enum KnownAzureCurrency { + ARS = "ARS", + AUD = "AUD", + BRL = "BRL", + CAD = "CAD", + CHF = "CHF", + CNY = "CNY", + DKK = "DKK", + EUR = "EUR", + GBP = "GBP", + HKD = "HKD", + IDR = "IDR", + INR = "INR", + JPY = "JPY", + KRW = "KRW", + MXN = "MXN", + MYR = "MYR", + NOK = "NOK", + NZD = "NZD", + RUB = "RUB", + SAR = "SAR", + SEK = "SEK", + TRY = "TRY", + TWD = "TWD", + Unknown = "Unknown", + USD = "USD", + ZAR = "ZAR" } // @public -export type PrivateLinkResourceListByProjectResponse = PrivateLinkResourceListByProjectHeaders & PrivateLinkResourceCollection; +export enum KnownAzureLocation { + AustraliaCentral = "AustraliaCentral", + AustraliaCentral2 = "AustraliaCentral2", + AustraliaEast = "AustraliaEast", + AustraliaSoutheast = "AustraliaSoutheast", + BrazilSouth = "BrazilSouth", + CanadaCentral = "CanadaCentral", + CanadaEast = "CanadaEast", + CentralIndia = "CentralIndia", + CentralUs = "CentralUs", + ChinaEast = "ChinaEast", + ChinaEast2 = "ChinaEast2", + ChinaNorth = "ChinaNorth", + ChinaNorth2 = "ChinaNorth2", + EastAsia = "EastAsia", + EastUs = "EastUs", + EastUs2 = "EastUs2", + FranceCentral = "FranceCentral", + FranceSouth = "FranceSouth", + GermanyCentral = "GermanyCentral", + GermanyNorth = "GermanyNorth", + GermanyNortheast = "GermanyNortheast", + GermanyWestCentral = "GermanyWestCentral", + IsraelCentral = "IsraelCentral", + ItalyNorth = "ItalyNorth", + JapanEast = "JapanEast", + JapanWest = "JapanWest", + JioIndiaWest = "JioIndiaWest", + KoreaCentral = "KoreaCentral", + KoreaSouth = "KoreaSouth", + MexicoCentral = "MexicoCentral", + NewZealandNorth = "NewZealandNorth", + NorthCentralUs = "NorthCentralUs", + NorthEurope = "NorthEurope", + NorwayEast = "NorwayEast", + NorwayWest = "NorwayWest", + PolandCentral = "PolandCentral", + QatarCentral = "QatarCentral", + SouthAfricaNorth = "SouthAfricaNorth", + SouthAfricaWest = "SouthAfricaWest", + SouthCentralUs = "SouthCentralUs", + SoutheastAsia = "SoutheastAsia", + SouthIndia = "SouthIndia", + SpainCentral = "SpainCentral", + SwedenCentral = "SwedenCentral", + SwitzerlandNorth = "SwitzerlandNorth", + SwitzerlandWest = "SwitzerlandWest", + UAECentral = "UAECentral", + UAENorth = "UAENorth", + UkSouth = "UkSouth", + UkWest = "UkWest", + Unknown = "Unknown", + USDoDCentral = "USDoDCentral", + USDoDEast = "USDoDEast", + USGovArizona = "USGovArizona", + USGovIowa = "USGovIowa", + USGovTexas = "USGovTexas", + USGovVirginia = "USGovVirginia", + UsNatEast = "UsNatEast", + UsNatWest = "UsNatWest", + UsSecCentral = "UsSecCentral", + UsSecEast = "UsSecEast", + UsSecWest = "UsSecWest", + WestCentralUs = "WestCentralUs", + WestEurope = "WestEurope", + WestIndia = "WestIndia", + WestUs = "WestUs", + WestUs2 = "WestUs2" +} // @public -export interface PrivateLinkResourceOperations { - get(resourceGroupName: string, projectName: string, privateLinkResourceName: string, options?: PrivateLinkResourceGetOptionalParams): Promise; - listByProject(resourceGroupName: string, projectName: string, options?: PrivateLinkResourceListByProjectOptionalParams): Promise; +export enum KnownAzureManagementOfferingType { + AUM = "AUM", + AzMon = "AzMon", + AzureBackup = "AzureBackup", + No = "No", + Scommi = "SCOMMI" } // @public -export interface PrivateLinkResourceProperties { - readonly groupId?: string; - readonly requiredMembers?: string[]; - readonly requiredZoneNames?: string[]; +export enum KnownAzureOffer { + EA = "EA", + Msazr0003P = "MSAZR0003P", + Msazr0023P = "MSAZR0023P", + Msazrusgov0003P = "MSAZRUSGOV0003P", + Msmcazr0044P = "MSMCAZR0044P", + Msmcazr0059P = "MSMCAZR0059P", + Msmcazr0060P = "MSMCAZR0060P", + Msmcazr0063P = "MSMCAZR0063P", + SavingsPlan1Year = "SavingsPlan1Year", + SavingsPlan3Year = "SavingsPlan3Year", + Unknown = "Unknown" } // @public -export interface PrivateLinkServiceConnectionState { - actionsRequired?: string; - description?: string; - status?: PrivateLinkServiceConnectionStateStatus; +export enum KnownAzureReservedInstance { + None = "None", + RI1Year = "RI1Year", + RI3Year = "RI3Year" } // @public -export type PrivateLinkServiceConnectionStateStatus = string; +export enum KnownAzureTarget { + AKS = "AKS", + Avs = "Avs", + AzureAppService = "AzureAppService", + AzureAppServiceContainer = "AzureAppServiceContainer", + AzureSpringApps = "AzureSpringApps", + AzureSqlvm = "AzureSQLVM", + AzureVM = "AzureVM", + FlexServerPG = "FlexServerPG", + MySQLAzureFlexServer = "MySQLAzureFlexServer", + OracleIaasVM = "OracleIaasVM", + SAPAzureInstance = "SAPAzureInstance", + SqlDatabase = "SqlDatabase", + SqlMI = "SqlMI", + Unknown = "Unknown" +} // @public -export interface Project { - eTag?: string; - readonly id?: string; - location?: string; - readonly name?: string; - properties?: ProjectProperties; - tags?: Record; - readonly type?: string; +export enum KnownCloudSuitability { + ConditionallySuitable = "ConditionallySuitable", + NotSuitable = "NotSuitable", + ReadinessUnknown = "ReadinessUnknown", + Suitable = "Suitable", + Unknown = "Unknown" } // @public -export interface ProjectProperties { - assessmentSolutionId?: string; - readonly createdTimestamp?: Date; - customerStorageAccountArmId?: string; - customerWorkspaceId?: string; - customerWorkspaceLocation?: string; - readonly lastAssessmentTimestamp?: Date; - readonly numberOfAssessments?: number; - readonly numberOfGroups?: number; - readonly numberOfMachines?: number; - readonly privateEndpointConnections?: PrivateEndpointConnection[]; - projectStatus?: ProjectStatus; - readonly provisioningState?: ProvisioningState; - publicNetworkAccess?: string; - readonly serviceEndpoint?: string; - readonly updatedTimestamp?: Date; +export enum KnownCloudSuitabilityCommon { + ConditionallySuitable = "ConditionallySuitable", + NotSuitable = "NotSuitable", + ReadinessUnknown = "ReadinessUnknown", + Suitable = "Suitable", + SuitableWithWarnings = "SuitableWithWarnings", + Unknown = "Unknown" } // @public -export interface ProjectResultList { - // (undocumented) - nextLink?: string; - value?: Project[]; +export enum KnownCostType { + DataProtectionService = "DataProtectionService", + MonitoringService = "MonitoringService", + MonthlyAvsExternalStorageCost = "MonthlyAvsExternalStorageCost", + MonthlyAvsNetworkCost = "MonthlyAvsNetworkCost", + MonthlyAvsNodeCost = "MonthlyAvsNodeCost", + MonthlyAzureHybridCost = "MonthlyAzureHybridCost", + MonthlyBandwidthCost = "MonthlyBandwidthCost", + MonthlyComputeCost = "MonthlyComputeCost", + MonthlyLicensingCost = "MonthlyLicensingCost", + MonthlyLinuxAzureHybridCost = "MonthlyLinuxAzureHybridCost", + MonthlyManagementCost = "MonthlyManagementCost", + MonthlyPremiumStorageCost = "MonthlyPremiumStorageCost", + MonthlyPremiumV2StorageCost = "MonthlyPremiumV2StorageCost", + MonthlySecurityCost = "MonthlySecurityCost", + MonthlyStandardHddStorageCost = "MonthlyStandardHddStorageCost", + MonthlyStandardSsdStorageCost = "MonthlyStandardSsdStorageCost", + MonthlyStorageCost = "MonthlyStorageCost", + MonthlyUltraDiskCost = "MonthlyUltraDiskCost", + MonthlyUltraStorageCost = "MonthlyUltraStorageCost", + PatchingService = "PatchingService", + TotalMonthlyCost = "TotalMonthlyCost" } // @public -export interface Projects { - assessmentOptions(resourceGroupName: string, projectName: string, assessmentOptionsName: string, options?: ProjectsAssessmentOptionsOptionalParams): Promise; - create(resourceGroupName: string, projectName: string, options?: ProjectsCreateOptionalParams): Promise; - delete(resourceGroupName: string, projectName: string, options?: ProjectsDeleteOptionalParams): Promise; - get(resourceGroupName: string, projectName: string, options?: ProjectsGetOptionalParams): Promise; - list(resourceGroupName: string, options?: ProjectsListOptionalParams): PagedAsyncIterableIterator; - listAssessmentOptionsList(resourceGroupName: string, projectName: string, options?: ProjectsAssessmentOptionsListOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: ProjectsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, projectName: string, options?: ProjectsUpdateOptionalParams): Promise; +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" } // @public -export interface ProjectsAssessmentOptionsHeaders { - xMsRequestId?: string; +export enum KnownEnvironmentType { + DevTest = "DevTest", + Production = "Production", + Unknown = "Unknown" } // @public -export interface ProjectsAssessmentOptionsListHeaders { - xMsRequestId?: string; +export enum KnownExternalStorageType { + AnfPremium = "AnfPremium", + AnfStandard = "AnfStandard", + AnfUltra = "AnfUltra", + None = "None", + Unknown = "Unknown" } // @public -export interface ProjectsAssessmentOptionsListOptionalParams extends coreClient.OperationOptions { +export enum KnownFttAndRaidLevel { + Ftt1Raid1 = "Ftt1Raid1", + Ftt1Raid5 = "Ftt1Raid5", + Ftt2Raid1 = "Ftt2Raid1", + Ftt2Raid6 = "Ftt2Raid6", + Ftt3Raid1 = "Ftt3Raid1", + Unknown = "Unknown" } // @public -export type ProjectsAssessmentOptionsListResponse = ProjectsAssessmentOptionsListHeaders & AssessmentOptionsResultList; +export enum KnownGuestOperatingSystemArchitecture { + Unknown = "Unknown", + X64 = "X64", + X86 = "X86" +} // @public -export interface ProjectsAssessmentOptionsOptionalParams extends coreClient.OperationOptions { +export enum KnownLicensingProgram { + EA = "EA", + MCA = "MCA", + Retail = "Retail", + Unknown = "Unknown" } // @public -export type ProjectsAssessmentOptionsResponse = ProjectsAssessmentOptionsHeaders & AssessmentOptions; +export enum KnownLinkageKind { + Database = "Database", + Instance = "Instance", + Machine = "Machine", + Server = "Server", + Unknown = "Unknown", + WebApplication = "WebApplication", + WebServer = "WebServer" +} // @public -export interface ProjectsCreateHeaders { - xMsRequestId?: string; +export enum KnownLinkageType { + Parent = "Parent", + Source = "Source" } // @public -export interface ProjectsCreateOptionalParams extends coreClient.OperationOptions { - project?: Project; +export enum KnownMachineBootType { + Bios = "BIOS", + EFI = "EFI", + NotSpecified = "NotSpecified", + Unknown = "Unknown" } // @public -export type ProjectsCreateResponse = ProjectsCreateHeaders & Project; +export enum KnownMigrateWorkloadType { + Database = "Database", + Host = "Host", + Instance = "Instance", + Machine = "Machine", + ManagementServer = "ManagementServer", + Server = "Server", + Unknown = "Unknown", + WebApplication = "WebApplication", + WebServer = "WebServer" +} // @public -export interface ProjectsDeleteHeaders { - xMsRequestId?: string; +export enum KnownMigrationIssuesCategory { + Internal = "Internal", + Issue = "Issue", + Warning = "Warning" } // @public -export interface ProjectsDeleteOptionalParams extends coreClient.OperationOptions { +export enum KnownMigrationPlatform { + IaaS = "IaaS", + PaaS = "PaaS", + SaaS = "SaaS", + Unknown = "Unknown" } // @public -export type ProjectsDeleteResponse = ProjectsDeleteHeaders; +export enum KnownMigrationType { + Rearchitect = "Rearchitect", + Rehost = "Rehost", + Replatform = "Replatform", + Retain = "Retain", + Unknown = "Unknown" +} // @public -export interface ProjectsGetHeaders { - xMsRequestId?: string; +export enum KnownNetworkSkuType { + ExpressRouteUltra = "ExpressRouteUltra", + None = "None", + Unknown = "Unknown" } // @public -export interface ProjectsGetOptionalParams extends coreClient.OperationOptions { +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" } // @public -export type ProjectsGetResponse = ProjectsGetHeaders & Project; +export enum KnownPercentile { + Percentile50 = "Percentile50", + Percentile90 = "Percentile90", + Percentile95 = "Percentile95", + Percentile99 = "Percentile99", + PercentileUnknown = "PercentileUnknown" +} // @public -export interface ProjectsListBySubscriptionHeaders { - xMsRequestId?: string; +export enum KnownProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded", + Updating = "Updating" } // @public -export interface ProjectsListBySubscriptionNextHeaders { - xMsRequestId?: string; +export enum KnownSavingsOptions { + CustomAzureOfferCode = "CustomAzureOfferCode", + None = "None", + RI1Year = "RI1Year", + RI3Year = "RI3Year", + SavingsPlan1Year = "SavingsPlan1Year", + SavingsPlan3Year = "SavingsPlan3Year" } // @public -export interface ProjectsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export enum KnownSavingsType { + MonthlyAhubSqlCostSavings = "MonthlyAhubSqlCostSavings", + MonthlyAzureHybridCostSavings = "MonthlyAzureHybridCostSavings", + MonthlyLinuxAzureHybridCostSavings = "MonthlyLinuxAzureHybridCostSavings", + MonthlyVcfByolCostDifference = "MonthlyVcfByolCostDifference" } // @public -export type ProjectsListBySubscriptionNextResponse = ProjectsListBySubscriptionNextHeaders & ProjectResultList; +export enum KnownScopeType { + AzureResourceGraphQuery = "AzureResourceGraphQuery", + ServerGroupId = "ServerGroupId" +} // @public -export interface ProjectsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export enum KnownSkuKind { + Details = "Details", + Endpoint = "Endpoint" } // @public -export type ProjectsListBySubscriptionResponse = ProjectsListBySubscriptionHeaders & ProjectResultList; +export enum KnownSkuType { + AppServicePlan = "AppServicePlan", + AzureSpringApps = "AzureSpringApps", + Compute = "Compute", + Network = "Network", + Storage = "Storage", + Unknown = "Unknown" +} // @public -export interface ProjectsListHeaders { - xMsRequestId?: string; +export enum KnownStrategyType { + CostOptimized = "CostOptimized", + EffortOptimized = "EffortOptimized", + PaaSPreferred = "PaaSPreferred" } // @public -export interface ProjectsListNextHeaders { - xMsRequestId?: string; +export enum KnownSummaryType { + Strategy = "Strategy", + Target = "Target", + Unknown = "Unknown" } // @public -export interface ProjectsListNextOptionalParams extends coreClient.OperationOptions { +export enum KnownTimeRange { + Custom = "Custom", + Day = "Day", + Month = "Month", + Week = "Week" } // @public -export type ProjectsListNextResponse = ProjectsListNextHeaders & ProjectResultList; +export type LicensingProgram = string; + +// @public +export type LinkageKind = string; // @public -export interface ProjectsListOptionalParams extends coreClient.OperationOptions { +export interface Linkages { + readonly armId?: string; + readonly kind?: LinkageKind; + readonly linkageType?: LinkageType; + readonly workloadName?: string; } // @public -export type ProjectsListResponse = ProjectsListHeaders & ProjectResultList; +export type LinkageType = string; // @public -export type ProjectStatus = string; +export type MachineBootType = string; // @public -export interface ProjectsUpdateHeaders { - xMsRequestId?: string; +export interface ManagementDetails { + readonly name?: AzureManagementOfferingType; + readonly readinessSummary?: NameValuePairCloudSuitabilityCommon[]; } -// @public -export interface ProjectsUpdateOptionalParams extends coreClient.OperationOptions { - project?: Project; +// @public (undocumented) +export class MigrateClient { + constructor(credential: TokenCredential, subscriptionId: string, options?: MigrateClientOptionalParams); + readonly avsAssessedMachinesV2Operations: AvsAssessedMachinesV2OperationsOperations; + readonly avsAssessmentsV2Operations: AvsAssessmentsV2OperationsOperations; + readonly avsAssessmentV2SummaryOperations: AvsAssessmentV2SummaryOperationsOperations; + readonly avsGraphAssessmentOptionsOperations: AvsGraphAssessmentOptionsOperationsOperations; + readonly operations: OperationsOperations; + readonly pipeline: Pipeline; } // @public -export type ProjectsUpdateResponse = ProjectsUpdateHeaders & Project; +export interface MigrateClientOptionalParams extends ClientOptions { + apiVersion?: string; +} // @public -export type ProvisioningState = string; +export type MigrateWorkloadType = string; // @public -export type ReservedInstance = string; +export interface MigrationDetails { + readonly migrationType?: MigrationType; + readonly readinessSummary?: NameValuePairCloudSuitabilityCommon[]; +} // @public -export interface ResourceId { - readonly id?: string; +export interface MigrationIssues { + readonly issueCategory?: MigrationIssuesCategory; + readonly issueCode?: string; + readonly issueDescription?: string; + readonly moreInformation?: MoreInformation[]; + readonly possibleCause?: string; + readonly recommendedActions?: string[]; } -// @public (undocumented) -export interface ServerCollector { - // (undocumented) - eTag?: string; - readonly id?: string; - readonly name?: string; - // (undocumented) - properties?: CollectorProperties; - readonly type?: string; -} +// @public +export type MigrationIssuesCategory = string; // @public -export interface ServerCollectorList { - value?: ServerCollector[]; -} +export type MigrationPlatform = string; // @public -export interface ServerCollectors { - create(resourceGroupName: string, projectName: string, serverCollectorName: string, options?: ServerCollectorsCreateOptionalParams): Promise; - delete(resourceGroupName: string, projectName: string, serverCollectorName: string, options?: ServerCollectorsDeleteOptionalParams): Promise; - get(resourceGroupName: string, projectName: string, serverCollectorName: string, options?: ServerCollectorsGetOptionalParams): Promise; - listByProject(resourceGroupName: string, projectName: string, options?: ServerCollectorsListByProjectOptionalParams): PagedAsyncIterableIterator; +export interface MigrationSuitability { + readonly readiness?: CloudSuitabilityCommon; } // @public -export interface ServerCollectorsCreateHeaders { - xMsRequestId?: string; +export type MigrationType = string; + +// @public +export interface MoreInformation { + readonly title: string; + readonly url: string; } // @public -export interface ServerCollectorsCreateOptionalParams extends coreClient.OperationOptions { - collectorBody?: ServerCollector; +export interface NameValuePair { + readonly name?: string; + readonly value?: string; } // @public -export type ServerCollectorsCreateResponse = ServerCollectorsCreateHeaders & ServerCollector; +export interface NameValuePairCloudSuitabilityCommon { + readonly name?: CloudSuitabilityCommon; + readonly value?: number; +} // @public -export interface ServerCollectorsDeleteHeaders { - xMsRequestId?: string; +export interface NameValuePairCostType { + readonly name?: CostType; + readonly value?: number; } // @public -export interface ServerCollectorsDeleteOptionalParams extends coreClient.OperationOptions { +export interface NameValuePairSavingsType { + readonly name?: SavingsType; + readonly value?: number; } // @public -export type ServerCollectorsDeleteResponse = ServerCollectorsDeleteHeaders; +export type NetworkSkuType = string; // @public -export interface ServerCollectorsGetHeaders { - xMsRequestId?: string; +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; } // @public -export interface ServerCollectorsGetOptionalParams extends coreClient.OperationOptions { +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; } // @public -export type ServerCollectorsGetResponse = ServerCollectorsGetHeaders & ServerCollector; +export interface OperationsListOptionalParams extends OperationOptions { +} // @public -export interface ServerCollectorsListByProjectHeaders { - xMsRequestId?: string; +export interface OperationsOperations { + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface ServerCollectorsListByProjectOptionalParams extends coreClient.OperationOptions { +export type Origin = string; + +// @public +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; + next(): Promise>; } // @public -export type ServerCollectorsListByProjectResponse = ServerCollectorsListByProjectHeaders & ServerCollectorList; +export interface PageSettings { + continuationToken?: string; +} // @public -export type TimeRange = string; +export type Percentile = string; // @public -export interface UpdateGroupBody { - eTag?: string; - properties?: GroupBodyProperties; +export interface PerformanceData { + percentile?: Percentile; + perfDataEndTime?: Date; + perfDataStartTime?: Date; + timeRange?: TimeRange; } // @public -export interface VmFamily { - readonly category?: string[]; - readonly familyName?: string; - readonly targetLocations?: string[]; +export type ProvisioningState = string; + +// @public +export interface ProxyResource extends Resource { } -// @public (undocumented) -export interface VmUptime { - daysPerMonth?: number; - hoursPerDay?: number; +// @public +export interface RecommendedFor { + readonly strategies?: StrategyType[]; } -// @public (undocumented) -export interface VMwareCollector { - // (undocumented) - eTag?: string; +// @public +export interface Resource { readonly id?: string; readonly name?: string; - // (undocumented) - properties?: CollectorProperties; + readonly systemData?: SystemData; readonly type?: string; } // @public -export interface VMwareCollectorList { - value?: VMwareCollector[]; +export function restorePoller(client: MigrateClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike, TResult>, options?: RestorePollerOptions): PollerLike, TResult>; + +// @public (undocumented) +export interface RestorePollerOptions extends OperationOptions { + abortSignal?: AbortSignalLike; + processResponseBody?: (result: TResponse) => Promise; + updateIntervalInMs?: number; } // @public -export interface VMwareCollectors { - create(resourceGroupName: string, projectName: string, vmWareCollectorName: string, options?: VMwareCollectorsCreateOptionalParams): Promise; - delete(resourceGroupName: string, projectName: string, vmWareCollectorName: string, options?: VMwareCollectorsDeleteOptionalParams): Promise; - get(resourceGroupName: string, projectName: string, vmWareCollectorName: string, options?: VMwareCollectorsGetOptionalParams): Promise; - listByProject(resourceGroupName: string, projectName: string, options?: VMwareCollectorsListByProjectOptionalParams): PagedAsyncIterableIterator; +export interface SavingsDetailsCommon { + readonly savingOptions?: SavingsOptions; + readonly savingsDetail?: NameValuePairSavingsType[]; } // @public -export interface VMwareCollectorsCreateHeaders { - xMsRequestId?: string; +export type SavingsOptions = string; + +// @public +export interface SavingsSettings { + azureOfferCode?: AzureOffer; + savingsOptions?: SavingsOptions; } // @public -export interface VMwareCollectorsCreateOptionalParams extends coreClient.OperationOptions { - collectorBody?: VMwareCollector; +export type SavingsType = string; + +// @public +export interface Scope { + azureResourceGraphQuery?: string; + scopeType?: ScopeType; + serverGroupId?: string; } // @public -export type VMwareCollectorsCreateResponse = VMwareCollectorsCreateHeaders & VMwareCollector; +export type ScopeType = string; + +// @public +export interface SecuritySuitability { + readonly readiness?: CloudSuitabilityCommon; +} // @public -export interface VMwareCollectorsDeleteHeaders { - xMsRequestId?: string; +export interface SkuDetails { + readonly capabilities?: NameValuePair[]; + readonly skuName?: string; + readonly skuType?: SkuType; + readonly totalCost?: CostDetailsCommon[]; + readonly totalSavings?: SavingsDetailsCommon[]; } // @public -export interface VMwareCollectorsDeleteOptionalParams extends coreClient.OperationOptions { +export type SkuKind = string; + +// @public +export interface SkusMigrationSuitability { + readonly details?: SkuDetails; + readonly displayName?: string; + readonly id?: string; + readonly kind?: SkuKind; + readonly resourceUri?: string; + readonly sources?: SourceRecommendationMigrationSuitability[]; + readonly type?: SkuType; } // @public -export type VMwareCollectorsDeleteResponse = VMwareCollectorsDeleteHeaders; +export type SkuType = string; // @public -export interface VMwareCollectorsGetHeaders { - xMsRequestId?: string; +export interface SourceDetails { + readonly count?: number; + readonly platform?: MigrationPlatform; + readonly sourceName?: AssessmentSource; + readonly sourceType?: MigrateWorkloadType; } // @public -export interface VMwareCollectorsGetOptionalParams extends coreClient.OperationOptions { +export interface SourceRecommendationMigrationSuitability { + readonly migrationSuitability?: MigrationSuitability; + readonly name?: string; } // @public -export type VMwareCollectorsGetResponse = VMwareCollectorsGetHeaders & VMwareCollector; +export type StrategyType = string; + +// @public +export type SummaryType = string; // @public -export interface VMwareCollectorsListByProjectHeaders { - xMsRequestId?: string; +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; } // @public -export interface VMwareCollectorsListByProjectOptionalParams extends coreClient.OperationOptions { +export interface TargetDetails { + readonly count?: number; + readonly platform?: MigrationPlatform; + readonly targetName?: AzureTarget; + readonly targetType?: MigrateWorkloadType; } // @public -export type VMwareCollectorsListByProjectResponse = VMwareCollectorsListByProjectHeaders & VMwareCollectorList; +export interface TargetSourcePair { + readonly confidenceScore?: number; + readonly costDetails?: CostDetailsCommon[]; + readonly managementDetails?: ManagementDetails[]; + readonly migrationDetails?: MigrationDetails; + readonly savingsDetails?: SavingsDetailsCommon[]; + readonly sourceCount?: number; + readonly sourceRef?: AssessmentSource; + readonly targetCount?: number; + readonly targetRef?: AzureTarget; +} + +// @public +export type TimeRange = string; // (No @packageDocumentation comment for this package) diff --git a/sdk/migrate/arm-migrate/sample.env b/sdk/migrate/arm-migrate/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/migrate/arm-migrate/sample.env +++ b/sdk/migrate/arm-migrate/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/migrate/arm-migrate/samples-dev/assessedMachinesGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/assessedMachinesGetSample.ts deleted file mode 100644 index da1b0154caac..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/assessedMachinesGetSample.ts +++ /dev/null @@ -1,42 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get an assessed machine with its size & cost estimate that was evaluated in the specified assessment. - * - * @summary Get an assessed machine with its size & cost estimate that was evaluated in the specified assessment. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessedMachines_Get.json - */ -async function assessedMachinesGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const assessedMachineName = "f57fe432-3bd2-486a-a83a-6f4d99f1a952"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessedMachines.get( - resourceGroupName, - projectName, - groupName, - assessmentName, - assessedMachineName, - ); - console.log(result); -} - -async function main(): Promise { - await assessedMachinesGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/assessedMachinesListByAssessmentSample.ts b/sdk/migrate/arm-migrate/samples-dev/assessedMachinesListByAssessmentSample.ts deleted file mode 100644 index 65ba25a378c3..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/assessedMachinesListByAssessmentSample.ts +++ /dev/null @@ -1,51 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get list of machines that assessed as part of the specified assessment. Returns a json array of objects of type 'assessedMachine' as specified in the Models section. - -Whenever an assessment is created or updated, it goes under computation. During this phase, the 'status' field of Assessment object reports 'Computing'. -During the period when the assessment is under computation, the list of assessed machines is empty and no assessed machines are returned by this call. - - * - * @summary Get list of machines that assessed as part of the specified assessment. Returns a json array of objects of type 'assessedMachine' as specified in the Models section. - -Whenever an assessment is created or updated, it goes under computation. During this phase, the 'status' field of Assessment object reports 'Computing'. -During the period when the assessment is under computation, the list of assessed machines is empty and no assessed machines are returned by this call. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessedMachines_ListByAssessment.json - */ -async function assessedMachinesListByAssessment(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.assessedMachines.listByAssessment( - resourceGroupName, - projectName, - groupName, - assessmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await assessedMachinesListByAssessment(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/assessmentsCreateSample.ts b/sdk/migrate/arm-migrate/samples-dev/assessmentsCreateSample.ts deleted file mode 100644 index 8578a7b47b81..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/assessmentsCreateSample.ts +++ /dev/null @@ -1,88 +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 type { Assessment, AssessmentsCreateOptionalParams } from "@azure/arm-migrate"; -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new assessment with the given name and the specified settings. Since name of an assessment in a project is a unique identifier, if an assessment with the name provided already exists, then the existing assessment is updated. - -Any PUT operation, resulting in either create or update on an assessment, will cause the assessment to go in a "InProgress" state. This will be indicated by the field 'computationState' on the Assessment object. During this time no other PUT operation will be allowed on that assessment object, nor will a Delete operation. Once the computation for the assessment is complete, the field 'computationState' will be updated to 'Ready', and then other PUT or DELETE operations can happen on the assessment. - -When assessment is under computation, any PUT will lead to a 400 - Bad Request error. - - * - * @summary Create a new assessment with the given name and the specified settings. Since name of an assessment in a project is a unique identifier, if an assessment with the name provided already exists, then the existing assessment is updated. - -Any PUT operation, resulting in either create or update on an assessment, will cause the assessment to go in a "InProgress" state. This will be indicated by the field 'computationState' on the Assessment object. During this time no other PUT operation will be allowed on that assessment object, nor will a Delete operation. Once the computation for the assessment is complete, the field 'computationState' will be updated to 'Ready', and then other PUT or DELETE operations can happen on the assessment. - -When assessment is under computation, any PUT will lead to a 400 - Bad Request error. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Create.json - */ -async function assessmentsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Group2"; - const assessmentName = "assessment_5_14_2019_16_48_47"; - const assessment: Assessment = { - eTag: '"1e000c2c-0000-0d00-0000-5cdaa4190000"', - properties: { - azureDiskType: "StandardOrPremium", - azureHybridUseBenefit: "Yes", - azureLocation: "NorthEurope", - azureOfferCode: "MSAZR0003P", - azurePricingTier: "Standard", - azureStorageRedundancy: "LocallyRedundant", - azureVmFamilies: [ - "Dv2_series", - "F_series", - "Dv3_series", - "DS_series", - "DSv2_series", - "Fs_series", - "Dsv3_series", - "Ev3_series", - "Esv3_series", - "D_series", - "M_series", - "Fsv2_series", - "H_series", - ], - currency: "USD", - discountPercentage: 100, - percentile: "Percentile95", - reservedInstance: "RI3Year", - scalingFactor: 1, - sizingCriterion: "PerformanceBased", - stage: "InProgress", - timeRange: "Day", - vmUptime: { daysPerMonth: 31, hoursPerDay: 24 }, - }, - }; - const options: AssessmentsCreateOptionalParams = { assessment }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.create( - resourceGroupName, - projectName, - groupName, - assessmentName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await assessmentsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/assessmentsDeleteSample.ts b/sdk/migrate/arm-migrate/samples-dev/assessmentsDeleteSample.ts deleted file mode 100644 index 150e326d1e09..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/assessmentsDeleteSample.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. - */ -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete an assessment from the project. The machines remain in the assessment. Deleting a non-existent assessment results in a no-operation. - -When an assessment is under computation, as indicated by the 'computationState' field, it cannot be deleted. Any such attempt will return a 400 - Bad Request. - - * - * @summary Delete an assessment from the project. The machines remain in the assessment. Deleting a non-existent assessment results in a no-operation. - -When an assessment is under computation, as indicated by the 'computationState' field, it cannot be deleted. Any such attempt will return a 400 - Bad Request. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Delete.json - */ -async function assessmentsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.delete( - resourceGroupName, - projectName, - groupName, - assessmentName, - ); - console.log(result); -} - -async function main(): Promise { - await assessmentsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/assessmentsGetReportDownloadUrlSample.ts b/sdk/migrate/arm-migrate/samples-dev/assessmentsGetReportDownloadUrlSample.ts deleted file mode 100644 index e3f0ef2c511d..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/assessmentsGetReportDownloadUrlSample.ts +++ /dev/null @@ -1,40 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the URL for downloading the assessment in a report format. - * - * @summary Get the URL for downloading the assessment in a report format. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_GetReportDownloadUrl.json - */ -async function assessmentsGetReportDownloadUrl(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.getReportDownloadUrl( - resourceGroupName, - projectName, - groupName, - assessmentName, - ); - console.log(result); -} - -async function main(): Promise { - await assessmentsGetReportDownloadUrl(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/assessmentsGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/assessmentsGetSample.ts deleted file mode 100644 index d24f8e9f1c9e..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/assessmentsGetSample.ts +++ /dev/null @@ -1,40 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get an existing assessment with the specified name. Returns a json object of type 'assessment' as specified in Models section. - * - * @summary Get an existing assessment with the specified name. Returns a json object of type 'assessment' as specified in Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Get.json - */ -async function assessmentsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.get( - resourceGroupName, - projectName, - groupName, - assessmentName, - ); - console.log(result); -} - -async function main(): Promise { - await assessmentsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/assessmentsListByGroupSample.ts b/sdk/migrate/arm-migrate/samples-dev/assessmentsListByGroupSample.ts deleted file mode 100644 index 157792f7e007..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/assessmentsListByGroupSample.ts +++ /dev/null @@ -1,47 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all assessments created for the specified group. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * - * @summary Get all assessments created for the specified group. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_ListByGroup.json - */ -async function assessmentsListByGroup(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.assessments.listByGroup( - resourceGroupName, - projectName, - groupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await assessmentsListByGroup(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/assessmentsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples-dev/assessmentsListByProjectSample.ts deleted file mode 100644 index 112588b2b3b6..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/assessmentsListByProjectSample.ts +++ /dev/null @@ -1,42 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all assessments created in the project. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * - * @summary Get all assessments created in the project. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_ListByProject.json - */ -async function assessmentsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.assessments.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await assessmentsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/avsAssessedMachinesV2OperationsGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/avsAssessedMachinesV2OperationsGetSample.ts new file mode 100644 index 000000000000..6a894724d40a --- /dev/null +++ b/sdk/migrate/arm-migrate/samples-dev/avsAssessedMachinesV2OperationsGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a AvsAssessedMachineV2 + * + * @summary get a AvsAssessedMachineV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessedMachinesV2Operations_Get_MaximumSet_Gen.json + */ +async function avsAssessedMachinesV2OperationsGetMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessedMachinesV2Operations.get( + "rgavsAssessments", + "contosoProject", + "assessmentName", + "machine1", + ); + console.log(result); +} + +async function main(): Promise { + await avsAssessedMachinesV2OperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/avsAssessedMachinesV2OperationsListByParentSample.ts b/sdk/migrate/arm-migrate/samples-dev/avsAssessedMachinesV2OperationsListByParentSample.ts new file mode 100644 index 000000000000..951004c1f64b --- /dev/null +++ b/sdk/migrate/arm-migrate/samples-dev/avsAssessedMachinesV2OperationsListByParentSample.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list AvsAssessedMachineV2 resources by AvsAssessmentV2 + * + * @summary list AvsAssessedMachineV2 resources by AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessedMachinesV2Operations_ListByParent_MaximumSet_Gen.json + */ +async function avsAssessedMachinesV2OperationsListByParentMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsAssessedMachinesV2Operations.listByParent( + "rgavsAssessments", + "contosoProject", + "assessmentName", + { + filter: "ozyotnnfedxreohjtgfqxmefn", + pageSize: 26, + continuationToken: "vhdrqptyyromhgz", + totalRecordCount: 7, + }, + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await avsAssessedMachinesV2OperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/avsAssessmentV2SummaryOperationsGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentV2SummaryOperationsGetSample.ts new file mode 100644 index 000000000000..4cc9f5c73392 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentV2SummaryOperationsGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a AvsAssessmentV2Summary + * + * @summary get a AvsAssessmentV2Summary + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json + */ +async function avsAssessmentV2SummaryOperationsGetMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentV2SummaryOperations.get( + "rgavsAssessments", + "contosoProject", + "assessmentName", + "PaaSPreferred", + ); + console.log(result); +} + +async function main(): Promise { + await avsAssessmentV2SummaryOperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/avsAssessmentV2SummaryOperationsListByParentSample.ts b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentV2SummaryOperationsListByParentSample.ts new file mode 100644 index 000000000000..51f415844b95 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentV2SummaryOperationsListByParentSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list AvsAssessmentV2Summary resources by AvsAssessmentV2 + * + * @summary list AvsAssessmentV2Summary resources by AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_ListByParent_MaximumSet_Gen.json + */ +async function avsAssessmentV2SummaryOperationsListByParentMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsAssessmentV2SummaryOperations.listByParent( + "rgavsAssessments", + "contosoProject", + "assessmentName", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await avsAssessmentV2SummaryOperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsCreateSample.ts b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsCreateSample.ts new file mode 100644 index 000000000000..3efff00991c3 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsCreateSample.ts @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a AvsAssessmentV2 + * + * @summary create a AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Create_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsCreateMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentsV2Operations.create( + "rgavsAssessments", + "contosoProject", + "assessmentName", + { + properties: { + scope: { + scopeType: "ServerGroupId", + serverGroupId: "fxonspfmzfuiaepr", + azureResourceGraphQuery: "ylnfwgptlyzwzkotmunbx", + }, + settings: { + azureLocation: "actuloeieva", + currency: "Unknown", + scalingFactor: 28, + discountPercentage: 27, + sizingCriterion: "PerformanceBased", + performanceData: { + percentile: "Unknown", + timeRange: "Day", + perfDataStartTime: new Date("2025-02-21T05:36:34.751Z"), + perfDataEndTime: new Date("2025-02-21T05:36:34.751Z"), + }, + savingsSettings: { + savingsOptions: "None", + azureOfferCode: "Unknown", + }, + billingSettings: { + licensingProgram: "Retail", + subscriptionId: "xvtuenxmmjuqlhgmvev", + }, + environmentType: "Production", + failuresToTolerateAndRaidLevelList: ["Unknown"], + vcpuOversubscription: 25, + nodeTypes: ["Unknown"], + avsAssessmentScenario: "Unknown", + externalStorageTypes: ["Unknown"], + cpuHeadroom: 27, + isVcfByolEnabled: true, + memOvercommit: 11, + dedupeCompression: 26, + isStretchClusterEnabled: true, + }, + details: { status: "Created" }, + fallbackMachineAssessmentArmId: "tpjvxfcyxsgngqdxyrrfh", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await avsAssessmentsV2OperationsCreateMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsDeleteSample.ts b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsDeleteSample.ts new file mode 100644 index 000000000000..7c88beedb9f0 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsDeleteSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a AvsAssessmentV2 + * + * @summary delete a AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Delete_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsDeleteMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + await client.avsAssessmentsV2Operations.delete( + "rgavsAssessments", + "contosoProject", + "assessmentName", + ); +} + +async function main(): Promise { + await avsAssessmentsV2OperationsDeleteMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsDownloadUrlSample.ts b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsDownloadUrlSample.ts new file mode 100644 index 000000000000..358f0acd095e --- /dev/null +++ b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsDownloadUrlSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the URL for downloading the assessment in a report format. + * + * @summary get the URL for downloading the assessment in a report format. + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_DownloadUrl_MaximumSet_Gen.json + */ +async function getDownloadURLForTheAssessmentReport(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentsV2Operations.downloadUrl( + "rgavsAssessments", + "contosoProject", + "assessmentName", + {}, + ); + console.log(result); +} + +async function main(): Promise { + await getDownloadURLForTheAssessmentReport(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsGetSample.ts new file mode 100644 index 000000000000..6eeb1e1fd2aa --- /dev/null +++ b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a AvsAssessmentV2 + * + * @summary get a AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Get_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsGetMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentsV2Operations.get( + "rgavsAssessments", + "contosoProject", + "assessmentName", + ); + console.log(result); +} + +async function main(): Promise { + await avsAssessmentsV2OperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsListByParentSample.ts b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsListByParentSample.ts new file mode 100644 index 000000000000..30a34f3b1b11 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples-dev/avsAssessmentsV2OperationsListByParentSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list AvsAssessmentV2 resources by AssessmentProject + * + * @summary list AvsAssessmentV2 resources by AssessmentProject + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_ListByParent_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsListByParentMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsAssessmentsV2Operations.listByParent( + "rgavsAssessments", + "contosoProject", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await avsAssessmentsV2OperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/avsGraphAssessmentOptionsOperationsGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/avsGraphAssessmentOptionsOperationsGetSample.ts new file mode 100644 index 000000000000..8612b18797d5 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples-dev/avsGraphAssessmentOptionsOperationsGetSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a AvsGraphAssessmentOptions + * + * @summary get a AvsGraphAssessmentOptions + * x-ms-original-file: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + */ +async function avsGraphAssessmentOptionsOperationsGetMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsGraphAssessmentOptionsOperations.get( + "rgavsAssessments", + "contosoProject", + ); + console.log(result); +} + +async function main(): Promise { + await avsGraphAssessmentOptionsOperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/avsGraphAssessmentOptionsOperationsListByParentSample.ts b/sdk/migrate/arm-migrate/samples-dev/avsGraphAssessmentOptionsOperationsListByParentSample.ts new file mode 100644 index 000000000000..7c59bf8ba76a --- /dev/null +++ b/sdk/migrate/arm-migrate/samples-dev/avsGraphAssessmentOptionsOperationsListByParentSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list AvsGraphAssessmentOptions resources by AssessmentProject + * + * @summary list AvsGraphAssessmentOptions resources by AssessmentProject + * x-ms-original-file: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_ListByParent_MaximumSet_Gen.json + */ +async function avsGraphAssessmentOptionsOperationsListByParentMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsGraphAssessmentOptionsOperations.listByParent( + "rgavsAssessments", + "contosoProject", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await avsGraphAssessmentOptionsOperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/groupsCreateSample.ts b/sdk/migrate/arm-migrate/samples-dev/groupsCreateSample.ts deleted file mode 100644 index a51569adc8c0..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/groupsCreateSample.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. - */ -import type { Group, GroupsCreateOptionalParams } from "@azure/arm-migrate"; -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new group by sending a json object of type 'group' as given in Models section as part of the Request Body. The group name in a project is unique. - -This operation is Idempotent. - - * - * @summary Create a new group by sending a json object of type 'group' as given in Models section as part of the Request Body. The group name in a project is unique. - -This operation is Idempotent. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Create.json - */ -async function groupsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Group2"; - const group: Group = { - eTag: '"1e000c2c-0000-0d00-0000-5cdaa4190000"', - properties: {}, - }; - const options: GroupsCreateOptionalParams = { group }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.create(resourceGroupName, projectName, groupName, options); - console.log(result); -} - -async function main(): Promise { - await groupsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/groupsDeleteSample.ts b/sdk/migrate/arm-migrate/samples-dev/groupsDeleteSample.ts deleted file mode 100644 index 137670c88eb4..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/groupsDeleteSample.ts +++ /dev/null @@ -1,40 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the group from the project. The machines remain in the project. Deleting a non-existent group results in a no-operation. - -A group is an aggregation mechanism for machines in a project. Therefore, deleting group does not delete machines in it. - - * - * @summary Delete the group from the project. The machines remain in the project. Deleting a non-existent group results in a no-operation. - -A group is an aggregation mechanism for machines in a project. Therefore, deleting group does not delete machines in it. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Delete.json - */ -async function groupsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.delete(resourceGroupName, projectName, groupName); - console.log(result); -} - -async function main(): Promise { - await groupsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/groupsGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/groupsGetSample.ts deleted file mode 100644 index e768a0109932..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/groupsGetSample.ts +++ /dev/null @@ -1,34 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get information related to a specific group in the project. Returns a json object of type 'group' as specified in the models section. - * - * @summary Get information related to a specific group in the project. Returns a json object of type 'group' as specified in the models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Get.json - */ -async function groupsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.get(resourceGroupName, projectName, groupName); - console.log(result); -} - -async function main(): Promise { - await groupsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/groupsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples-dev/groupsListByProjectSample.ts deleted file mode 100644 index b75bb208dc4b..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/groupsListByProjectSample.ts +++ /dev/null @@ -1,36 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all groups created in the project. Returns a json array of objects of type 'group' as specified in the Models section. - * - * @summary Get all groups created in the project. Returns a json array of objects of type 'group' as specified in the Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_ListByProject.json - */ -async function groupsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.groups.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await groupsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/groupsUpdateMachinesSample.ts b/sdk/migrate/arm-migrate/samples-dev/groupsUpdateMachinesSample.ts deleted file mode 100644 index bea0b86dbdc0..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/groupsUpdateMachinesSample.ts +++ /dev/null @@ -1,34 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update machines in group by adding or removing machines. - * - * @summary Update machines in group by adding or removing machines. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_UpdateMachines.json - */ -async function groupsUpdateMachines(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Group2"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.updateMachines(resourceGroupName, projectName, groupName); - console.log(result); -} - -async function main(): Promise { - await groupsUpdateMachines(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsCreateSample.ts b/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsCreateSample.ts deleted file mode 100644 index e82b72c64ce4..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsCreateSample.ts +++ /dev/null @@ -1,58 +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 type { HyperVCollector, HyperVCollectorsCreateOptionalParams } from "@azure/arm-migrate"; -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update Hyper-V collector - * - * @summary Create or Update Hyper-V collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Create.json - */ -async function hyperVCollectorsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const hyperVCollectorName = "migrateprojectce73collector"; - const collectorBody: HyperVCollector = { - eTag: '"00000981-0000-0300-0000-5d74cd5f0000"', - properties: { - agentProperties: { - spnDetails: { - applicationId: "827f1053-44dc-439f-b832-05416dcce12b", - audience: - "https://72f988bf-86f1-41af-91ab-2d7cd011db47/migrateprojectce73agentauthaadapp", - authority: "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - objectId: "be75098e-c0fc-4ac4-98c7-282ebbcf8370", - tenantId: "72f988bf-86f1-41af-91ab-2d7cd011db47", - }, - }, - discoverySiteId: - "/subscriptions/8c3c936a-c09b-4de3-830b-3f5f244d72e9/resourceGroups/ContosoITHyperV/providers/Microsoft.OffAzure/HyperVSites/migrateprojectce73site", - }, - }; - const options: HyperVCollectorsCreateOptionalParams = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.hyperVCollectors.create( - resourceGroupName, - projectName, - hyperVCollectorName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await hyperVCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsDeleteSample.ts b/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsDeleteSample.ts deleted file mode 100644 index fe55c9889f58..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsDeleteSample.ts +++ /dev/null @@ -1,38 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Hyper-V collector from the project. - * - * @summary Delete a Hyper-V collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Delete.json - */ -async function hyperVCollectorsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const hyperVCollectorName = "migrateprojectce73collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.hyperVCollectors.delete( - resourceGroupName, - projectName, - hyperVCollectorName, - ); - console.log(result); -} - -async function main(): Promise { - await hyperVCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsGetSample.ts deleted file mode 100644 index b9a75ebaa455..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsGetSample.ts +++ /dev/null @@ -1,38 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Hyper-V collector. - * - * @summary Get a Hyper-V collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Get.json - */ -async function hyperVCollectorsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const hyperVCollectorName = "migrateprojectce73collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.hyperVCollectors.get( - resourceGroupName, - projectName, - hyperVCollectorName, - ); - console.log(result); -} - -async function main(): Promise { - await hyperVCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsListByProjectSample.ts deleted file mode 100644 index 58384a5aeb70..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/hyperVCollectorsListByProjectSample.ts +++ /dev/null @@ -1,36 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of Hyper-V collector. - * - * @summary Get a list of Hyper-V collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_ListByProject.json - */ -async function hyperVCollectorsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.hyperVCollectors.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await hyperVCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/importCollectorsCreateSample.ts b/sdk/migrate/arm-migrate/samples-dev/importCollectorsCreateSample.ts deleted file mode 100644 index ccee2b1b636a..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/importCollectorsCreateSample.ts +++ /dev/null @@ -1,51 +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 type { ImportCollector, ImportCollectorsCreateOptionalParams } from "@azure/arm-migrate"; -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update Import collector - * - * @summary Create or Update Import collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Create.json - */ -async function importCollectorsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const importCollectorName = "importCollector2952"; - const collectorBody: ImportCollector = { - name: "importCollector2951", - type: "Microsoft.Migrate/assessmentprojects/importcollectors", - eTag: '"000064a2-0000-3300-0000-605994800000"', - id: "/subscriptions/31be0ff4-c932-4cb3-8efc-efa411d79280/resourceGroups/markusavstestrg/providers/Microsoft.Migrate/assessmentprojects/rajoshCCY9671project/importcollectors/importCollector2951", - properties: { - discoverySiteId: - "/subscriptions/31be0ff4-c932-4cb3-8efc-efa411d79280/resourcegroups/MarkusAVStestRG/providers/microsoft.offazure/importsites/rajoshCCY54cbimportSite", - }, - }; - const options: ImportCollectorsCreateOptionalParams = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.importCollectors.create( - resourceGroupName, - projectName, - importCollectorName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await importCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/importCollectorsDeleteSample.ts b/sdk/migrate/arm-migrate/samples-dev/importCollectorsDeleteSample.ts deleted file mode 100644 index 55a1b1f4d24a..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/importCollectorsDeleteSample.ts +++ /dev/null @@ -1,38 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Import collector from the project. - * - * @summary Delete a Import collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Delete.json - */ -async function importCollectorsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const importCollectorName = "importCollector2952"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.importCollectors.delete( - resourceGroupName, - projectName, - importCollectorName, - ); - console.log(result); -} - -async function main(): Promise { - await importCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/importCollectorsGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/importCollectorsGetSample.ts deleted file mode 100644 index cbaf97695800..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/importCollectorsGetSample.ts +++ /dev/null @@ -1,38 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Import collector. - * - * @summary Get a Import collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Get.json - */ -async function importCollectorsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const importCollectorName = "importCollector2951"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.importCollectors.get( - resourceGroupName, - projectName, - importCollectorName, - ); - console.log(result); -} - -async function main(): Promise { - await importCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/importCollectorsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples-dev/importCollectorsListByProjectSample.ts deleted file mode 100644 index 9b5b8250878b..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/importCollectorsListByProjectSample.ts +++ /dev/null @@ -1,36 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of Import collector. - * - * @summary Get a list of Import collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_ListByProject.json - */ -async function importCollectorsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.importCollectors.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await importCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/machinesGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/machinesGetSample.ts deleted file mode 100644 index 59b17b319eb0..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/machinesGetSample.ts +++ /dev/null @@ -1,34 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the machine with the specified name. Returns a json object of type 'machine' defined in Models section. - * - * @summary Get the machine with the specified name. Returns a json object of type 'machine' defined in Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Machines_Get.json - */ -async function machinesGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const machineName = "269ef295-a38d-4f8f-9779-77ce79088311"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.machines.get(resourceGroupName, projectName, machineName); - console.log(result); -} - -async function main(): Promise { - await machinesGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/machinesListByProjectSample.ts b/sdk/migrate/arm-migrate/samples-dev/machinesListByProjectSample.ts deleted file mode 100644 index 77a5de620c57..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/machinesListByProjectSample.ts +++ /dev/null @@ -1,36 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get data of all the machines available in the project. Returns a json array of objects of type 'machine' defined in Models section. - * - * @summary Get data of all the machines available in the project. Returns a json array of objects of type 'machine' defined in Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Machines_ListByProject.json - */ -async function machinesListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.machines.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await machinesListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/operationsListSample.ts b/sdk/migrate/arm-migrate/samples-dev/operationsListSample.ts index 33aef4e7690b..f9de8bd6b32d 100644 --- a/sdk/migrate/arm-migrate/samples-dev/operationsListSample.ts +++ b/sdk/migrate/arm-migrate/samples-dev/operationsListSample.ts @@ -1,29 +1,24 @@ -/* - * 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 { AzureMigrateV2 } from "@azure/arm-migrate"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of REST API supported by Microsoft.Migrate provider. + * This sample demonstrates how to list the operations for the provider * - * @summary Get a list of REST API supported by Microsoft.Migrate provider. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Operations_List.json + * @summary list the operations for the provider + * x-ms-original-file: 2024-03-03-preview/Operations_List_MaximumSet_Gen.json */ async function operationsList(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new MigrateClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionDeleteSample.ts b/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionDeleteSample.ts deleted file mode 100644 index 2cc6586e4be0..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionDeleteSample.ts +++ /dev/null @@ -1,41 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the private endpoint connection from the project. T. - - * - * @summary Delete the private endpoint connection from the project. T. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Delete.json - */ -async function privateEndpointConnectionsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const privateEndpointConnectionName = - "custestpece80project3980pe.7e35576b-3df4-478e-9759-f64351cf4f43"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.delete( - resourceGroupName, - projectName, - privateEndpointConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await privateEndpointConnectionsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionGetSample.ts deleted file mode 100644 index 332cd58f4817..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionGetSample.ts +++ /dev/null @@ -1,39 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get information related to a specific private endpoint connection in the project. Returns a json object of type 'privateEndpointConnections' as specified in the models section. - * - * @summary Get information related to a specific private endpoint connection in the project. Returns a json object of type 'privateEndpointConnections' as specified in the models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Get.json - */ -async function privateEndpointConnectionsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const privateEndpointConnectionName = - "custestpece80project3980pe.7e35576b-3df4-478e-9759-f64351cf4f43"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.get( - resourceGroupName, - projectName, - privateEndpointConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await privateEndpointConnectionsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionListByProjectSample.ts b/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionListByProjectSample.ts deleted file mode 100644 index 8d51e8513b1e..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionListByProjectSample.ts +++ /dev/null @@ -1,36 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all private endpoint connections in the project. Returns a json array of objects of type 'privateEndpointConnections' as specified in the Models section. - * - * @summary Get all private endpoint connections in the project. Returns a json array of objects of type 'privateEndpointConnections' as specified in the Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_ListByProject.json - */ -async function privateEndpointConnectionsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.listByProject( - resourceGroupName, - projectName, - ); - console.log(result); -} - -async function main(): Promise { - await privateEndpointConnectionsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionUpdateSample.ts b/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionUpdateSample.ts deleted file mode 100644 index 62ce25b636a0..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/privateEndpointConnectionUpdateSample.ts +++ /dev/null @@ -1,57 +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 type { - PrivateEndpointConnection, - PrivateEndpointConnectionUpdateOptionalParams, -} from "@azure/arm-migrate"; -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update a specific private endpoint connection in the project. - * - * @summary Update a specific private endpoint connection in the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Create.json - */ -async function privateEndpointConnectionsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const privateEndpointConnectionName = - "custestpece80project3980pe.7e35576b-3df4-478e-9759-f64351cf4f43"; - const privateEndpointConnectionBody: PrivateEndpointConnection = { - eTag: '"00009300-0000-0300-0000-602b967b0000"', - properties: { - privateLinkServiceConnectionState: { - description: undefined, - actionsRequired: "", - status: "Approved", - }, - }, - }; - const options: PrivateEndpointConnectionUpdateOptionalParams = { - privateEndpointConnectionBody, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.update( - resourceGroupName, - projectName, - privateEndpointConnectionName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await privateEndpointConnectionsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/privateLinkResourceGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/privateLinkResourceGetSample.ts deleted file mode 100644 index eadc1c82db0c..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/privateLinkResourceGetSample.ts +++ /dev/null @@ -1,38 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get information related to a specific private Link Resource in the project. Returns a json object of type 'privateLinkResources' as specified in the models section. - * - * @summary Get information related to a specific private Link Resource in the project. Returns a json object of type 'privateLinkResources' as specified in the models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateLinkResources_Get.json - */ -async function privateLinkResourcesGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "madhavicus"; - const projectName = "custestpece80project"; - const privateLinkResourceName = "Default"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateLinkResourceOperations.get( - resourceGroupName, - projectName, - privateLinkResourceName, - ); - console.log(result); -} - -async function main(): Promise { - await privateLinkResourcesGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/privateLinkResourceListByProjectSample.ts b/sdk/migrate/arm-migrate/samples-dev/privateLinkResourceListByProjectSample.ts deleted file mode 100644 index ff86dc728155..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/privateLinkResourceListByProjectSample.ts +++ /dev/null @@ -1,36 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all private link resources created in the project. Returns a json array of objects of type 'privateLinkResources' as specified in the Models section. - * - * @summary Get all private link resources created in the project. Returns a json array of objects of type 'privateLinkResources' as specified in the Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateLinkResources_ListByProject.json - */ -async function privateLinkResourcesListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "madhavicus"; - const projectName = "custestpece80project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateLinkResourceOperations.listByProject( - resourceGroupName, - projectName, - ); - console.log(result); -} - -async function main(): Promise { - await privateLinkResourcesListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/projectsAssessmentOptionsListSample.ts b/sdk/migrate/arm-migrate/samples-dev/projectsAssessmentOptionsListSample.ts deleted file mode 100644 index 4630df134698..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/projectsAssessmentOptionsListSample.ts +++ /dev/null @@ -1,39 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of all available options for the properties of an assessment on a project. - * - * @summary Gets list of all available options for the properties of an assessment on a project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessmentOptions_List.json - */ -async function assessmentOptionsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.projects.listAssessmentOptionsList( - resourceGroupName, - projectName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await assessmentOptionsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/projectsAssessmentOptionsSample.ts b/sdk/migrate/arm-migrate/samples-dev/projectsAssessmentOptionsSample.ts deleted file mode 100644 index e4bd1a424f23..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/projectsAssessmentOptionsSample.ts +++ /dev/null @@ -1,38 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all available options for the properties of an assessment on a project. - * - * @summary Get all available options for the properties of an assessment on a project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessmentOptions_Get.json - */ -async function assessmentOptionsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const assessmentOptionsName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.assessmentOptions( - resourceGroupName, - projectName, - assessmentOptionsName, - ); - console.log(result); -} - -async function main(): Promise { - await assessmentOptionsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/projectsCreateSample.ts b/sdk/migrate/arm-migrate/samples-dev/projectsCreateSample.ts deleted file mode 100644 index a3968dd9efb9..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/projectsCreateSample.ts +++ /dev/null @@ -1,47 +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 type { Project, ProjectsCreateOptionalParams } from "@azure/arm-migrate"; -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a project with specified name. If a project already exists, update it. - * - * @summary Create a project with specified name. If a project already exists, update it. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Create.json - */ -async function projectsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abGoyalProject2"; - const project: Project = { - eTag: "", - location: "West Europe", - properties: { - assessmentSolutionId: - "/subscriptions/6393a73f-8d55-47ef-b6dd-179b3e0c7910/resourcegroups/abgoyal-westeurope/providers/microsoft.migrate/migrateprojects/abgoyalweselfhost/Solutions/Servers-Assessment-ServerAssessment", - customerWorkspaceId: undefined, - customerWorkspaceLocation: undefined, - projectStatus: "Active", - }, - tags: {}, - }; - const options: ProjectsCreateOptionalParams = { project }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.create(resourceGroupName, projectName, options); - console.log(result); -} - -async function main(): Promise { - await projectsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/projectsDeleteSample.ts b/sdk/migrate/arm-migrate/samples-dev/projectsDeleteSample.ts deleted file mode 100644 index cce69eb4a5de..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/projectsDeleteSample.ts +++ /dev/null @@ -1,33 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the project. Deleting non-existent project is a no-operation. - * - * @summary Delete the project. Deleting non-existent project is a no-operation. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Delete.json - */ -async function projectsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abGoyalProject2"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.delete(resourceGroupName, projectName); - console.log(result); -} - -async function main(): Promise { - await projectsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/projectsGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/projectsGetSample.ts deleted file mode 100644 index a23200e8e0fe..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/projectsGetSample.ts +++ /dev/null @@ -1,33 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the project with the specified name. - * - * @summary Get the project with the specified name. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Get.json - */ -async function projectsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.get(resourceGroupName, projectName); - console.log(result); -} - -async function main(): Promise { - await projectsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/projectsListBySubscriptionSample.ts b/sdk/migrate/arm-migrate/samples-dev/projectsListBySubscriptionSample.ts deleted file mode 100644 index 8d55952a6d3a..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/projectsListBySubscriptionSample.ts +++ /dev/null @@ -1,34 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all the projects in the subscription. - * - * @summary Get all the projects in the subscription. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ProjectsInSubscription_List.json - */ -async function projectsList(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.projects.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await projectsList(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/projectsListSample.ts b/sdk/migrate/arm-migrate/samples-dev/projectsListSample.ts deleted file mode 100644 index 1d031bbd1458..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/projectsListSample.ts +++ /dev/null @@ -1,35 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all the projects in the resource group. - * - * @summary Get all the projects in the resource group. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_List.json - */ -async function projectsList(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.projects.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await projectsList(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/projectsUpdateSample.ts b/sdk/migrate/arm-migrate/samples-dev/projectsUpdateSample.ts deleted file mode 100644 index 05f6f9a38f7c..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/projectsUpdateSample.ts +++ /dev/null @@ -1,47 +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 type { Project, ProjectsUpdateOptionalParams } from "@azure/arm-migrate"; -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update a project with specified name. Supports partial updates, for example only tags can be provided. - * - * @summary Update a project with specified name. Supports partial updates, for example only tags can be provided. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Update.json - */ -async function projectsUpdate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abGoyalProject2"; - const project: Project = { - eTag: "", - location: "West Europe", - properties: { - assessmentSolutionId: - "/subscriptions/6393a73f-8d55-47ef-b6dd-179b3e0c7910/resourcegroups/abgoyal-westeurope/providers/microsoft.migrate/migrateprojects/abgoyalweselfhost/Solutions/Servers-Assessment-ServerAssessment", - customerWorkspaceId: undefined, - customerWorkspaceLocation: undefined, - projectStatus: "Active", - }, - tags: {}, - }; - const options: ProjectsUpdateOptionalParams = { project }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.update(resourceGroupName, projectName, options); - console.log(result); -} - -async function main(): Promise { - await projectsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/serverCollectorsCreateSample.ts b/sdk/migrate/arm-migrate/samples-dev/serverCollectorsCreateSample.ts deleted file mode 100644 index 6e1c05c88a66..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/serverCollectorsCreateSample.ts +++ /dev/null @@ -1,57 +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 type { ServerCollector, ServerCollectorsCreateOptionalParams } from "@azure/arm-migrate"; -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update Server collector - * - * @summary Create or Update Server collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Create.json - */ -async function serverCollectorsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const serverCollectorName = "app23df4collector"; - const collectorBody: ServerCollector = { - eTag: '"00000606-0000-0d00-0000-605999bf0000"', - properties: { - agentProperties: { - spnDetails: { - applicationId: "ad9f701a-cc08-4421-b51f-b5762d58e9ba", - audience: "https://72f988bf-86f1-41af-91ab-2d7cd011db47/app23df4authandaccessaadapp", - authority: "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - objectId: "b4975e42-9248-4a36-b99f-37eca377ea00", - tenantId: "72f988bf-86f1-41af-91ab-2d7cd011db47", - }, - }, - discoverySiteId: - "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/pajindTest/providers/Microsoft.OffAzure/ServerSites/app21141site", - }, - }; - const options: ServerCollectorsCreateOptionalParams = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.serverCollectors.create( - resourceGroupName, - projectName, - serverCollectorName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await serverCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/serverCollectorsDeleteSample.ts b/sdk/migrate/arm-migrate/samples-dev/serverCollectorsDeleteSample.ts deleted file mode 100644 index 1550bf7e83cb..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/serverCollectorsDeleteSample.ts +++ /dev/null @@ -1,38 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Server collector from the project. - * - * @summary Delete a Server collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Delete.json - */ -async function serverCollectorsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const serverCollectorName = "app23df4collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.serverCollectors.delete( - resourceGroupName, - projectName, - serverCollectorName, - ); - console.log(result); -} - -async function main(): Promise { - await serverCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/serverCollectorsGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/serverCollectorsGetSample.ts deleted file mode 100644 index 40ca988143a0..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/serverCollectorsGetSample.ts +++ /dev/null @@ -1,38 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Server collector. - * - * @summary Get a Server collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Get.json - */ -async function serverCollectorsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const serverCollectorName = "app23df4collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.serverCollectors.get( - resourceGroupName, - projectName, - serverCollectorName, - ); - console.log(result); -} - -async function main(): Promise { - await serverCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/serverCollectorsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples-dev/serverCollectorsListByProjectSample.ts deleted file mode 100644 index 940396ed1c05..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/serverCollectorsListByProjectSample.ts +++ /dev/null @@ -1,36 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of Server collector. - * - * @summary Get a list of Server collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_ListByProject.json - */ -async function serverCollectorsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.serverCollectors.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await serverCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsCreateSample.ts b/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsCreateSample.ts deleted file mode 100644 index f01cc97982c3..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsCreateSample.ts +++ /dev/null @@ -1,57 +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 type { VMwareCollector, VMwareCollectorsCreateOptionalParams } from "@azure/arm-migrate"; -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update VMware collector - * - * @summary Create or Update VMware collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Create.json - */ -async function vMwareCollectorsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const vmWareCollectorName = "PortalvCenterbc2fcollector"; - const collectorBody: VMwareCollector = { - eTag: '"01003d32-0000-0d00-0000-5d74d2e50000"', - properties: { - agentProperties: { - spnDetails: { - applicationId: "fc717575-8173-4b21-92a5-658b655e613e", - audience: "https://72f988bf-86f1-41af-91ab-2d7cd011db47/PortalvCenterbc2fagentauthaadapp", - authority: "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - objectId: "29d94f38-db94-4980-aec0-0cfd55ab1cd0", - tenantId: "72f988bf-86f1-41af-91ab-2d7cd011db47", - }, - }, - discoverySiteId: - "/subscriptions/6393a73f-8d55-47ef-b6dd-179b3e0c7910/resourceGroups/abgoyal-westEurope/providers/Microsoft.OffAzure/VMwareSites/PortalvCenterbc2fsite", - }, - }; - const options: VMwareCollectorsCreateOptionalParams = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.vMwareCollectors.create( - resourceGroupName, - projectName, - vmWareCollectorName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await vMwareCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsDeleteSample.ts b/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsDeleteSample.ts deleted file mode 100644 index 7595d8e9d2d1..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsDeleteSample.ts +++ /dev/null @@ -1,38 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a VMware collector from the project. - * - * @summary Delete a VMware collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Delete.json - */ -async function vMwareCollectorsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const vmWareCollectorName = "PortalvCenterbc2fcollector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.vMwareCollectors.delete( - resourceGroupName, - projectName, - vmWareCollectorName, - ); - console.log(result); -} - -async function main(): Promise { - await vMwareCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsGetSample.ts b/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsGetSample.ts deleted file mode 100644 index cfef160441ff..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsGetSample.ts +++ /dev/null @@ -1,38 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a VMware collector. - * - * @summary Get a VMware collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Get.json - */ -async function vMwareCollectorsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const vmWareCollectorName = "PortalvCenterbc2fcollector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.vMwareCollectors.get( - resourceGroupName, - projectName, - vmWareCollectorName, - ); - console.log(result); -} - -async function main(): Promise { - await vMwareCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsListByProjectSample.ts deleted file mode 100644 index 70f128260bd5..000000000000 --- a/sdk/migrate/arm-migrate/samples-dev/vMwareCollectorsListByProjectSample.ts +++ /dev/null @@ -1,36 +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 { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of VMware collector. - * - * @summary Get a list of VMware collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_ListByProject.json - */ -async function vMwareCollectorsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.vMwareCollectors.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await vMwareCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/README.md b/sdk/migrate/arm-migrate/samples/v2/javascript/README.md index 6d4469794591..3d9ff144b7c4 100644 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/README.md +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/README.md @@ -1,55 +1,21 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [assessedMachinesGetSample.js][assessedmachinesgetsample] | Get an assessed machine with its size & cost estimate that was evaluated in the specified assessment. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessedMachines_Get.json | -| [assessedMachinesListByAssessmentSample.js][assessedmachineslistbyassessmentsample] | Get list of machines that assessed as part of the specified assessment. Returns a json array of objects of type 'assessedMachine' as specified in the Models section. //@@TS-MAGIC-NEWLINE@@ Whenever an assessment is created or updated, it goes under computation. During this phase, the 'status' field of Assessment object reports 'Computing'. During the period when the assessment is under computation, the list of assessed machines is empty and no assessed machines are returned by this call. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessedMachines_ListByAssessment.json | -| [assessmentsCreateSample.js][assessmentscreatesample] | Create a new assessment with the given name and the specified settings. Since name of an assessment in a project is a unique identifier, if an assessment with the name provided already exists, then the existing assessment is updated. //@@TS-MAGIC-NEWLINE@@ Any PUT operation, resulting in either create or update on an assessment, will cause the assessment to go in a "InProgress" state. This will be indicated by the field 'computationState' on the Assessment object. During this time no other PUT operation will be allowed on that assessment object, nor will a Delete operation. Once the computation for the assessment is complete, the field 'computationState' will be updated to 'Ready', and then other PUT or DELETE operations can happen on the assessment. //@@TS-MAGIC-NEWLINE@@ When assessment is under computation, any PUT will lead to a 400 - Bad Request error. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Create.json | -| [assessmentsDeleteSample.js][assessmentsdeletesample] | Delete an assessment from the project. The machines remain in the assessment. Deleting a non-existent assessment results in a no-operation. //@@TS-MAGIC-NEWLINE@@ When an assessment is under computation, as indicated by the 'computationState' field, it cannot be deleted. Any such attempt will return a 400 - Bad Request. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Delete.json | -| [assessmentsGetReportDownloadUrlSample.js][assessmentsgetreportdownloadurlsample] | Get the URL for downloading the assessment in a report format. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_GetReportDownloadUrl.json | -| [assessmentsGetSample.js][assessmentsgetsample] | Get an existing assessment with the specified name. Returns a json object of type 'assessment' as specified in Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Get.json | -| [assessmentsListByGroupSample.js][assessmentslistbygroupsample] | Get all assessments created for the specified group. //@@TS-MAGIC-NEWLINE@@ Returns a json array of objects of type 'assessment' as specified in Models section. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_ListByGroup.json | -| [assessmentsListByProjectSample.js][assessmentslistbyprojectsample] | Get all assessments created in the project. //@@TS-MAGIC-NEWLINE@@ Returns a json array of objects of type 'assessment' as specified in Models section. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_ListByProject.json | -| [groupsCreateSample.js][groupscreatesample] | Create a new group by sending a json object of type 'group' as given in Models section as part of the Request Body. The group name in a project is unique. //@@TS-MAGIC-NEWLINE@@ This operation is Idempotent. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Create.json | -| [groupsDeleteSample.js][groupsdeletesample] | Delete the group from the project. The machines remain in the project. Deleting a non-existent group results in a no-operation. //@@TS-MAGIC-NEWLINE@@ A group is an aggregation mechanism for machines in a project. Therefore, deleting group does not delete machines in it. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Delete.json | -| [groupsGetSample.js][groupsgetsample] | Get information related to a specific group in the project. Returns a json object of type 'group' as specified in the models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Get.json | -| [groupsListByProjectSample.js][groupslistbyprojectsample] | Get all groups created in the project. Returns a json array of objects of type 'group' as specified in the Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_ListByProject.json | -| [groupsUpdateMachinesSample.js][groupsupdatemachinessample] | Update machines in group by adding or removing machines. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_UpdateMachines.json | -| [hyperVCollectorsCreateSample.js][hypervcollectorscreatesample] | Create or Update Hyper-V collector x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Create.json | -| [hyperVCollectorsDeleteSample.js][hypervcollectorsdeletesample] | Delete a Hyper-V collector from the project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Delete.json | -| [hyperVCollectorsGetSample.js][hypervcollectorsgetsample] | Get a Hyper-V collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Get.json | -| [hyperVCollectorsListByProjectSample.js][hypervcollectorslistbyprojectsample] | Get a list of Hyper-V collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_ListByProject.json | -| [importCollectorsCreateSample.js][importcollectorscreatesample] | Create or Update Import collector x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Create.json | -| [importCollectorsDeleteSample.js][importcollectorsdeletesample] | Delete a Import collector from the project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Delete.json | -| [importCollectorsGetSample.js][importcollectorsgetsample] | Get a Import collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Get.json | -| [importCollectorsListByProjectSample.js][importcollectorslistbyprojectsample] | Get a list of Import collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_ListByProject.json | -| [machinesGetSample.js][machinesgetsample] | Get the machine with the specified name. Returns a json object of type 'machine' defined in Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Machines_Get.json | -| [machinesListByProjectSample.js][machineslistbyprojectsample] | Get data of all the machines available in the project. Returns a json array of objects of type 'machine' defined in Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Machines_ListByProject.json | -| [operationsListSample.js][operationslistsample] | Get a list of REST API supported by Microsoft.Migrate provider. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Operations_List.json | -| [privateEndpointConnectionDeleteSample.js][privateendpointconnectiondeletesample] | Delete the private endpoint connection from the project. T. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Delete.json | -| [privateEndpointConnectionGetSample.js][privateendpointconnectiongetsample] | Get information related to a specific private endpoint connection in the project. Returns a json object of type 'privateEndpointConnections' as specified in the models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Get.json | -| [privateEndpointConnectionListByProjectSample.js][privateendpointconnectionlistbyprojectsample] | Get all private endpoint connections in the project. Returns a json array of objects of type 'privateEndpointConnections' as specified in the Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_ListByProject.json | -| [privateEndpointConnectionUpdateSample.js][privateendpointconnectionupdatesample] | Update a specific private endpoint connection in the project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Create.json | -| [privateLinkResourceGetSample.js][privatelinkresourcegetsample] | Get information related to a specific private Link Resource in the project. Returns a json object of type 'privateLinkResources' as specified in the models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateLinkResources_Get.json | -| [privateLinkResourceListByProjectSample.js][privatelinkresourcelistbyprojectsample] | Get all private link resources created in the project. Returns a json array of objects of type 'privateLinkResources' as specified in the Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateLinkResources_ListByProject.json | -| [projectsAssessmentOptionsListSample.js][projectsassessmentoptionslistsample] | Gets list of all available options for the properties of an assessment on a project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessmentOptions_List.json | -| [projectsAssessmentOptionsSample.js][projectsassessmentoptionssample] | Get all available options for the properties of an assessment on a project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessmentOptions_Get.json | -| [projectsCreateSample.js][projectscreatesample] | Create a project with specified name. If a project already exists, update it. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Create.json | -| [projectsDeleteSample.js][projectsdeletesample] | Delete the project. Deleting non-existent project is a no-operation. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Delete.json | -| [projectsGetSample.js][projectsgetsample] | Get the project with the specified name. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Get.json | -| [projectsListBySubscriptionSample.js][projectslistbysubscriptionsample] | Get all the projects in the subscription. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ProjectsInSubscription_List.json | -| [projectsListSample.js][projectslistsample] | Get all the projects in the resource group. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_List.json | -| [projectsUpdateSample.js][projectsupdatesample] | Update a project with specified name. Supports partial updates, for example only tags can be provided. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Update.json | -| [serverCollectorsCreateSample.js][servercollectorscreatesample] | Create or Update Server collector x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Create.json | -| [serverCollectorsDeleteSample.js][servercollectorsdeletesample] | Delete a Server collector from the project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Delete.json | -| [serverCollectorsGetSample.js][servercollectorsgetsample] | Get a Server collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Get.json | -| [serverCollectorsListByProjectSample.js][servercollectorslistbyprojectsample] | Get a list of Server collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_ListByProject.json | -| [vMwareCollectorsCreateSample.js][vmwarecollectorscreatesample] | Create or Update VMware collector x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Create.json | -| [vMwareCollectorsDeleteSample.js][vmwarecollectorsdeletesample] | Delete a VMware collector from the project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Delete.json | -| [vMwareCollectorsGetSample.js][vmwarecollectorsgetsample] | Get a VMware collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Get.json | -| [vMwareCollectorsListByProjectSample.js][vmwarecollectorslistbyprojectsample] | Get a list of VMware collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_ListByProject.json | +# @azure/arm-migrate client library samples for JavaScript + +These sample programs show how to use the JavaScript client libraries for @azure/arm-migrate in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [avsAssessedMachinesV2OperationsGetSample.js][avsassessedmachinesv2operationsgetsample] | get a AvsAssessedMachineV2 x-ms-original-file: 2024-03-03-preview/AvsAssessedMachinesV2Operations_Get_MaximumSet_Gen.json | +| [avsAssessedMachinesV2OperationsListByParentSample.js][avsassessedmachinesv2operationslistbyparentsample] | list AvsAssessedMachineV2 resources by AvsAssessmentV2 x-ms-original-file: 2024-03-03-preview/AvsAssessedMachinesV2Operations_ListByParent_MaximumSet_Gen.json | +| [avsAssessmentV2SummaryOperationsGetSample.js][avsassessmentv2summaryoperationsgetsample] | get a AvsAssessmentV2Summary x-ms-original-file: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json | +| [avsAssessmentV2SummaryOperationsListByParentSample.js][avsassessmentv2summaryoperationslistbyparentsample] | list AvsAssessmentV2Summary resources by AvsAssessmentV2 x-ms-original-file: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_ListByParent_MaximumSet_Gen.json | +| [avsAssessmentsV2OperationsCreateSample.js][avsassessmentsv2operationscreatesample] | create a AvsAssessmentV2 x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Create_MaximumSet_Gen.json | +| [avsAssessmentsV2OperationsDeleteSample.js][avsassessmentsv2operationsdeletesample] | delete a AvsAssessmentV2 x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Delete_MaximumSet_Gen.json | +| [avsAssessmentsV2OperationsDownloadUrlSample.js][avsassessmentsv2operationsdownloadurlsample] | get the URL for downloading the assessment in a report format. x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_DownloadUrl_MaximumSet_Gen.json | +| [avsAssessmentsV2OperationsGetSample.js][avsassessmentsv2operationsgetsample] | get a AvsAssessmentV2 x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Get_MaximumSet_Gen.json | +| [avsAssessmentsV2OperationsListByParentSample.js][avsassessmentsv2operationslistbyparentsample] | list AvsAssessmentV2 resources by AssessmentProject x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_ListByParent_MaximumSet_Gen.json | +| [avsGraphAssessmentOptionsOperationsGetSample.js][avsgraphassessmentoptionsoperationsgetsample] | get a AvsGraphAssessmentOptions x-ms-original-file: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json | +| [avsGraphAssessmentOptionsOperationsListByParentSample.js][avsgraphassessmentoptionsoperationslistbyparentsample] | list AvsGraphAssessmentOptions resources by AssessmentProject x-ms-original-file: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_ListByParent_MaximumSet_Gen.json | +| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-03-03-preview/Operations_List_MaximumSet_Gen.json | ## Prerequisites @@ -76,65 +42,31 @@ npm install 3. Run whichever samples you like (note that some samples may require additional setup, see the table above): ```bash -node assessedMachinesGetSample.js +node avsAssessedMachinesV2OperationsGetSample.js ``` Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -npx dev-tool run vendored cross-env MIGRATE_SUBSCRIPTION_ID="" MIGRATE_RESOURCE_GROUP="" node assessedMachinesGetSample.js +npx dev-tool run vendored cross-env node avsAssessedMachinesV2OperationsGetSample.js ``` ## Next Steps Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. -[assessedmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/assessedMachinesGetSample.js -[assessedmachineslistbyassessmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/assessedMachinesListByAssessmentSample.js -[assessmentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsCreateSample.js -[assessmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsDeleteSample.js -[assessmentsgetreportdownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsGetReportDownloadUrlSample.js -[assessmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsGetSample.js -[assessmentslistbygroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsListByGroupSample.js -[assessmentslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsListByProjectSample.js -[groupscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/groupsCreateSample.js -[groupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/groupsDeleteSample.js -[groupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/groupsGetSample.js -[groupslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/groupsListByProjectSample.js -[groupsupdatemachinessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/groupsUpdateMachinesSample.js -[hypervcollectorscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsCreateSample.js -[hypervcollectorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsDeleteSample.js -[hypervcollectorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsGetSample.js -[hypervcollectorslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsListByProjectSample.js -[importcollectorscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsCreateSample.js -[importcollectorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsDeleteSample.js -[importcollectorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsGetSample.js -[importcollectorslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsListByProjectSample.js -[machinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/machinesGetSample.js -[machineslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/machinesListByProjectSample.js +[avsassessedmachinesv2operationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessedMachinesV2OperationsGetSample.js +[avsassessedmachinesv2operationslistbyparentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessedMachinesV2OperationsListByParentSample.js +[avsassessmentv2summaryoperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentV2SummaryOperationsGetSample.js +[avsassessmentv2summaryoperationslistbyparentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentV2SummaryOperationsListByParentSample.js +[avsassessmentsv2operationscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsCreateSample.js +[avsassessmentsv2operationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsDeleteSample.js +[avsassessmentsv2operationsdownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsDownloadUrlSample.js +[avsassessmentsv2operationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsGetSample.js +[avsassessmentsv2operationslistbyparentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsListByParentSample.js +[avsgraphassessmentoptionsoperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/avsGraphAssessmentOptionsOperationsGetSample.js +[avsgraphassessmentoptionsoperationslistbyparentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/avsGraphAssessmentOptionsOperationsListByParentSample.js [operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/operationsListSample.js -[privateendpointconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionDeleteSample.js -[privateendpointconnectiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionGetSample.js -[privateendpointconnectionlistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionListByProjectSample.js -[privateendpointconnectionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionUpdateSample.js -[privatelinkresourcegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/privateLinkResourceGetSample.js -[privatelinkresourcelistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/privateLinkResourceListByProjectSample.js -[projectsassessmentoptionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/projectsAssessmentOptionsListSample.js -[projectsassessmentoptionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/projectsAssessmentOptionsSample.js -[projectscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/projectsCreateSample.js -[projectsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/projectsDeleteSample.js -[projectsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/projectsGetSample.js -[projectslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/projectsListBySubscriptionSample.js -[projectslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/projectsListSample.js -[projectsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/projectsUpdateSample.js -[servercollectorscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsCreateSample.js -[servercollectorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsDeleteSample.js -[servercollectorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsGetSample.js -[servercollectorslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsListByProjectSample.js -[vmwarecollectorscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsCreateSample.js -[vmwarecollectorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsDeleteSample.js -[vmwarecollectorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsGetSample.js -[vmwarecollectorslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsListByProjectSample.js [apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-migrate?view=azure-node-preview [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/migrate/arm-migrate/README.md diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/assessedMachinesGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/assessedMachinesGetSample.js deleted file mode 100644 index 3021b5762cd0..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/assessedMachinesGetSample.js +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get an assessed machine with its size & cost estimate that was evaluated in the specified assessment. - * - * @summary Get an assessed machine with its size & cost estimate that was evaluated in the specified assessment. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessedMachines_Get.json - */ -async function assessedMachinesGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const assessedMachineName = "f57fe432-3bd2-486a-a83a-6f4d99f1a952"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessedMachines.get( - resourceGroupName, - projectName, - groupName, - assessmentName, - assessedMachineName - ); - console.log(result); -} - -async function main() { - assessedMachinesGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/assessedMachinesListByAssessmentSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/assessedMachinesListByAssessmentSample.js deleted file mode 100644 index 9eeea63db70a..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/assessedMachinesListByAssessmentSample.js +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get list of machines that assessed as part of the specified assessment. Returns a json array of objects of type 'assessedMachine' as specified in the Models section. - -Whenever an assessment is created or updated, it goes under computation. During this phase, the 'status' field of Assessment object reports 'Computing'. -During the period when the assessment is under computation, the list of assessed machines is empty and no assessed machines are returned by this call. - - * - * @summary Get list of machines that assessed as part of the specified assessment. Returns a json array of objects of type 'assessedMachine' as specified in the Models section. - -Whenever an assessment is created or updated, it goes under computation. During this phase, the 'status' field of Assessment object reports 'Computing'. -During the period when the assessment is under computation, the list of assessed machines is empty and no assessed machines are returned by this call. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessedMachines_ListByAssessment.json - */ -async function assessedMachinesListByAssessment() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.assessedMachines.listByAssessment( - resourceGroupName, - projectName, - groupName, - assessmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - assessedMachinesListByAssessment(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsCreateSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsCreateSample.js deleted file mode 100644 index 948ab51d4485..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsCreateSample.js +++ /dev/null @@ -1,90 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new assessment with the given name and the specified settings. Since name of an assessment in a project is a unique identifier, if an assessment with the name provided already exists, then the existing assessment is updated. - -Any PUT operation, resulting in either create or update on an assessment, will cause the assessment to go in a "InProgress" state. This will be indicated by the field 'computationState' on the Assessment object. During this time no other PUT operation will be allowed on that assessment object, nor will a Delete operation. Once the computation for the assessment is complete, the field 'computationState' will be updated to 'Ready', and then other PUT or DELETE operations can happen on the assessment. - -When assessment is under computation, any PUT will lead to a 400 - Bad Request error. - - * - * @summary Create a new assessment with the given name and the specified settings. Since name of an assessment in a project is a unique identifier, if an assessment with the name provided already exists, then the existing assessment is updated. - -Any PUT operation, resulting in either create or update on an assessment, will cause the assessment to go in a "InProgress" state. This will be indicated by the field 'computationState' on the Assessment object. During this time no other PUT operation will be allowed on that assessment object, nor will a Delete operation. Once the computation for the assessment is complete, the field 'computationState' will be updated to 'Ready', and then other PUT or DELETE operations can happen on the assessment. - -When assessment is under computation, any PUT will lead to a 400 - Bad Request error. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Create.json - */ -async function assessmentsCreate() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Group2"; - const assessmentName = "assessment_5_14_2019_16_48_47"; - const assessment = { - eTag: '"1e000c2c-0000-0d00-0000-5cdaa4190000"', - properties: { - azureDiskType: "StandardOrPremium", - azureHybridUseBenefit: "Yes", - azureLocation: "NorthEurope", - azureOfferCode: "MSAZR0003P", - azurePricingTier: "Standard", - azureStorageRedundancy: "LocallyRedundant", - azureVmFamilies: [ - "Dv2_series", - "F_series", - "Dv3_series", - "DS_series", - "DSv2_series", - "Fs_series", - "Dsv3_series", - "Ev3_series", - "Esv3_series", - "D_series", - "M_series", - "Fsv2_series", - "H_series", - ], - currency: "USD", - discountPercentage: 100, - percentile: "Percentile95", - reservedInstance: "RI3Year", - scalingFactor: 1, - sizingCriterion: "PerformanceBased", - stage: "InProgress", - timeRange: "Day", - vmUptime: { daysPerMonth: 31, hoursPerDay: 24 }, - }, - }; - const options = { assessment }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.create( - resourceGroupName, - projectName, - groupName, - assessmentName, - options - ); - console.log(result); -} - -async function main() { - assessmentsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsDeleteSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsDeleteSample.js deleted file mode 100644 index 206725b1b68a..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsDeleteSample.js +++ /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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete an assessment from the project. The machines remain in the assessment. Deleting a non-existent assessment results in a no-operation. - -When an assessment is under computation, as indicated by the 'computationState' field, it cannot be deleted. Any such attempt will return a 400 - Bad Request. - - * - * @summary Delete an assessment from the project. The machines remain in the assessment. Deleting a non-existent assessment results in a no-operation. - -When an assessment is under computation, as indicated by the 'computationState' field, it cannot be deleted. Any such attempt will return a 400 - Bad Request. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Delete.json - */ -async function assessmentsDelete() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.delete( - resourceGroupName, - projectName, - groupName, - assessmentName - ); - console.log(result); -} - -async function main() { - assessmentsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsGetReportDownloadUrlSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsGetReportDownloadUrlSample.js deleted file mode 100644 index 0a4c365a8122..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsGetReportDownloadUrlSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the URL for downloading the assessment in a report format. - * - * @summary Get the URL for downloading the assessment in a report format. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_GetReportDownloadUrl.json - */ -async function assessmentsGetReportDownloadUrl() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.getReportDownloadUrl( - resourceGroupName, - projectName, - groupName, - assessmentName - ); - console.log(result); -} - -async function main() { - assessmentsGetReportDownloadUrl(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsGetSample.js deleted file mode 100644 index de88660bfefe..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsGetSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get an existing assessment with the specified name. Returns a json object of type 'assessment' as specified in Models section. - * - * @summary Get an existing assessment with the specified name. Returns a json object of type 'assessment' as specified in Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Get.json - */ -async function assessmentsGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.get( - resourceGroupName, - projectName, - groupName, - assessmentName - ); - console.log(result); -} - -async function main() { - assessmentsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsListByGroupSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsListByGroupSample.js deleted file mode 100644 index 8b21d9ed3be9..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsListByGroupSample.js +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all assessments created for the specified group. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * - * @summary Get all assessments created for the specified group. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_ListByGroup.json - */ -async function assessmentsListByGroup() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.assessments.listByGroup( - resourceGroupName, - projectName, - groupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - assessmentsListByGroup(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsListByProjectSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsListByProjectSample.js deleted file mode 100644 index 8efab9f30b78..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/assessmentsListByProjectSample.js +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all assessments created in the project. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * - * @summary Get all assessments created in the project. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_ListByProject.json - */ -async function assessmentsListByProject() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.assessments.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - assessmentsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessedMachinesV2OperationsGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessedMachinesV2OperationsGetSample.js new file mode 100644 index 000000000000..ff82301677c7 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessedMachinesV2OperationsGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { MigrateClient } = require("@azure/arm-migrate"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a AvsAssessedMachineV2 + * + * @summary get a AvsAssessedMachineV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessedMachinesV2Operations_Get_MaximumSet_Gen.json + */ +async function avsAssessedMachinesV2OperationsGetMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessedMachinesV2Operations.get( + "rgavsAssessments", + "contosoProject", + "assessmentName", + "machine1", + ); + console.log(result); +} + +async function main() { + await avsAssessedMachinesV2OperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessedMachinesV2OperationsListByParentSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessedMachinesV2OperationsListByParentSample.js new file mode 100644 index 000000000000..f70395234357 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessedMachinesV2OperationsListByParentSample.js @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { MigrateClient } = require("@azure/arm-migrate"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list AvsAssessedMachineV2 resources by AvsAssessmentV2 + * + * @summary list AvsAssessedMachineV2 resources by AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessedMachinesV2Operations_ListByParent_MaximumSet_Gen.json + */ +async function avsAssessedMachinesV2OperationsListByParentMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsAssessedMachinesV2Operations.listByParent( + "rgavsAssessments", + "contosoProject", + "assessmentName", + { + filter: "ozyotnnfedxreohjtgfqxmefn", + pageSize: 26, + continuationToken: "vhdrqptyyromhgz", + totalRecordCount: 7, + }, + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await avsAssessedMachinesV2OperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentV2SummaryOperationsGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentV2SummaryOperationsGetSample.js new file mode 100644 index 000000000000..0521e1f7b555 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentV2SummaryOperationsGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { MigrateClient } = require("@azure/arm-migrate"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a AvsAssessmentV2Summary + * + * @summary get a AvsAssessmentV2Summary + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json + */ +async function avsAssessmentV2SummaryOperationsGetMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentV2SummaryOperations.get( + "rgavsAssessments", + "contosoProject", + "assessmentName", + "PaaSPreferred", + ); + console.log(result); +} + +async function main() { + await avsAssessmentV2SummaryOperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentV2SummaryOperationsListByParentSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentV2SummaryOperationsListByParentSample.js new file mode 100644 index 000000000000..234eaa9eff80 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentV2SummaryOperationsListByParentSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { MigrateClient } = require("@azure/arm-migrate"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list AvsAssessmentV2Summary resources by AvsAssessmentV2 + * + * @summary list AvsAssessmentV2Summary resources by AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_ListByParent_MaximumSet_Gen.json + */ +async function avsAssessmentV2SummaryOperationsListByParentMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsAssessmentV2SummaryOperations.listByParent( + "rgavsAssessments", + "contosoProject", + "assessmentName", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await avsAssessmentV2SummaryOperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsCreateSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsCreateSample.js new file mode 100644 index 000000000000..17dd23eca410 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsCreateSample.js @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { MigrateClient } = require("@azure/arm-migrate"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a AvsAssessmentV2 + * + * @summary create a AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Create_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsCreateMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentsV2Operations.create( + "rgavsAssessments", + "contosoProject", + "assessmentName", + { + properties: { + scope: { + scopeType: "ServerGroupId", + serverGroupId: "fxonspfmzfuiaepr", + azureResourceGraphQuery: "ylnfwgptlyzwzkotmunbx", + }, + settings: { + azureLocation: "actuloeieva", + currency: "Unknown", + scalingFactor: 28, + discountPercentage: 27, + sizingCriterion: "PerformanceBased", + performanceData: { + percentile: "Unknown", + timeRange: "Day", + perfDataStartTime: new Date("2025-02-21T05:36:34.751Z"), + perfDataEndTime: new Date("2025-02-21T05:36:34.751Z"), + }, + savingsSettings: { + savingsOptions: "None", + azureOfferCode: "Unknown", + }, + billingSettings: { + licensingProgram: "Retail", + subscriptionId: "xvtuenxmmjuqlhgmvev", + }, + environmentType: "Production", + failuresToTolerateAndRaidLevelList: ["Unknown"], + vcpuOversubscription: 25, + nodeTypes: ["Unknown"], + avsAssessmentScenario: "Unknown", + externalStorageTypes: ["Unknown"], + cpuHeadroom: 27, + isVcfByolEnabled: true, + memOvercommit: 11, + dedupeCompression: 26, + isStretchClusterEnabled: true, + }, + details: { status: "Created" }, + fallbackMachineAssessmentArmId: "tpjvxfcyxsgngqdxyrrfh", + }, + }, + ); + console.log(result); +} + +async function main() { + await avsAssessmentsV2OperationsCreateMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsDeleteSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsDeleteSample.js new file mode 100644 index 000000000000..57b0280183f7 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsDeleteSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { MigrateClient } = require("@azure/arm-migrate"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete a AvsAssessmentV2 + * + * @summary delete a AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Delete_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsDeleteMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + await client.avsAssessmentsV2Operations.delete( + "rgavsAssessments", + "contosoProject", + "assessmentName", + ); +} + +async function main() { + await avsAssessmentsV2OperationsDeleteMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsDownloadUrlSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsDownloadUrlSample.js new file mode 100644 index 000000000000..d1cb6fd75283 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsDownloadUrlSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { MigrateClient } = require("@azure/arm-migrate"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the URL for downloading the assessment in a report format. + * + * @summary get the URL for downloading the assessment in a report format. + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_DownloadUrl_MaximumSet_Gen.json + */ +async function getDownloadURLForTheAssessmentReport() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentsV2Operations.downloadUrl( + "rgavsAssessments", + "contosoProject", + "assessmentName", + {}, + ); + console.log(result); +} + +async function main() { + await getDownloadURLForTheAssessmentReport(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsGetSample.js new file mode 100644 index 000000000000..e364f0777f13 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsGetSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { MigrateClient } = require("@azure/arm-migrate"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a AvsAssessmentV2 + * + * @summary get a AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Get_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsGetMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentsV2Operations.get( + "rgavsAssessments", + "contosoProject", + "assessmentName", + ); + console.log(result); +} + +async function main() { + await avsAssessmentsV2OperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsListByParentSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsListByParentSample.js new file mode 100644 index 000000000000..3191e9090efd --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/avsAssessmentsV2OperationsListByParentSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { MigrateClient } = require("@azure/arm-migrate"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list AvsAssessmentV2 resources by AssessmentProject + * + * @summary list AvsAssessmentV2 resources by AssessmentProject + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_ListByParent_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsListByParentMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsAssessmentsV2Operations.listByParent( + "rgavsAssessments", + "contosoProject", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await avsAssessmentsV2OperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/avsGraphAssessmentOptionsOperationsGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/avsGraphAssessmentOptionsOperationsGetSample.js new file mode 100644 index 000000000000..4fad24a6c3df --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/avsGraphAssessmentOptionsOperationsGetSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { MigrateClient } = require("@azure/arm-migrate"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a AvsGraphAssessmentOptions + * + * @summary get a AvsGraphAssessmentOptions + * x-ms-original-file: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + */ +async function avsGraphAssessmentOptionsOperationsGetMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsGraphAssessmentOptionsOperations.get( + "rgavsAssessments", + "contosoProject", + ); + console.log(result); +} + +async function main() { + await avsGraphAssessmentOptionsOperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/avsGraphAssessmentOptionsOperationsListByParentSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/avsGraphAssessmentOptionsOperationsListByParentSample.js new file mode 100644 index 000000000000..a74e433800b9 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/avsGraphAssessmentOptionsOperationsListByParentSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { MigrateClient } = require("@azure/arm-migrate"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list AvsGraphAssessmentOptions resources by AssessmentProject + * + * @summary list AvsGraphAssessmentOptions resources by AssessmentProject + * x-ms-original-file: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_ListByParent_MaximumSet_Gen.json + */ +async function avsGraphAssessmentOptionsOperationsListByParentMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsGraphAssessmentOptionsOperations.listByParent( + "rgavsAssessments", + "contosoProject", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await avsGraphAssessmentOptionsOperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/groupsCreateSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/groupsCreateSample.js deleted file mode 100644 index d26917737fe1..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/groupsCreateSample.js +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new group by sending a json object of type 'group' as given in Models section as part of the Request Body. The group name in a project is unique. - -This operation is Idempotent. - - * - * @summary Create a new group by sending a json object of type 'group' as given in Models section as part of the Request Body. The group name in a project is unique. - -This operation is Idempotent. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Create.json - */ -async function groupsCreate() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Group2"; - const group = { - eTag: '"1e000c2c-0000-0d00-0000-5cdaa4190000"', - properties: {}, - }; - const options = { group }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.create(resourceGroupName, projectName, groupName, options); - console.log(result); -} - -async function main() { - groupsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/groupsDeleteSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/groupsDeleteSample.js deleted file mode 100644 index a7f741fdcf9f..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/groupsDeleteSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the group from the project. The machines remain in the project. Deleting a non-existent group results in a no-operation. - -A group is an aggregation mechanism for machines in a project. Therefore, deleting group does not delete machines in it. - - * - * @summary Delete the group from the project. The machines remain in the project. Deleting a non-existent group results in a no-operation. - -A group is an aggregation mechanism for machines in a project. Therefore, deleting group does not delete machines in it. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Delete.json - */ -async function groupsDelete() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.delete(resourceGroupName, projectName, groupName); - console.log(result); -} - -async function main() { - groupsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/groupsGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/groupsGetSample.js deleted file mode 100644 index a4a8eaba601c..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/groupsGetSample.js +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get information related to a specific group in the project. Returns a json object of type 'group' as specified in the models section. - * - * @summary Get information related to a specific group in the project. Returns a json object of type 'group' as specified in the models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Get.json - */ -async function groupsGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.get(resourceGroupName, projectName, groupName); - console.log(result); -} - -async function main() { - groupsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/groupsListByProjectSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/groupsListByProjectSample.js deleted file mode 100644 index 0256bd0c2dcf..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/groupsListByProjectSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all groups created in the project. Returns a json array of objects of type 'group' as specified in the Models section. - * - * @summary Get all groups created in the project. Returns a json array of objects of type 'group' as specified in the Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_ListByProject.json - */ -async function groupsListByProject() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.groups.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - groupsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/groupsUpdateMachinesSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/groupsUpdateMachinesSample.js deleted file mode 100644 index 2be39d551737..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/groupsUpdateMachinesSample.js +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update machines in group by adding or removing machines. - * - * @summary Update machines in group by adding or removing machines. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_UpdateMachines.json - */ -async function groupsUpdateMachines() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Group2"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.updateMachines(resourceGroupName, projectName, groupName); - console.log(result); -} - -async function main() { - groupsUpdateMachines(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsCreateSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsCreateSample.js deleted file mode 100644 index 9ef04bbc86ff..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsCreateSample.js +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or Update Hyper-V collector - * - * @summary Create or Update Hyper-V collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Create.json - */ -async function hyperVCollectorsCreate() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const hyperVCollectorName = "migrateprojectce73collector"; - const collectorBody = { - eTag: '"00000981-0000-0300-0000-5d74cd5f0000"', - properties: { - agentProperties: { - spnDetails: { - applicationId: "827f1053-44dc-439f-b832-05416dcce12b", - audience: - "https://72f988bf-86f1-41af-91ab-2d7cd011db47/migrateprojectce73agentauthaadapp", - authority: "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - objectId: "be75098e-c0fc-4ac4-98c7-282ebbcf8370", - tenantId: "72f988bf-86f1-41af-91ab-2d7cd011db47", - }, - }, - discoverySiteId: - "/subscriptions/8c3c936a-c09b-4de3-830b-3f5f244d72e9/resourceGroups/ContosoITHyperV/providers/Microsoft.OffAzure/HyperVSites/migrateprojectce73site", - }, - }; - const options = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.hyperVCollectors.create( - resourceGroupName, - projectName, - hyperVCollectorName, - options - ); - console.log(result); -} - -async function main() { - hyperVCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsDeleteSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsDeleteSample.js deleted file mode 100644 index 42f3657116bf..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Hyper-V collector from the project. - * - * @summary Delete a Hyper-V collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Delete.json - */ -async function hyperVCollectorsDelete() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const hyperVCollectorName = "migrateprojectce73collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.hyperVCollectors.delete( - resourceGroupName, - projectName, - hyperVCollectorName - ); - console.log(result); -} - -async function main() { - hyperVCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsGetSample.js deleted file mode 100644 index 6bdf8a2a268c..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsGetSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Hyper-V collector. - * - * @summary Get a Hyper-V collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Get.json - */ -async function hyperVCollectorsGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const hyperVCollectorName = "migrateprojectce73collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.hyperVCollectors.get( - resourceGroupName, - projectName, - hyperVCollectorName - ); - console.log(result); -} - -async function main() { - hyperVCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsListByProjectSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsListByProjectSample.js deleted file mode 100644 index 6c303e93bed4..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/hyperVCollectorsListByProjectSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of Hyper-V collector. - * - * @summary Get a list of Hyper-V collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_ListByProject.json - */ -async function hyperVCollectorsListByProject() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.hyperVCollectors.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - hyperVCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsCreateSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsCreateSample.js deleted file mode 100644 index 152577df07ce..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsCreateSample.js +++ /dev/null @@ -1,53 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or Update Import collector - * - * @summary Create or Update Import collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Create.json - */ -async function importCollectorsCreate() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const importCollectorName = "importCollector2952"; - const collectorBody = { - name: "importCollector2951", - type: "Microsoft.Migrate/assessmentprojects/importcollectors", - eTag: '"000064a2-0000-3300-0000-605994800000"', - id: "/subscriptions/31be0ff4-c932-4cb3-8efc-efa411d79280/resourceGroups/markusavstestrg/providers/Microsoft.Migrate/assessmentprojects/rajoshCCY9671project/importcollectors/importCollector2951", - properties: { - discoverySiteId: - "/subscriptions/31be0ff4-c932-4cb3-8efc-efa411d79280/resourcegroups/MarkusAVStestRG/providers/microsoft.offazure/importsites/rajoshCCY54cbimportSite", - }, - }; - const options = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.importCollectors.create( - resourceGroupName, - projectName, - importCollectorName, - options - ); - console.log(result); -} - -async function main() { - importCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsDeleteSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsDeleteSample.js deleted file mode 100644 index 48237f79ad48..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Import collector from the project. - * - * @summary Delete a Import collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Delete.json - */ -async function importCollectorsDelete() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const importCollectorName = "importCollector2952"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.importCollectors.delete( - resourceGroupName, - projectName, - importCollectorName - ); - console.log(result); -} - -async function main() { - importCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsGetSample.js deleted file mode 100644 index 9ce6790e9125..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsGetSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Import collector. - * - * @summary Get a Import collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Get.json - */ -async function importCollectorsGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const importCollectorName = "importCollector2951"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.importCollectors.get( - resourceGroupName, - projectName, - importCollectorName - ); - console.log(result); -} - -async function main() { - importCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsListByProjectSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsListByProjectSample.js deleted file mode 100644 index c8a0b133ec74..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/importCollectorsListByProjectSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of Import collector. - * - * @summary Get a list of Import collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_ListByProject.json - */ -async function importCollectorsListByProject() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.importCollectors.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - importCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/machinesGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/machinesGetSample.js deleted file mode 100644 index 9b6e86215044..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/machinesGetSample.js +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the machine with the specified name. Returns a json object of type 'machine' defined in Models section. - * - * @summary Get the machine with the specified name. Returns a json object of type 'machine' defined in Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Machines_Get.json - */ -async function machinesGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const machineName = "269ef295-a38d-4f8f-9779-77ce79088311"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.machines.get(resourceGroupName, projectName, machineName); - console.log(result); -} - -async function main() { - machinesGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/machinesListByProjectSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/machinesListByProjectSample.js deleted file mode 100644 index 3ca9c75934d6..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/machinesListByProjectSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get data of all the machines available in the project. Returns a json array of objects of type 'machine' defined in Models section. - * - * @summary Get data of all the machines available in the project. Returns a json array of objects of type 'machine' defined in Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Machines_ListByProject.json - */ -async function machinesListByProject() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.machines.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - machinesListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/operationsListSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/operationsListSample.js index 2bdd437c7f24..edc4fc911d65 100644 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/operationsListSample.js +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/operationsListSample.js @@ -1,37 +1,29 @@ -/* - * 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. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); + +const { MigrateClient } = require("@azure/arm-migrate"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); /** - * This sample demonstrates how to Get a list of REST API supported by Microsoft.Migrate provider. + * This sample demonstrates how to list the operations for the provider * - * @summary Get a list of REST API supported by Microsoft.Migrate provider. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Operations_List.json + * @summary list the operations for the provider + * x-ms-original-file: 2024-03-03-preview/Operations_List_MaximumSet_Gen.json */ async function operationsList() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new MigrateClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.operations.list()) { + for await (const item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } async function main() { - operationsList(); + await operationsList(); } main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/package.json b/sdk/migrate/arm-migrate/samples/v2/javascript/package.json index e1d4078ec139..f48ac422cffe 100644 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/package.json +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/package.json @@ -2,7 +2,7 @@ "name": "@azure-samples/arm-migrate-js", "private": true, "version": "1.0.0", - "description": " client library samples for JavaScript", + "description": "@azure/arm-migrate client library samples for JavaScript", "engines": { "node": ">=18.0.0" }, @@ -14,6 +14,7 @@ "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" @@ -27,6 +28,6 @@ "dependencies": { "@azure/arm-migrate": "latest", "dotenv": "latest", - "@azure/identity": "^4.2.1" + "@azure/identity": "^4.9.1" } } diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionDeleteSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionDeleteSample.js deleted file mode 100644 index 41a5328d5cbf..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionDeleteSample.js +++ /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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the private endpoint connection from the project. T. - - * - * @summary Delete the private endpoint connection from the project. T. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Delete.json - */ -async function privateEndpointConnectionsDelete() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const privateEndpointConnectionName = - "custestpece80project3980pe.7e35576b-3df4-478e-9759-f64351cf4f43"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.delete( - resourceGroupName, - projectName, - privateEndpointConnectionName - ); - console.log(result); -} - -async function main() { - privateEndpointConnectionsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionGetSample.js deleted file mode 100644 index ad0a65ca5170..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionGetSample.js +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get information related to a specific private endpoint connection in the project. Returns a json object of type 'privateEndpointConnections' as specified in the models section. - * - * @summary Get information related to a specific private endpoint connection in the project. Returns a json object of type 'privateEndpointConnections' as specified in the models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Get.json - */ -async function privateEndpointConnectionsGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const privateEndpointConnectionName = - "custestpece80project3980pe.7e35576b-3df4-478e-9759-f64351cf4f43"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.get( - resourceGroupName, - projectName, - privateEndpointConnectionName - ); - console.log(result); -} - -async function main() { - privateEndpointConnectionsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionListByProjectSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionListByProjectSample.js deleted file mode 100644 index 2b2ca003194d..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionListByProjectSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all private endpoint connections in the project. Returns a json array of objects of type 'privateEndpointConnections' as specified in the Models section. - * - * @summary Get all private endpoint connections in the project. Returns a json array of objects of type 'privateEndpointConnections' as specified in the Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_ListByProject.json - */ -async function privateEndpointConnectionsListByProject() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.listByProject( - resourceGroupName, - projectName - ); - console.log(result); -} - -async function main() { - privateEndpointConnectionsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionUpdateSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionUpdateSample.js deleted file mode 100644 index d57bedb34285..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/privateEndpointConnectionUpdateSample.js +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a specific private endpoint connection in the project. - * - * @summary Update a specific private endpoint connection in the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Create.json - */ -async function privateEndpointConnectionsCreate() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const privateEndpointConnectionName = - "custestpece80project3980pe.7e35576b-3df4-478e-9759-f64351cf4f43"; - const privateEndpointConnectionBody = { - eTag: '"00009300-0000-0300-0000-602b967b0000"', - properties: { - privateLinkServiceConnectionState: { - description: undefined, - actionsRequired: "", - status: "Approved", - }, - }, - }; - const options = { - privateEndpointConnectionBody, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.update( - resourceGroupName, - projectName, - privateEndpointConnectionName, - options - ); - console.log(result); -} - -async function main() { - privateEndpointConnectionsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/privateLinkResourceGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/privateLinkResourceGetSample.js deleted file mode 100644 index 54840d9e4e46..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/privateLinkResourceGetSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get information related to a specific private Link Resource in the project. Returns a json object of type 'privateLinkResources' as specified in the models section. - * - * @summary Get information related to a specific private Link Resource in the project. Returns a json object of type 'privateLinkResources' as specified in the models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateLinkResources_Get.json - */ -async function privateLinkResourcesGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "madhavicus"; - const projectName = "custestpece80project"; - const privateLinkResourceName = "Default"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateLinkResourceOperations.get( - resourceGroupName, - projectName, - privateLinkResourceName - ); - console.log(result); -} - -async function main() { - privateLinkResourcesGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/privateLinkResourceListByProjectSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/privateLinkResourceListByProjectSample.js deleted file mode 100644 index 7700f82c3b3d..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/privateLinkResourceListByProjectSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all private link resources created in the project. Returns a json array of objects of type 'privateLinkResources' as specified in the Models section. - * - * @summary Get all private link resources created in the project. Returns a json array of objects of type 'privateLinkResources' as specified in the Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateLinkResources_ListByProject.json - */ -async function privateLinkResourcesListByProject() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "madhavicus"; - const projectName = "custestpece80project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateLinkResourceOperations.listByProject( - resourceGroupName, - projectName - ); - console.log(result); -} - -async function main() { - privateLinkResourcesListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsAssessmentOptionsListSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/projectsAssessmentOptionsListSample.js deleted file mode 100644 index 2537722c4102..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsAssessmentOptionsListSample.js +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets list of all available options for the properties of an assessment on a project. - * - * @summary Gets list of all available options for the properties of an assessment on a project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessmentOptions_List.json - */ -async function assessmentOptionsGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.projects.listAssessmentOptionsList( - resourceGroupName, - projectName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - assessmentOptionsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsAssessmentOptionsSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/projectsAssessmentOptionsSample.js deleted file mode 100644 index d4070bb70114..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsAssessmentOptionsSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all available options for the properties of an assessment on a project. - * - * @summary Get all available options for the properties of an assessment on a project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessmentOptions_Get.json - */ -async function assessmentOptionsGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const assessmentOptionsName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.assessmentOptions( - resourceGroupName, - projectName, - assessmentOptionsName - ); - console.log(result); -} - -async function main() { - assessmentOptionsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsCreateSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/projectsCreateSample.js deleted file mode 100644 index 98b11648cf7f..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsCreateSample.js +++ /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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a project with specified name. If a project already exists, update it. - * - * @summary Create a project with specified name. If a project already exists, update it. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Create.json - */ -async function projectsCreate() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abGoyalProject2"; - const project = { - eTag: "", - location: "West Europe", - properties: { - assessmentSolutionId: - "/subscriptions/6393a73f-8d55-47ef-b6dd-179b3e0c7910/resourcegroups/abgoyal-westeurope/providers/microsoft.migrate/migrateprojects/abgoyalweselfhost/Solutions/Servers-Assessment-ServerAssessment", - customerWorkspaceId: undefined, - customerWorkspaceLocation: undefined, - projectStatus: "Active", - }, - tags: {}, - }; - const options = { project }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.create(resourceGroupName, projectName, options); - console.log(result); -} - -async function main() { - projectsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsDeleteSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/projectsDeleteSample.js deleted file mode 100644 index 23807caab07c..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsDeleteSample.js +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the project. Deleting non-existent project is a no-operation. - * - * @summary Delete the project. Deleting non-existent project is a no-operation. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Delete.json - */ -async function projectsDelete() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abGoyalProject2"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.delete(resourceGroupName, projectName); - console.log(result); -} - -async function main() { - projectsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/projectsGetSample.js deleted file mode 100644 index 733c536aced4..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsGetSample.js +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the project with the specified name. - * - * @summary Get the project with the specified name. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Get.json - */ -async function projectsGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.get(resourceGroupName, projectName); - console.log(result); -} - -async function main() { - projectsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsListBySubscriptionSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/projectsListBySubscriptionSample.js deleted file mode 100644 index cf83c472f750..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsListBySubscriptionSample.js +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all the projects in the subscription. - * - * @summary Get all the projects in the subscription. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ProjectsInSubscription_List.json - */ -async function projectsList() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.projects.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - projectsList(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsListSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/projectsListSample.js deleted file mode 100644 index 0e20f036a2dd..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsListSample.js +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all the projects in the resource group. - * - * @summary Get all the projects in the resource group. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_List.json - */ -async function projectsList() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.projects.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - projectsList(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsUpdateSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/projectsUpdateSample.js deleted file mode 100644 index b7a801c8bc02..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/projectsUpdateSample.js +++ /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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a project with specified name. Supports partial updates, for example only tags can be provided. - * - * @summary Update a project with specified name. Supports partial updates, for example only tags can be provided. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Update.json - */ -async function projectsUpdate() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abGoyalProject2"; - const project = { - eTag: "", - location: "West Europe", - properties: { - assessmentSolutionId: - "/subscriptions/6393a73f-8d55-47ef-b6dd-179b3e0c7910/resourcegroups/abgoyal-westeurope/providers/microsoft.migrate/migrateprojects/abgoyalweselfhost/Solutions/Servers-Assessment-ServerAssessment", - customerWorkspaceId: undefined, - customerWorkspaceLocation: undefined, - projectStatus: "Active", - }, - tags: {}, - }; - const options = { project }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.update(resourceGroupName, projectName, options); - console.log(result); -} - -async function main() { - projectsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/sample.env b/sdk/migrate/arm-migrate/samples/v2/javascript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/sample.env +++ b/sdk/migrate/arm-migrate/samples/v2/javascript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsCreateSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsCreateSample.js deleted file mode 100644 index 816789b25ad0..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsCreateSample.js +++ /dev/null @@ -1,59 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or Update Server collector - * - * @summary Create or Update Server collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Create.json - */ -async function serverCollectorsCreate() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const serverCollectorName = "app23df4collector"; - const collectorBody = { - eTag: '"00000606-0000-0d00-0000-605999bf0000"', - properties: { - agentProperties: { - spnDetails: { - applicationId: "ad9f701a-cc08-4421-b51f-b5762d58e9ba", - audience: "https://72f988bf-86f1-41af-91ab-2d7cd011db47/app23df4authandaccessaadapp", - authority: "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - objectId: "b4975e42-9248-4a36-b99f-37eca377ea00", - tenantId: "72f988bf-86f1-41af-91ab-2d7cd011db47", - }, - }, - discoverySiteId: - "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/pajindTest/providers/Microsoft.OffAzure/ServerSites/app21141site", - }, - }; - const options = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.serverCollectors.create( - resourceGroupName, - projectName, - serverCollectorName, - options - ); - console.log(result); -} - -async function main() { - serverCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsDeleteSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsDeleteSample.js deleted file mode 100644 index 46fc1da8e0c7..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Server collector from the project. - * - * @summary Delete a Server collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Delete.json - */ -async function serverCollectorsDelete() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const serverCollectorName = "app23df4collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.serverCollectors.delete( - resourceGroupName, - projectName, - serverCollectorName - ); - console.log(result); -} - -async function main() { - serverCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsGetSample.js deleted file mode 100644 index 9f95843761fb..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsGetSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Server collector. - * - * @summary Get a Server collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Get.json - */ -async function serverCollectorsGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const serverCollectorName = "app23df4collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.serverCollectors.get( - resourceGroupName, - projectName, - serverCollectorName - ); - console.log(result); -} - -async function main() { - serverCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsListByProjectSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsListByProjectSample.js deleted file mode 100644 index e0613b276ada..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/serverCollectorsListByProjectSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of Server collector. - * - * @summary Get a list of Server collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_ListByProject.json - */ -async function serverCollectorsListByProject() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.serverCollectors.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - serverCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsCreateSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsCreateSample.js deleted file mode 100644 index d0218081897c..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsCreateSample.js +++ /dev/null @@ -1,59 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or Update VMware collector - * - * @summary Create or Update VMware collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Create.json - */ -async function vMwareCollectorsCreate() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const vmWareCollectorName = "PortalvCenterbc2fcollector"; - const collectorBody = { - eTag: '"01003d32-0000-0d00-0000-5d74d2e50000"', - properties: { - agentProperties: { - spnDetails: { - applicationId: "fc717575-8173-4b21-92a5-658b655e613e", - audience: "https://72f988bf-86f1-41af-91ab-2d7cd011db47/PortalvCenterbc2fagentauthaadapp", - authority: "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - objectId: "29d94f38-db94-4980-aec0-0cfd55ab1cd0", - tenantId: "72f988bf-86f1-41af-91ab-2d7cd011db47", - }, - }, - discoverySiteId: - "/subscriptions/6393a73f-8d55-47ef-b6dd-179b3e0c7910/resourceGroups/abgoyal-westEurope/providers/Microsoft.OffAzure/VMwareSites/PortalvCenterbc2fsite", - }, - }; - const options = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.vMwareCollectors.create( - resourceGroupName, - projectName, - vmWareCollectorName, - options - ); - console.log(result); -} - -async function main() { - vMwareCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsDeleteSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsDeleteSample.js deleted file mode 100644 index 4869a2ca6234..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a VMware collector from the project. - * - * @summary Delete a VMware collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Delete.json - */ -async function vMwareCollectorsDelete() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const vmWareCollectorName = "PortalvCenterbc2fcollector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.vMwareCollectors.delete( - resourceGroupName, - projectName, - vmWareCollectorName - ); - console.log(result); -} - -async function main() { - vMwareCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsGetSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsGetSample.js deleted file mode 100644 index 9bcb1e69a247..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsGetSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a VMware collector. - * - * @summary Get a VMware collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Get.json - */ -async function vMwareCollectorsGet() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const vmWareCollectorName = "PortalvCenterbc2fcollector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.vMwareCollectors.get( - resourceGroupName, - projectName, - vmWareCollectorName - ); - console.log(result); -} - -async function main() { - vMwareCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsListByProjectSample.js b/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsListByProjectSample.js deleted file mode 100644 index 57b59b2c49b6..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/javascript/vMwareCollectorsListByProjectSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureMigrateV2 } = require("@azure/arm-migrate"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of VMware collector. - * - * @summary Get a list of VMware collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_ListByProject.json - */ -async function vMwareCollectorsListByProject() { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.vMwareCollectors.listByProject(resourceGroupName, projectName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - vMwareCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/README.md b/sdk/migrate/arm-migrate/samples/v2/typescript/README.md index efd665ebb1ac..5be3afbe1122 100644 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/README.md +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/README.md @@ -1,55 +1,21 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [assessedMachinesGetSample.ts][assessedmachinesgetsample] | Get an assessed machine with its size & cost estimate that was evaluated in the specified assessment. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessedMachines_Get.json | -| [assessedMachinesListByAssessmentSample.ts][assessedmachineslistbyassessmentsample] | Get list of machines that assessed as part of the specified assessment. Returns a json array of objects of type 'assessedMachine' as specified in the Models section. //@@TS-MAGIC-NEWLINE@@ Whenever an assessment is created or updated, it goes under computation. During this phase, the 'status' field of Assessment object reports 'Computing'. During the period when the assessment is under computation, the list of assessed machines is empty and no assessed machines are returned by this call. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessedMachines_ListByAssessment.json | -| [assessmentsCreateSample.ts][assessmentscreatesample] | Create a new assessment with the given name and the specified settings. Since name of an assessment in a project is a unique identifier, if an assessment with the name provided already exists, then the existing assessment is updated. //@@TS-MAGIC-NEWLINE@@ Any PUT operation, resulting in either create or update on an assessment, will cause the assessment to go in a "InProgress" state. This will be indicated by the field 'computationState' on the Assessment object. During this time no other PUT operation will be allowed on that assessment object, nor will a Delete operation. Once the computation for the assessment is complete, the field 'computationState' will be updated to 'Ready', and then other PUT or DELETE operations can happen on the assessment. //@@TS-MAGIC-NEWLINE@@ When assessment is under computation, any PUT will lead to a 400 - Bad Request error. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Create.json | -| [assessmentsDeleteSample.ts][assessmentsdeletesample] | Delete an assessment from the project. The machines remain in the assessment. Deleting a non-existent assessment results in a no-operation. //@@TS-MAGIC-NEWLINE@@ When an assessment is under computation, as indicated by the 'computationState' field, it cannot be deleted. Any such attempt will return a 400 - Bad Request. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Delete.json | -| [assessmentsGetReportDownloadUrlSample.ts][assessmentsgetreportdownloadurlsample] | Get the URL for downloading the assessment in a report format. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_GetReportDownloadUrl.json | -| [assessmentsGetSample.ts][assessmentsgetsample] | Get an existing assessment with the specified name. Returns a json object of type 'assessment' as specified in Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Get.json | -| [assessmentsListByGroupSample.ts][assessmentslistbygroupsample] | Get all assessments created for the specified group. //@@TS-MAGIC-NEWLINE@@ Returns a json array of objects of type 'assessment' as specified in Models section. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_ListByGroup.json | -| [assessmentsListByProjectSample.ts][assessmentslistbyprojectsample] | Get all assessments created in the project. //@@TS-MAGIC-NEWLINE@@ Returns a json array of objects of type 'assessment' as specified in Models section. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_ListByProject.json | -| [groupsCreateSample.ts][groupscreatesample] | Create a new group by sending a json object of type 'group' as given in Models section as part of the Request Body. The group name in a project is unique. //@@TS-MAGIC-NEWLINE@@ This operation is Idempotent. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Create.json | -| [groupsDeleteSample.ts][groupsdeletesample] | Delete the group from the project. The machines remain in the project. Deleting a non-existent group results in a no-operation. //@@TS-MAGIC-NEWLINE@@ A group is an aggregation mechanism for machines in a project. Therefore, deleting group does not delete machines in it. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Delete.json | -| [groupsGetSample.ts][groupsgetsample] | Get information related to a specific group in the project. Returns a json object of type 'group' as specified in the models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Get.json | -| [groupsListByProjectSample.ts][groupslistbyprojectsample] | Get all groups created in the project. Returns a json array of objects of type 'group' as specified in the Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_ListByProject.json | -| [groupsUpdateMachinesSample.ts][groupsupdatemachinessample] | Update machines in group by adding or removing machines. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_UpdateMachines.json | -| [hyperVCollectorsCreateSample.ts][hypervcollectorscreatesample] | Create or Update Hyper-V collector x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Create.json | -| [hyperVCollectorsDeleteSample.ts][hypervcollectorsdeletesample] | Delete a Hyper-V collector from the project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Delete.json | -| [hyperVCollectorsGetSample.ts][hypervcollectorsgetsample] | Get a Hyper-V collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Get.json | -| [hyperVCollectorsListByProjectSample.ts][hypervcollectorslistbyprojectsample] | Get a list of Hyper-V collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_ListByProject.json | -| [importCollectorsCreateSample.ts][importcollectorscreatesample] | Create or Update Import collector x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Create.json | -| [importCollectorsDeleteSample.ts][importcollectorsdeletesample] | Delete a Import collector from the project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Delete.json | -| [importCollectorsGetSample.ts][importcollectorsgetsample] | Get a Import collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Get.json | -| [importCollectorsListByProjectSample.ts][importcollectorslistbyprojectsample] | Get a list of Import collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_ListByProject.json | -| [machinesGetSample.ts][machinesgetsample] | Get the machine with the specified name. Returns a json object of type 'machine' defined in Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Machines_Get.json | -| [machinesListByProjectSample.ts][machineslistbyprojectsample] | Get data of all the machines available in the project. Returns a json array of objects of type 'machine' defined in Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Machines_ListByProject.json | -| [operationsListSample.ts][operationslistsample] | Get a list of REST API supported by Microsoft.Migrate provider. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Operations_List.json | -| [privateEndpointConnectionDeleteSample.ts][privateendpointconnectiondeletesample] | Delete the private endpoint connection from the project. T. //@@TS-MAGIC-NEWLINE@@ x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Delete.json | -| [privateEndpointConnectionGetSample.ts][privateendpointconnectiongetsample] | Get information related to a specific private endpoint connection in the project. Returns a json object of type 'privateEndpointConnections' as specified in the models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Get.json | -| [privateEndpointConnectionListByProjectSample.ts][privateendpointconnectionlistbyprojectsample] | Get all private endpoint connections in the project. Returns a json array of objects of type 'privateEndpointConnections' as specified in the Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_ListByProject.json | -| [privateEndpointConnectionUpdateSample.ts][privateendpointconnectionupdatesample] | Update a specific private endpoint connection in the project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Create.json | -| [privateLinkResourceGetSample.ts][privatelinkresourcegetsample] | Get information related to a specific private Link Resource in the project. Returns a json object of type 'privateLinkResources' as specified in the models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateLinkResources_Get.json | -| [privateLinkResourceListByProjectSample.ts][privatelinkresourcelistbyprojectsample] | Get all private link resources created in the project. Returns a json array of objects of type 'privateLinkResources' as specified in the Models section. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateLinkResources_ListByProject.json | -| [projectsAssessmentOptionsListSample.ts][projectsassessmentoptionslistsample] | Gets list of all available options for the properties of an assessment on a project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessmentOptions_List.json | -| [projectsAssessmentOptionsSample.ts][projectsassessmentoptionssample] | Get all available options for the properties of an assessment on a project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessmentOptions_Get.json | -| [projectsCreateSample.ts][projectscreatesample] | Create a project with specified name. If a project already exists, update it. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Create.json | -| [projectsDeleteSample.ts][projectsdeletesample] | Delete the project. Deleting non-existent project is a no-operation. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Delete.json | -| [projectsGetSample.ts][projectsgetsample] | Get the project with the specified name. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Get.json | -| [projectsListBySubscriptionSample.ts][projectslistbysubscriptionsample] | Get all the projects in the subscription. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ProjectsInSubscription_List.json | -| [projectsListSample.ts][projectslistsample] | Get all the projects in the resource group. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_List.json | -| [projectsUpdateSample.ts][projectsupdatesample] | Update a project with specified name. Supports partial updates, for example only tags can be provided. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Update.json | -| [serverCollectorsCreateSample.ts][servercollectorscreatesample] | Create or Update Server collector x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Create.json | -| [serverCollectorsDeleteSample.ts][servercollectorsdeletesample] | Delete a Server collector from the project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Delete.json | -| [serverCollectorsGetSample.ts][servercollectorsgetsample] | Get a Server collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Get.json | -| [serverCollectorsListByProjectSample.ts][servercollectorslistbyprojectsample] | Get a list of Server collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_ListByProject.json | -| [vMwareCollectorsCreateSample.ts][vmwarecollectorscreatesample] | Create or Update VMware collector x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Create.json | -| [vMwareCollectorsDeleteSample.ts][vmwarecollectorsdeletesample] | Delete a VMware collector from the project. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Delete.json | -| [vMwareCollectorsGetSample.ts][vmwarecollectorsgetsample] | Get a VMware collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Get.json | -| [vMwareCollectorsListByProjectSample.ts][vmwarecollectorslistbyprojectsample] | Get a list of VMware collector. x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_ListByProject.json | +# @azure/arm-migrate client library samples for TypeScript + +These sample programs show how to use the TypeScript client libraries for @azure/arm-migrate in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [avsAssessedMachinesV2OperationsGetSample.ts][avsassessedmachinesv2operationsgetsample] | get a AvsAssessedMachineV2 x-ms-original-file: 2024-03-03-preview/AvsAssessedMachinesV2Operations_Get_MaximumSet_Gen.json | +| [avsAssessedMachinesV2OperationsListByParentSample.ts][avsassessedmachinesv2operationslistbyparentsample] | list AvsAssessedMachineV2 resources by AvsAssessmentV2 x-ms-original-file: 2024-03-03-preview/AvsAssessedMachinesV2Operations_ListByParent_MaximumSet_Gen.json | +| [avsAssessmentV2SummaryOperationsGetSample.ts][avsassessmentv2summaryoperationsgetsample] | get a AvsAssessmentV2Summary x-ms-original-file: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json | +| [avsAssessmentV2SummaryOperationsListByParentSample.ts][avsassessmentv2summaryoperationslistbyparentsample] | list AvsAssessmentV2Summary resources by AvsAssessmentV2 x-ms-original-file: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_ListByParent_MaximumSet_Gen.json | +| [avsAssessmentsV2OperationsCreateSample.ts][avsassessmentsv2operationscreatesample] | create a AvsAssessmentV2 x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Create_MaximumSet_Gen.json | +| [avsAssessmentsV2OperationsDeleteSample.ts][avsassessmentsv2operationsdeletesample] | delete a AvsAssessmentV2 x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Delete_MaximumSet_Gen.json | +| [avsAssessmentsV2OperationsDownloadUrlSample.ts][avsassessmentsv2operationsdownloadurlsample] | get the URL for downloading the assessment in a report format. x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_DownloadUrl_MaximumSet_Gen.json | +| [avsAssessmentsV2OperationsGetSample.ts][avsassessmentsv2operationsgetsample] | get a AvsAssessmentV2 x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Get_MaximumSet_Gen.json | +| [avsAssessmentsV2OperationsListByParentSample.ts][avsassessmentsv2operationslistbyparentsample] | list AvsAssessmentV2 resources by AssessmentProject x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_ListByParent_MaximumSet_Gen.json | +| [avsGraphAssessmentOptionsOperationsGetSample.ts][avsgraphassessmentoptionsoperationsgetsample] | get a AvsGraphAssessmentOptions x-ms-original-file: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json | +| [avsGraphAssessmentOptionsOperationsListByParentSample.ts][avsgraphassessmentoptionsoperationslistbyparentsample] | list AvsGraphAssessmentOptions resources by AssessmentProject x-ms-original-file: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_ListByParent_MaximumSet_Gen.json | +| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-03-03-preview/Operations_List_MaximumSet_Gen.json | ## Prerequisites @@ -88,65 +54,31 @@ npm run build 4. Run whichever samples you like (note that some samples may require additional setup, see the table above): ```bash -node dist/assessedMachinesGetSample.js +node dist/avsAssessedMachinesV2OperationsGetSample.js ``` Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -npx dev-tool run vendored cross-env MIGRATE_SUBSCRIPTION_ID="" MIGRATE_RESOURCE_GROUP="" node dist/assessedMachinesGetSample.js +npx dev-tool run vendored cross-env node dist/avsAssessedMachinesV2OperationsGetSample.js ``` ## Next Steps Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. -[assessedmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessedMachinesGetSample.ts -[assessedmachineslistbyassessmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessedMachinesListByAssessmentSample.ts -[assessmentscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsCreateSample.ts -[assessmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsDeleteSample.ts -[assessmentsgetreportdownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsGetReportDownloadUrlSample.ts -[assessmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsGetSample.ts -[assessmentslistbygroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsListByGroupSample.ts -[assessmentslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsListByProjectSample.ts -[groupscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsCreateSample.ts -[groupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsDeleteSample.ts -[groupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsGetSample.ts -[groupslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsListByProjectSample.ts -[groupsupdatemachinessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsUpdateMachinesSample.ts -[hypervcollectorscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsCreateSample.ts -[hypervcollectorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsDeleteSample.ts -[hypervcollectorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsGetSample.ts -[hypervcollectorslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsListByProjectSample.ts -[importcollectorscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsCreateSample.ts -[importcollectorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsDeleteSample.ts -[importcollectorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsGetSample.ts -[importcollectorslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsListByProjectSample.ts -[machinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/machinesGetSample.ts -[machineslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/machinesListByProjectSample.ts +[avsassessedmachinesv2operationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessedMachinesV2OperationsGetSample.ts +[avsassessedmachinesv2operationslistbyparentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessedMachinesV2OperationsListByParentSample.ts +[avsassessmentv2summaryoperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentV2SummaryOperationsGetSample.ts +[avsassessmentv2summaryoperationslistbyparentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentV2SummaryOperationsListByParentSample.ts +[avsassessmentsv2operationscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsCreateSample.ts +[avsassessmentsv2operationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsDeleteSample.ts +[avsassessmentsv2operationsdownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsDownloadUrlSample.ts +[avsassessmentsv2operationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsGetSample.ts +[avsassessmentsv2operationslistbyparentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsListByParentSample.ts +[avsgraphassessmentoptionsoperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsGraphAssessmentOptionsOperationsGetSample.ts +[avsgraphassessmentoptionsoperationslistbyparentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsGraphAssessmentOptionsOperationsListByParentSample.ts [operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/operationsListSample.ts -[privateendpointconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionDeleteSample.ts -[privateendpointconnectiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionGetSample.ts -[privateendpointconnectionlistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionListByProjectSample.ts -[privateendpointconnectionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionUpdateSample.ts -[privatelinkresourcegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateLinkResourceGetSample.ts -[privatelinkresourcelistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateLinkResourceListByProjectSample.ts -[projectsassessmentoptionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsAssessmentOptionsListSample.ts -[projectsassessmentoptionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsAssessmentOptionsSample.ts -[projectscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsCreateSample.ts -[projectsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsDeleteSample.ts -[projectsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsGetSample.ts -[projectslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsListBySubscriptionSample.ts -[projectslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsListSample.ts -[projectsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsUpdateSample.ts -[servercollectorscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsCreateSample.ts -[servercollectorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsDeleteSample.ts -[servercollectorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsGetSample.ts -[servercollectorslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsListByProjectSample.ts -[vmwarecollectorscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsCreateSample.ts -[vmwarecollectorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsDeleteSample.ts -[vmwarecollectorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsGetSample.ts -[vmwarecollectorslistbyprojectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsListByProjectSample.ts [apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-migrate?view=azure-node-preview [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/migrate/arm-migrate/README.md diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/package.json b/sdk/migrate/arm-migrate/samples/v2/typescript/package.json index 5da4848be191..0d1f2c449fcc 100644 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/package.json +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/package.json @@ -2,7 +2,7 @@ "name": "@azure-samples/arm-migrate-ts", "private": true, "version": "1.0.0", - "description": " client library samples for TypeScript", + "description": "@azure/arm-migrate client library samples for TypeScript", "engines": { "node": ">=18.0.0" }, @@ -18,6 +18,7 @@ "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" @@ -31,7 +32,7 @@ "dependencies": { "@azure/arm-migrate": "latest", "dotenv": "latest", - "@azure/identity": "^4.2.1" + "@azure/identity": "^4.9.1" }, "devDependencies": { "@types/node": "^18.0.0", diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/sample.env b/sdk/migrate/arm-migrate/samples/v2/typescript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/sample.env +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessedMachinesGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessedMachinesGetSample.ts deleted file mode 100644 index 0d4135ac303c..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessedMachinesGetSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get an assessed machine with its size & cost estimate that was evaluated in the specified assessment. - * - * @summary Get an assessed machine with its size & cost estimate that was evaluated in the specified assessment. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessedMachines_Get.json - */ -async function assessedMachinesGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const assessedMachineName = "f57fe432-3bd2-486a-a83a-6f4d99f1a952"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessedMachines.get( - resourceGroupName, - projectName, - groupName, - assessmentName, - assessedMachineName - ); - console.log(result); -} - -async function main(): Promise { - assessedMachinesGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessedMachinesListByAssessmentSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessedMachinesListByAssessmentSample.ts deleted file mode 100644 index 8ff47c89e0d8..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessedMachinesListByAssessmentSample.ts +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get list of machines that assessed as part of the specified assessment. Returns a json array of objects of type 'assessedMachine' as specified in the Models section. - -Whenever an assessment is created or updated, it goes under computation. During this phase, the 'status' field of Assessment object reports 'Computing'. -During the period when the assessment is under computation, the list of assessed machines is empty and no assessed machines are returned by this call. - - * - * @summary Get list of machines that assessed as part of the specified assessment. Returns a json array of objects of type 'assessedMachine' as specified in the Models section. - -Whenever an assessment is created or updated, it goes under computation. During this phase, the 'status' field of Assessment object reports 'Computing'. -During the period when the assessment is under computation, the list of assessed machines is empty and no assessed machines are returned by this call. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessedMachines_ListByAssessment.json - */ -async function assessedMachinesListByAssessment(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.assessedMachines.listByAssessment( - resourceGroupName, - projectName, - groupName, - assessmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - assessedMachinesListByAssessment(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsCreateSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsCreateSample.ts deleted file mode 100644 index 223e0d815e0c..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsCreateSample.ts +++ /dev/null @@ -1,96 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Assessment, - AssessmentsCreateOptionalParams, - AzureMigrateV2 -} from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new assessment with the given name and the specified settings. Since name of an assessment in a project is a unique identifier, if an assessment with the name provided already exists, then the existing assessment is updated. - -Any PUT operation, resulting in either create or update on an assessment, will cause the assessment to go in a "InProgress" state. This will be indicated by the field 'computationState' on the Assessment object. During this time no other PUT operation will be allowed on that assessment object, nor will a Delete operation. Once the computation for the assessment is complete, the field 'computationState' will be updated to 'Ready', and then other PUT or DELETE operations can happen on the assessment. - -When assessment is under computation, any PUT will lead to a 400 - Bad Request error. - - * - * @summary Create a new assessment with the given name and the specified settings. Since name of an assessment in a project is a unique identifier, if an assessment with the name provided already exists, then the existing assessment is updated. - -Any PUT operation, resulting in either create or update on an assessment, will cause the assessment to go in a "InProgress" state. This will be indicated by the field 'computationState' on the Assessment object. During this time no other PUT operation will be allowed on that assessment object, nor will a Delete operation. Once the computation for the assessment is complete, the field 'computationState' will be updated to 'Ready', and then other PUT or DELETE operations can happen on the assessment. - -When assessment is under computation, any PUT will lead to a 400 - Bad Request error. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Create.json - */ -async function assessmentsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Group2"; - const assessmentName = "assessment_5_14_2019_16_48_47"; - const assessment: Assessment = { - eTag: '"1e000c2c-0000-0d00-0000-5cdaa4190000"', - properties: { - azureDiskType: "StandardOrPremium", - azureHybridUseBenefit: "Yes", - azureLocation: "NorthEurope", - azureOfferCode: "MSAZR0003P", - azurePricingTier: "Standard", - azureStorageRedundancy: "LocallyRedundant", - azureVmFamilies: [ - "Dv2_series", - "F_series", - "Dv3_series", - "DS_series", - "DSv2_series", - "Fs_series", - "Dsv3_series", - "Ev3_series", - "Esv3_series", - "D_series", - "M_series", - "Fsv2_series", - "H_series" - ], - currency: "USD", - discountPercentage: 100, - percentile: "Percentile95", - reservedInstance: "RI3Year", - scalingFactor: 1, - sizingCriterion: "PerformanceBased", - stage: "InProgress", - timeRange: "Day", - vmUptime: { daysPerMonth: 31, hoursPerDay: 24 } - } - }; - const options: AssessmentsCreateOptionalParams = { assessment }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.create( - resourceGroupName, - projectName, - groupName, - assessmentName, - options - ); - console.log(result); -} - -async function main(): Promise { - assessmentsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsDeleteSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsDeleteSample.ts deleted file mode 100644 index d51d81d62265..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsDeleteSample.ts +++ /dev/null @@ -1,51 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete an assessment from the project. The machines remain in the assessment. Deleting a non-existent assessment results in a no-operation. - -When an assessment is under computation, as indicated by the 'computationState' field, it cannot be deleted. Any such attempt will return a 400 - Bad Request. - - * - * @summary Delete an assessment from the project. The machines remain in the assessment. Deleting a non-existent assessment results in a no-operation. - -When an assessment is under computation, as indicated by the 'computationState' field, it cannot be deleted. Any such attempt will return a 400 - Bad Request. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Delete.json - */ -async function assessmentsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.delete( - resourceGroupName, - projectName, - groupName, - assessmentName - ); - console.log(result); -} - -async function main(): Promise { - assessmentsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsGetReportDownloadUrlSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsGetReportDownloadUrlSample.ts deleted file mode 100644 index 98459270eafc..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsGetReportDownloadUrlSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the URL for downloading the assessment in a report format. - * - * @summary Get the URL for downloading the assessment in a report format. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_GetReportDownloadUrl.json - */ -async function assessmentsGetReportDownloadUrl(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.getReportDownloadUrl( - resourceGroupName, - projectName, - groupName, - assessmentName - ); - console.log(result); -} - -async function main(): Promise { - assessmentsGetReportDownloadUrl(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsGetSample.ts deleted file mode 100644 index 5dee3706545e..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsGetSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get an existing assessment with the specified name. Returns a json object of type 'assessment' as specified in Models section. - * - * @summary Get an existing assessment with the specified name. Returns a json object of type 'assessment' as specified in Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_Get.json - */ -async function assessmentsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const assessmentName = "assessment_5_9_2019_16_22_14"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.assessments.get( - resourceGroupName, - projectName, - groupName, - assessmentName - ); - console.log(result); -} - -async function main(): Promise { - assessmentsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsListByGroupSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsListByGroupSample.ts deleted file mode 100644 index b4cace90bdad..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsListByGroupSample.ts +++ /dev/null @@ -1,52 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all assessments created for the specified group. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * - * @summary Get all assessments created for the specified group. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_ListByGroup.json - */ -async function assessmentsListByGroup(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.assessments.listByGroup( - resourceGroupName, - projectName, - groupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - assessmentsListByGroup(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsListByProjectSample.ts deleted file mode 100644 index cff531ba12ae..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/assessmentsListByProjectSample.ts +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all assessments created in the project. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * - * @summary Get all assessments created in the project. - -Returns a json array of objects of type 'assessment' as specified in Models section. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Assessments_ListByProject.json - */ -async function assessmentsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.assessments.listByProject( - resourceGroupName, - projectName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - assessmentsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessedMachinesV2OperationsGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessedMachinesV2OperationsGetSample.ts new file mode 100644 index 000000000000..6a894724d40a --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessedMachinesV2OperationsGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a AvsAssessedMachineV2 + * + * @summary get a AvsAssessedMachineV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessedMachinesV2Operations_Get_MaximumSet_Gen.json + */ +async function avsAssessedMachinesV2OperationsGetMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessedMachinesV2Operations.get( + "rgavsAssessments", + "contosoProject", + "assessmentName", + "machine1", + ); + console.log(result); +} + +async function main(): Promise { + await avsAssessedMachinesV2OperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessedMachinesV2OperationsListByParentSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessedMachinesV2OperationsListByParentSample.ts new file mode 100644 index 000000000000..951004c1f64b --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessedMachinesV2OperationsListByParentSample.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list AvsAssessedMachineV2 resources by AvsAssessmentV2 + * + * @summary list AvsAssessedMachineV2 resources by AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessedMachinesV2Operations_ListByParent_MaximumSet_Gen.json + */ +async function avsAssessedMachinesV2OperationsListByParentMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsAssessedMachinesV2Operations.listByParent( + "rgavsAssessments", + "contosoProject", + "assessmentName", + { + filter: "ozyotnnfedxreohjtgfqxmefn", + pageSize: 26, + continuationToken: "vhdrqptyyromhgz", + totalRecordCount: 7, + }, + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await avsAssessedMachinesV2OperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentV2SummaryOperationsGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentV2SummaryOperationsGetSample.ts new file mode 100644 index 000000000000..4cc9f5c73392 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentV2SummaryOperationsGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a AvsAssessmentV2Summary + * + * @summary get a AvsAssessmentV2Summary + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_Get_MaximumSet_Gen.json + */ +async function avsAssessmentV2SummaryOperationsGetMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentV2SummaryOperations.get( + "rgavsAssessments", + "contosoProject", + "assessmentName", + "PaaSPreferred", + ); + console.log(result); +} + +async function main(): Promise { + await avsAssessmentV2SummaryOperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentV2SummaryOperationsListByParentSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentV2SummaryOperationsListByParentSample.ts new file mode 100644 index 000000000000..51f415844b95 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentV2SummaryOperationsListByParentSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list AvsAssessmentV2Summary resources by AvsAssessmentV2 + * + * @summary list AvsAssessmentV2Summary resources by AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentV2SummaryOperations_ListByParent_MaximumSet_Gen.json + */ +async function avsAssessmentV2SummaryOperationsListByParentMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsAssessmentV2SummaryOperations.listByParent( + "rgavsAssessments", + "contosoProject", + "assessmentName", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await avsAssessmentV2SummaryOperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsCreateSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsCreateSample.ts new file mode 100644 index 000000000000..3efff00991c3 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsCreateSample.ts @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a AvsAssessmentV2 + * + * @summary create a AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Create_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsCreateMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentsV2Operations.create( + "rgavsAssessments", + "contosoProject", + "assessmentName", + { + properties: { + scope: { + scopeType: "ServerGroupId", + serverGroupId: "fxonspfmzfuiaepr", + azureResourceGraphQuery: "ylnfwgptlyzwzkotmunbx", + }, + settings: { + azureLocation: "actuloeieva", + currency: "Unknown", + scalingFactor: 28, + discountPercentage: 27, + sizingCriterion: "PerformanceBased", + performanceData: { + percentile: "Unknown", + timeRange: "Day", + perfDataStartTime: new Date("2025-02-21T05:36:34.751Z"), + perfDataEndTime: new Date("2025-02-21T05:36:34.751Z"), + }, + savingsSettings: { + savingsOptions: "None", + azureOfferCode: "Unknown", + }, + billingSettings: { + licensingProgram: "Retail", + subscriptionId: "xvtuenxmmjuqlhgmvev", + }, + environmentType: "Production", + failuresToTolerateAndRaidLevelList: ["Unknown"], + vcpuOversubscription: 25, + nodeTypes: ["Unknown"], + avsAssessmentScenario: "Unknown", + externalStorageTypes: ["Unknown"], + cpuHeadroom: 27, + isVcfByolEnabled: true, + memOvercommit: 11, + dedupeCompression: 26, + isStretchClusterEnabled: true, + }, + details: { status: "Created" }, + fallbackMachineAssessmentArmId: "tpjvxfcyxsgngqdxyrrfh", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await avsAssessmentsV2OperationsCreateMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsDeleteSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsDeleteSample.ts new file mode 100644 index 000000000000..7c88beedb9f0 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsDeleteSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a AvsAssessmentV2 + * + * @summary delete a AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Delete_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsDeleteMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + await client.avsAssessmentsV2Operations.delete( + "rgavsAssessments", + "contosoProject", + "assessmentName", + ); +} + +async function main(): Promise { + await avsAssessmentsV2OperationsDeleteMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsDownloadUrlSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsDownloadUrlSample.ts new file mode 100644 index 000000000000..358f0acd095e --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsDownloadUrlSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the URL for downloading the assessment in a report format. + * + * @summary get the URL for downloading the assessment in a report format. + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_DownloadUrl_MaximumSet_Gen.json + */ +async function getDownloadURLForTheAssessmentReport(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentsV2Operations.downloadUrl( + "rgavsAssessments", + "contosoProject", + "assessmentName", + {}, + ); + console.log(result); +} + +async function main(): Promise { + await getDownloadURLForTheAssessmentReport(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsGetSample.ts new file mode 100644 index 000000000000..6eeb1e1fd2aa --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a AvsAssessmentV2 + * + * @summary get a AvsAssessmentV2 + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_Get_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsGetMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsAssessmentsV2Operations.get( + "rgavsAssessments", + "contosoProject", + "assessmentName", + ); + console.log(result); +} + +async function main(): Promise { + await avsAssessmentsV2OperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsListByParentSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsListByParentSample.ts new file mode 100644 index 000000000000..30a34f3b1b11 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsAssessmentsV2OperationsListByParentSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list AvsAssessmentV2 resources by AssessmentProject + * + * @summary list AvsAssessmentV2 resources by AssessmentProject + * x-ms-original-file: 2024-03-03-preview/AvsAssessmentsV2Operations_ListByParent_MaximumSet_Gen.json + */ +async function avsAssessmentsV2OperationsListByParentMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsAssessmentsV2Operations.listByParent( + "rgavsAssessments", + "contosoProject", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await avsAssessmentsV2OperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsGraphAssessmentOptionsOperationsGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsGraphAssessmentOptionsOperationsGetSample.ts new file mode 100644 index 000000000000..8612b18797d5 --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsGraphAssessmentOptionsOperationsGetSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a AvsGraphAssessmentOptions + * + * @summary get a AvsGraphAssessmentOptions + * x-ms-original-file: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_Get_MaximumSet_Gen.json + */ +async function avsGraphAssessmentOptionsOperationsGetMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const result = await client.avsGraphAssessmentOptionsOperations.get( + "rgavsAssessments", + "contosoProject", + ); + console.log(result); +} + +async function main(): Promise { + await avsGraphAssessmentOptionsOperationsGetMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsGraphAssessmentOptionsOperationsListByParentSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsGraphAssessmentOptionsOperationsListByParentSample.ts new file mode 100644 index 000000000000..7c59bf8ba76a --- /dev/null +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/avsGraphAssessmentOptionsOperationsListByParentSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "@azure/arm-migrate"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list AvsGraphAssessmentOptions resources by AssessmentProject + * + * @summary list AvsGraphAssessmentOptions resources by AssessmentProject + * x-ms-original-file: 2024-03-03-preview/AvsGraphAssessmentOptionsOperations_ListByParent_MaximumSet_Gen.json + */ +async function avsGraphAssessmentOptionsOperationsListByParentMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "BF03674C-B4D0-4FC9-B964-175F4C6CBFDD"; + const client = new MigrateClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.avsGraphAssessmentOptionsOperations.listByParent( + "rgavsAssessments", + "contosoProject", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await avsGraphAssessmentOptionsOperationsListByParentMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsCreateSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsCreateSample.ts deleted file mode 100644 index 55720b8c16d0..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsCreateSample.ts +++ /dev/null @@ -1,59 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Group, - GroupsCreateOptionalParams, - AzureMigrateV2 -} from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new group by sending a json object of type 'group' as given in Models section as part of the Request Body. The group name in a project is unique. - -This operation is Idempotent. - - * - * @summary Create a new group by sending a json object of type 'group' as given in Models section as part of the Request Body. The group name in a project is unique. - -This operation is Idempotent. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Create.json - */ -async function groupsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Group2"; - const group: Group = { - eTag: '"1e000c2c-0000-0d00-0000-5cdaa4190000"', - properties: {} - }; - const options: GroupsCreateOptionalParams = { group }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.create( - resourceGroupName, - projectName, - groupName, - options - ); - console.log(result); -} - -async function main(): Promise { - groupsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsDeleteSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsDeleteSample.ts deleted file mode 100644 index 4ee79cc38597..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsDeleteSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the group from the project. The machines remain in the project. Deleting a non-existent group results in a no-operation. - -A group is an aggregation mechanism for machines in a project. Therefore, deleting group does not delete machines in it. - - * - * @summary Delete the group from the project. The machines remain in the project. Deleting a non-existent group results in a no-operation. - -A group is an aggregation mechanism for machines in a project. Therefore, deleting group does not delete machines in it. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Delete.json - */ -async function groupsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.delete( - resourceGroupName, - projectName, - groupName - ); - console.log(result); -} - -async function main(): Promise { - groupsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsGetSample.ts deleted file mode 100644 index ecc4f76e553c..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsGetSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get information related to a specific group in the project. Returns a json object of type 'group' as specified in the models section. - * - * @summary Get information related to a specific group in the project. Returns a json object of type 'group' as specified in the models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_Get.json - */ -async function groupsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Test1"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.get( - resourceGroupName, - projectName, - groupName - ); - console.log(result); -} - -async function main(): Promise { - groupsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsListByProjectSample.ts deleted file mode 100644 index e676bd82cd06..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsListByProjectSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all groups created in the project. Returns a json array of objects of type 'group' as specified in the Models section. - * - * @summary Get all groups created in the project. Returns a json array of objects of type 'group' as specified in the Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_ListByProject.json - */ -async function groupsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.groups.listByProject( - resourceGroupName, - projectName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - groupsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsUpdateMachinesSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsUpdateMachinesSample.ts deleted file mode 100644 index df95358147ae..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/groupsUpdateMachinesSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update machines in group by adding or removing machines. - * - * @summary Update machines in group by adding or removing machines. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Groups_UpdateMachines.json - */ -async function groupsUpdateMachines(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const groupName = "Group2"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.groups.updateMachines( - resourceGroupName, - projectName, - groupName - ); - console.log(result); -} - -async function main(): Promise { - groupsUpdateMachines(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsCreateSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsCreateSample.ts deleted file mode 100644 index ab8396ed88a0..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsCreateSample.ts +++ /dev/null @@ -1,67 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - HyperVCollector, - HyperVCollectorsCreateOptionalParams, - AzureMigrateV2 -} from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update Hyper-V collector - * - * @summary Create or Update Hyper-V collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Create.json - */ -async function hyperVCollectorsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const hyperVCollectorName = "migrateprojectce73collector"; - const collectorBody: HyperVCollector = { - eTag: '"00000981-0000-0300-0000-5d74cd5f0000"', - properties: { - agentProperties: { - spnDetails: { - applicationId: "827f1053-44dc-439f-b832-05416dcce12b", - audience: - "https://72f988bf-86f1-41af-91ab-2d7cd011db47/migrateprojectce73agentauthaadapp", - authority: - "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - objectId: "be75098e-c0fc-4ac4-98c7-282ebbcf8370", - tenantId: "72f988bf-86f1-41af-91ab-2d7cd011db47" - } - }, - discoverySiteId: - "/subscriptions/8c3c936a-c09b-4de3-830b-3f5f244d72e9/resourceGroups/ContosoITHyperV/providers/Microsoft.OffAzure/HyperVSites/migrateprojectce73site" - } - }; - const options: HyperVCollectorsCreateOptionalParams = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.hyperVCollectors.create( - resourceGroupName, - projectName, - hyperVCollectorName, - options - ); - console.log(result); -} - -async function main(): Promise { - hyperVCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsDeleteSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsDeleteSample.ts deleted file mode 100644 index 46620542dffb..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsDeleteSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Hyper-V collector from the project. - * - * @summary Delete a Hyper-V collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Delete.json - */ -async function hyperVCollectorsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const hyperVCollectorName = "migrateprojectce73collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.hyperVCollectors.delete( - resourceGroupName, - projectName, - hyperVCollectorName - ); - console.log(result); -} - -async function main(): Promise { - hyperVCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsGetSample.ts deleted file mode 100644 index 288d0fa4a766..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsGetSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Hyper-V collector. - * - * @summary Get a Hyper-V collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_Get.json - */ -async function hyperVCollectorsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const hyperVCollectorName = "migrateprojectce73collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.hyperVCollectors.get( - resourceGroupName, - projectName, - hyperVCollectorName - ); - console.log(result); -} - -async function main(): Promise { - hyperVCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsListByProjectSample.ts deleted file mode 100644 index 6bcd502c2538..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/hyperVCollectorsListByProjectSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of Hyper-V collector. - * - * @summary Get a list of Hyper-V collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/HyperVCollectors_ListByProject.json - */ -async function hyperVCollectorsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "8c3c936a-c09b-4de3-830b-3f5f244d72e9"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "contosoithyperv"; - const projectName = "migrateprojectce73project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.hyperVCollectors.listByProject( - resourceGroupName, - projectName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - hyperVCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsCreateSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsCreateSample.ts deleted file mode 100644 index a0776add5b9a..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsCreateSample.ts +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ImportCollector, - ImportCollectorsCreateOptionalParams, - AzureMigrateV2 -} from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update Import collector - * - * @summary Create or Update Import collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Create.json - */ -async function importCollectorsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const importCollectorName = "importCollector2952"; - const collectorBody: ImportCollector = { - name: "importCollector2951", - type: "Microsoft.Migrate/assessmentprojects/importcollectors", - eTag: '"000064a2-0000-3300-0000-605994800000"', - id: - "/subscriptions/31be0ff4-c932-4cb3-8efc-efa411d79280/resourceGroups/markusavstestrg/providers/Microsoft.Migrate/assessmentprojects/rajoshCCY9671project/importcollectors/importCollector2951", - properties: { - discoverySiteId: - "/subscriptions/31be0ff4-c932-4cb3-8efc-efa411d79280/resourcegroups/MarkusAVStestRG/providers/microsoft.offazure/importsites/rajoshCCY54cbimportSite" - } - }; - const options: ImportCollectorsCreateOptionalParams = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.importCollectors.create( - resourceGroupName, - projectName, - importCollectorName, - options - ); - console.log(result); -} - -async function main(): Promise { - importCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsDeleteSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsDeleteSample.ts deleted file mode 100644 index 3318d693a2c1..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsDeleteSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Import collector from the project. - * - * @summary Delete a Import collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Delete.json - */ -async function importCollectorsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const importCollectorName = "importCollector2952"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.importCollectors.delete( - resourceGroupName, - projectName, - importCollectorName - ); - console.log(result); -} - -async function main(): Promise { - importCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsGetSample.ts deleted file mode 100644 index da835dfa780f..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsGetSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Import collector. - * - * @summary Get a Import collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_Get.json - */ -async function importCollectorsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const importCollectorName = "importCollector2951"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.importCollectors.get( - resourceGroupName, - projectName, - importCollectorName - ); - console.log(result); -} - -async function main(): Promise { - importCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsListByProjectSample.ts deleted file mode 100644 index 8e0cbe522459..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/importCollectorsListByProjectSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of Import collector. - * - * @summary Get a list of Import collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ImportCollectors_ListByProject.json - */ -async function importCollectorsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "31be0ff4-c932-4cb3-8efc-efa411d79280"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "markusavstestrg"; - const projectName = "rajoshCCY9671project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.importCollectors.listByProject( - resourceGroupName, - projectName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - importCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/machinesGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/machinesGetSample.ts deleted file mode 100644 index f4d6d85a6aa1..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/machinesGetSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the machine with the specified name. Returns a json object of type 'machine' defined in Models section. - * - * @summary Get the machine with the specified name. Returns a json object of type 'machine' defined in Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Machines_Get.json - */ -async function machinesGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const machineName = "269ef295-a38d-4f8f-9779-77ce79088311"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.machines.get( - resourceGroupName, - projectName, - machineName - ); - console.log(result); -} - -async function main(): Promise { - machinesGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/machinesListByProjectSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/machinesListByProjectSample.ts deleted file mode 100644 index e16651d2e367..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/machinesListByProjectSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get data of all the machines available in the project. Returns a json array of objects of type 'machine' defined in Models section. - * - * @summary Get data of all the machines available in the project. Returns a json array of objects of type 'machine' defined in Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Machines_ListByProject.json - */ -async function machinesListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.machines.listByProject( - resourceGroupName, - projectName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - machinesListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/operationsListSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/operationsListSample.ts index 59c67e418e94..f9de8bd6b32d 100644 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/operationsListSample.ts +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/src/operationsListSample.ts @@ -1,38 +1,29 @@ -/* - * 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. - */ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; + +import { MigrateClient } from "@azure/arm-migrate"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of REST API supported by Microsoft.Migrate provider. + * This sample demonstrates how to list the operations for the provider * - * @summary Get a list of REST API supported by Microsoft.Migrate provider. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Operations_List.json + * @summary list the operations for the provider + * x-ms-original-file: 2024-03-03-preview/Operations_List_MaximumSet_Gen.json */ async function operationsList(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new MigrateClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.operations.list()) { + for await (const item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - operationsList(); + await operationsList(); } main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionDeleteSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionDeleteSample.ts deleted file mode 100644 index 935e107050be..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionDeleteSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the private endpoint connection from the project. T. - - * - * @summary Delete the private endpoint connection from the project. T. - - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Delete.json - */ -async function privateEndpointConnectionsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const privateEndpointConnectionName = - "custestpece80project3980pe.7e35576b-3df4-478e-9759-f64351cf4f43"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.delete( - resourceGroupName, - projectName, - privateEndpointConnectionName - ); - console.log(result); -} - -async function main(): Promise { - privateEndpointConnectionsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionGetSample.ts deleted file mode 100644 index 98b0814a9f1b..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionGetSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get information related to a specific private endpoint connection in the project. Returns a json object of type 'privateEndpointConnections' as specified in the models section. - * - * @summary Get information related to a specific private endpoint connection in the project. Returns a json object of type 'privateEndpointConnections' as specified in the models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Get.json - */ -async function privateEndpointConnectionsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const privateEndpointConnectionName = - "custestpece80project3980pe.7e35576b-3df4-478e-9759-f64351cf4f43"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.get( - resourceGroupName, - projectName, - privateEndpointConnectionName - ); - console.log(result); -} - -async function main(): Promise { - privateEndpointConnectionsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionListByProjectSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionListByProjectSample.ts deleted file mode 100644 index 3c8a9446227d..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionListByProjectSample.ts +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all private endpoint connections in the project. Returns a json array of objects of type 'privateEndpointConnections' as specified in the Models section. - * - * @summary Get all private endpoint connections in the project. Returns a json array of objects of type 'privateEndpointConnections' as specified in the Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_ListByProject.json - */ -async function privateEndpointConnectionsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.listByProject( - resourceGroupName, - projectName - ); - console.log(result); -} - -async function main(): Promise { - privateEndpointConnectionsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionUpdateSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionUpdateSample.ts deleted file mode 100644 index 330f3149e7c1..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateEndpointConnectionUpdateSample.ts +++ /dev/null @@ -1,62 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PrivateEndpointConnection, - PrivateEndpointConnectionUpdateOptionalParams, - AzureMigrateV2 -} from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update a specific private endpoint connection in the project. - * - * @summary Update a specific private endpoint connection in the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateEndpointConnections_Create.json - */ -async function privateEndpointConnectionsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const privateEndpointConnectionName = - "custestpece80project3980pe.7e35576b-3df4-478e-9759-f64351cf4f43"; - const privateEndpointConnectionBody: PrivateEndpointConnection = { - eTag: '"00009300-0000-0300-0000-602b967b0000"', - properties: { - privateLinkServiceConnectionState: { - description: undefined, - actionsRequired: "", - status: "Approved" - } - } - }; - const options: PrivateEndpointConnectionUpdateOptionalParams = { - privateEndpointConnectionBody - }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.update( - resourceGroupName, - projectName, - privateEndpointConnectionName, - options - ); - console.log(result); -} - -async function main(): Promise { - privateEndpointConnectionsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateLinkResourceGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateLinkResourceGetSample.ts deleted file mode 100644 index b194e444bb6b..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateLinkResourceGetSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get information related to a specific private Link Resource in the project. Returns a json object of type 'privateLinkResources' as specified in the models section. - * - * @summary Get information related to a specific private Link Resource in the project. Returns a json object of type 'privateLinkResources' as specified in the models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateLinkResources_Get.json - */ -async function privateLinkResourcesGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "madhavicus"; - const projectName = "custestpece80project"; - const privateLinkResourceName = "Default"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateLinkResourceOperations.get( - resourceGroupName, - projectName, - privateLinkResourceName - ); - console.log(result); -} - -async function main(): Promise { - privateLinkResourcesGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateLinkResourceListByProjectSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateLinkResourceListByProjectSample.ts deleted file mode 100644 index 2b474bd57443..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/privateLinkResourceListByProjectSample.ts +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all private link resources created in the project. Returns a json array of objects of type 'privateLinkResources' as specified in the Models section. - * - * @summary Get all private link resources created in the project. Returns a json array of objects of type 'privateLinkResources' as specified in the Models section. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/PrivateLinkResources_ListByProject.json - */ -async function privateLinkResourcesListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "madhavicus"; - const projectName = "custestpece80project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.privateLinkResourceOperations.listByProject( - resourceGroupName, - projectName - ); - console.log(result); -} - -async function main(): Promise { - privateLinkResourcesListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsAssessmentOptionsListSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsAssessmentOptionsListSample.ts deleted file mode 100644 index 5e1b8e4b46b1..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsAssessmentOptionsListSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets list of all available options for the properties of an assessment on a project. - * - * @summary Gets list of all available options for the properties of an assessment on a project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessmentOptions_List.json - */ -async function assessmentOptionsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.projects.listAssessmentOptionsList( - resourceGroupName, - projectName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - assessmentOptionsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsAssessmentOptionsSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsAssessmentOptionsSample.ts deleted file mode 100644 index 8ea7a5d0097a..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsAssessmentOptionsSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all available options for the properties of an assessment on a project. - * - * @summary Get all available options for the properties of an assessment on a project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/AssessmentOptions_Get.json - */ -async function assessmentOptionsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const assessmentOptionsName = "default"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.assessmentOptions( - resourceGroupName, - projectName, - assessmentOptionsName - ); - console.log(result); -} - -async function main(): Promise { - assessmentOptionsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsCreateSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsCreateSample.ts deleted file mode 100644 index 8e3619b5f110..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsCreateSample.ts +++ /dev/null @@ -1,59 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Project, - ProjectsCreateOptionalParams, - AzureMigrateV2 -} from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a project with specified name. If a project already exists, update it. - * - * @summary Create a project with specified name. If a project already exists, update it. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Create.json - */ -async function projectsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abGoyalProject2"; - const project: Project = { - eTag: "", - location: "West Europe", - properties: { - assessmentSolutionId: - "/subscriptions/6393a73f-8d55-47ef-b6dd-179b3e0c7910/resourcegroups/abgoyal-westeurope/providers/microsoft.migrate/migrateprojects/abgoyalweselfhost/Solutions/Servers-Assessment-ServerAssessment", - customerWorkspaceId: undefined, - customerWorkspaceLocation: undefined, - projectStatus: "Active" - }, - tags: {} - }; - const options: ProjectsCreateOptionalParams = { project }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.create( - resourceGroupName, - projectName, - options - ); - console.log(result); -} - -async function main(): Promise { - projectsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsDeleteSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsDeleteSample.ts deleted file mode 100644 index 324466219df6..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsDeleteSample.ts +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the project. Deleting non-existent project is a no-operation. - * - * @summary Delete the project. Deleting non-existent project is a no-operation. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Delete.json - */ -async function projectsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abGoyalProject2"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.delete(resourceGroupName, projectName); - console.log(result); -} - -async function main(): Promise { - projectsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsGetSample.ts deleted file mode 100644 index 3951ba3115ed..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsGetSample.ts +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the project with the specified name. - * - * @summary Get the project with the specified name. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Get.json - */ -async function projectsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.get(resourceGroupName, projectName); - console.log(result); -} - -async function main(): Promise { - projectsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsListBySubscriptionSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsListBySubscriptionSample.ts deleted file mode 100644 index 2c9220daa6cd..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsListBySubscriptionSample.ts +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all the projects in the subscription. - * - * @summary Get all the projects in the subscription. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ProjectsInSubscription_List.json - */ -async function projectsList(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.projects.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - projectsList(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsListSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsListSample.ts deleted file mode 100644 index 391ed6b9abd3..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsListSample.ts +++ /dev/null @@ -1,40 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all the projects in the resource group. - * - * @summary Get all the projects in the resource group. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_List.json - */ -async function projectsList(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.projects.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - projectsList(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsUpdateSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsUpdateSample.ts deleted file mode 100644 index 6ebcca0b53e5..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/projectsUpdateSample.ts +++ /dev/null @@ -1,59 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Project, - ProjectsUpdateOptionalParams, - AzureMigrateV2 -} from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update a project with specified name. Supports partial updates, for example only tags can be provided. - * - * @summary Update a project with specified name. Supports partial updates, for example only tags can be provided. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/Projects_Update.json - */ -async function projectsUpdate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abGoyalProject2"; - const project: Project = { - eTag: "", - location: "West Europe", - properties: { - assessmentSolutionId: - "/subscriptions/6393a73f-8d55-47ef-b6dd-179b3e0c7910/resourcegroups/abgoyal-westeurope/providers/microsoft.migrate/migrateprojects/abgoyalweselfhost/Solutions/Servers-Assessment-ServerAssessment", - customerWorkspaceId: undefined, - customerWorkspaceLocation: undefined, - projectStatus: "Active" - }, - tags: {} - }; - const options: ProjectsUpdateOptionalParams = { project }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.projects.update( - resourceGroupName, - projectName, - options - ); - console.log(result); -} - -async function main(): Promise { - projectsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsCreateSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsCreateSample.ts deleted file mode 100644 index 013db0358082..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsCreateSample.ts +++ /dev/null @@ -1,67 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ServerCollector, - ServerCollectorsCreateOptionalParams, - AzureMigrateV2 -} from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update Server collector - * - * @summary Create or Update Server collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Create.json - */ -async function serverCollectorsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const serverCollectorName = "app23df4collector"; - const collectorBody: ServerCollector = { - eTag: '"00000606-0000-0d00-0000-605999bf0000"', - properties: { - agentProperties: { - spnDetails: { - applicationId: "ad9f701a-cc08-4421-b51f-b5762d58e9ba", - audience: - "https://72f988bf-86f1-41af-91ab-2d7cd011db47/app23df4authandaccessaadapp", - authority: - "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - objectId: "b4975e42-9248-4a36-b99f-37eca377ea00", - tenantId: "72f988bf-86f1-41af-91ab-2d7cd011db47" - } - }, - discoverySiteId: - "/subscriptions/4bd2aa0f-2bd2-4d67-91a8-5a4533d58600/resourceGroups/pajindTest/providers/Microsoft.OffAzure/ServerSites/app21141site" - } - }; - const options: ServerCollectorsCreateOptionalParams = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.serverCollectors.create( - resourceGroupName, - projectName, - serverCollectorName, - options - ); - console.log(result); -} - -async function main(): Promise { - serverCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsDeleteSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsDeleteSample.ts deleted file mode 100644 index 52af4e38b520..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsDeleteSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Server collector from the project. - * - * @summary Delete a Server collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Delete.json - */ -async function serverCollectorsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const serverCollectorName = "app23df4collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.serverCollectors.delete( - resourceGroupName, - projectName, - serverCollectorName - ); - console.log(result); -} - -async function main(): Promise { - serverCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsGetSample.ts deleted file mode 100644 index 13df5b88f9d1..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsGetSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Server collector. - * - * @summary Get a Server collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_Get.json - */ -async function serverCollectorsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const serverCollectorName = "app23df4collector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.serverCollectors.get( - resourceGroupName, - projectName, - serverCollectorName - ); - console.log(result); -} - -async function main(): Promise { - serverCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsListByProjectSample.ts deleted file mode 100644 index a75aecba8b0c..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/serverCollectorsListByProjectSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of Server collector. - * - * @summary Get a list of Server collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/ServerCollectors_ListByProject.json - */ -async function serverCollectorsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "4bd2aa0f-2bd2-4d67-91a8-5a4533d58600"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "pajindtest"; - const projectName = "app11141project"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.serverCollectors.listByProject( - resourceGroupName, - projectName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - serverCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsCreateSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsCreateSample.ts deleted file mode 100644 index b5af3be2b91d..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsCreateSample.ts +++ /dev/null @@ -1,67 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VMwareCollector, - VMwareCollectorsCreateOptionalParams, - AzureMigrateV2 -} from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update VMware collector - * - * @summary Create or Update VMware collector - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Create.json - */ -async function vMwareCollectorsCreate(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const vmWareCollectorName = "PortalvCenterbc2fcollector"; - const collectorBody: VMwareCollector = { - eTag: '"01003d32-0000-0d00-0000-5d74d2e50000"', - properties: { - agentProperties: { - spnDetails: { - applicationId: "fc717575-8173-4b21-92a5-658b655e613e", - audience: - "https://72f988bf-86f1-41af-91ab-2d7cd011db47/PortalvCenterbc2fagentauthaadapp", - authority: - "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - objectId: "29d94f38-db94-4980-aec0-0cfd55ab1cd0", - tenantId: "72f988bf-86f1-41af-91ab-2d7cd011db47" - } - }, - discoverySiteId: - "/subscriptions/6393a73f-8d55-47ef-b6dd-179b3e0c7910/resourceGroups/abgoyal-westEurope/providers/Microsoft.OffAzure/VMwareSites/PortalvCenterbc2fsite" - } - }; - const options: VMwareCollectorsCreateOptionalParams = { collectorBody }; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.vMwareCollectors.create( - resourceGroupName, - projectName, - vmWareCollectorName, - options - ); - console.log(result); -} - -async function main(): Promise { - vMwareCollectorsCreate(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsDeleteSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsDeleteSample.ts deleted file mode 100644 index f6ba0286372c..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsDeleteSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a VMware collector from the project. - * - * @summary Delete a VMware collector from the project. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Delete.json - */ -async function vMwareCollectorsDelete(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const vmWareCollectorName = "PortalvCenterbc2fcollector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.vMwareCollectors.delete( - resourceGroupName, - projectName, - vmWareCollectorName - ); - console.log(result); -} - -async function main(): Promise { - vMwareCollectorsDelete(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsGetSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsGetSample.ts deleted file mode 100644 index 720e40eaaee4..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsGetSample.ts +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a VMware collector. - * - * @summary Get a VMware collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_Get.json - */ -async function vMwareCollectorsGet(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const vmWareCollectorName = "PortalvCenterbc2fcollector"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const result = await client.vMwareCollectors.get( - resourceGroupName, - projectName, - vmWareCollectorName - ); - console.log(result); -} - -async function main(): Promise { - vMwareCollectorsGet(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsListByProjectSample.ts b/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsListByProjectSample.ts deleted file mode 100644 index 4f517f4b9818..000000000000 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/src/vMwareCollectorsListByProjectSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureMigrateV2 } from "@azure/arm-migrate"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of VMware collector. - * - * @summary Get a list of VMware collector. - * x-ms-original-file: specification/migrate/resource-manager/Microsoft.Migrate/stable/2019-10-01/examples/VMwareCollectors_ListByProject.json - */ -async function vMwareCollectorsListByProject(): Promise { - const subscriptionId = - process.env["MIGRATE_SUBSCRIPTION_ID"] || - "6393a73f-8d55-47ef-b6dd-179b3e0c7910"; - const resourceGroupName = - process.env["MIGRATE_RESOURCE_GROUP"] || "abgoyal-westEurope"; - const projectName = "abgoyalWEselfhostb72bproject"; - const credential = new DefaultAzureCredential(); - const client = new AzureMigrateV2(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.vMwareCollectors.listByProject( - resourceGroupName, - projectName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - vMwareCollectorsListByProject(); -} - -main().catch(console.error); diff --git a/sdk/migrate/arm-migrate/samples/v2/typescript/tsconfig.json b/sdk/migrate/arm-migrate/samples/v2/typescript/tsconfig.json index 984eed535aa8..400db87cf648 100644 --- a/sdk/migrate/arm-migrate/samples/v2/typescript/tsconfig.json +++ b/sdk/migrate/arm-migrate/samples/v2/typescript/tsconfig.json @@ -1,17 +1,20 @@ { "compilerOptions": { - "target": "ES2020", + "target": "ES2023", "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, + "lib": [], + "importHelpers": true, "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "moduleResolution": "node10", + "esModuleInterop": true, + "outDir": "./dist", + "resolveJsonModule": true }, "include": [ - "src/**/*.ts" + "./src" ] } diff --git a/sdk/migrate/arm-migrate/src/api/avsAssessedMachinesV2Operations/index.ts b/sdk/migrate/arm-migrate/src/api/avsAssessedMachinesV2Operations/index.ts new file mode 100644 index 000000000000..1d175d150a0c --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsAssessedMachinesV2Operations/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByParent, get } from "./operations.js"; +export { + AvsAssessedMachinesV2OperationsListByParentOptionalParams, + AvsAssessedMachinesV2OperationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/migrate/arm-migrate/src/api/avsAssessedMachinesV2Operations/operations.ts b/sdk/migrate/arm-migrate/src/api/avsAssessedMachinesV2Operations/operations.ts new file mode 100644 index 000000000000..4e541d46a6f9 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsAssessedMachinesV2Operations/operations.ts @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + AvsAssessedMachineV2, + avsAssessedMachineV2Deserializer, + _AvsAssessedMachineV2ListResult, + _avsAssessedMachineV2ListResultDeserializer, +} from "../../models/models.js"; +import { + AvsAssessedMachinesV2OperationsListByParentOptionalParams, + AvsAssessedMachinesV2OperationsGetOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByParentSend( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + options: AvsAssessedMachinesV2OperationsListByParentOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessments/{assessmentName}/avsAssessedMachines{?api%2Dversion,%24filter,pageSize,continuationToken,totalRecordCount}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + projectName: projectName, + assessmentName: assessmentName, + "api%2Dversion": context.apiVersion, + "%24filter": options?.filter, + pageSize: options?.pageSize, + continuationToken: options?.continuationToken, + totalRecordCount: options?.totalRecordCount, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listByParentDeserialize( + result: PathUncheckedResponse, +): Promise<_AvsAssessedMachineV2ListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _avsAssessedMachineV2ListResultDeserializer(result.body); +} + +/** List AvsAssessedMachineV2 resources by AvsAssessmentV2 */ +export function listByParent( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + options: AvsAssessedMachinesV2OperationsListByParentOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByParentSend(context, resourceGroupName, projectName, assessmentName, options), + _listByParentDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + avsAssessedMachineName: string, + options: AvsAssessedMachinesV2OperationsGetOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessments/{assessmentName}/avsAssessedMachines/{avsAssessedMachineName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + projectName: projectName, + assessmentName: assessmentName, + avsAssessedMachineName: avsAssessedMachineName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return avsAssessedMachineV2Deserializer(result.body); +} + +/** Get a AvsAssessedMachineV2 */ +export async function get( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + avsAssessedMachineName: string, + options: AvsAssessedMachinesV2OperationsGetOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + projectName, + assessmentName, + avsAssessedMachineName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/migrate/arm-migrate/src/api/avsAssessedMachinesV2Operations/options.ts b/sdk/migrate/arm-migrate/src/api/avsAssessedMachinesV2Operations/options.ts new file mode 100644 index 000000000000..cb081a32cf1a --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsAssessedMachinesV2Operations/options.ts @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AvsAssessedMachinesV2OperationsListByParentOptionalParams + extends OperationOptions { + /** Filter query. */ + filter?: string; + /** Optional parameter for page size. */ + pageSize?: number; + /** Optional parameter for continuation token. */ + continuationToken?: string; + /** Total record count. */ + totalRecordCount?: number; +} + +/** Optional parameters. */ +export interface AvsAssessedMachinesV2OperationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/migrate/arm-migrate/src/api/avsAssessmentV2SummaryOperations/index.ts b/sdk/migrate/arm-migrate/src/api/avsAssessmentV2SummaryOperations/index.ts new file mode 100644 index 000000000000..103798d91f51 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsAssessmentV2SummaryOperations/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByParent, get } from "./operations.js"; +export { + AvsAssessmentV2SummaryOperationsListByParentOptionalParams, + AvsAssessmentV2SummaryOperationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/migrate/arm-migrate/src/api/avsAssessmentV2SummaryOperations/operations.ts b/sdk/migrate/arm-migrate/src/api/avsAssessmentV2SummaryOperations/operations.ts new file mode 100644 index 000000000000..2a7612578c5c --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsAssessmentV2SummaryOperations/operations.ts @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + AvsAssessmentV2Summary, + avsAssessmentV2SummaryDeserializer, + _AvsAssessmentV2SummaryListResult, + _avsAssessmentV2SummaryListResultDeserializer, +} from "../../models/models.js"; +import { + AvsAssessmentV2SummaryOperationsListByParentOptionalParams, + AvsAssessmentV2SummaryOperationsGetOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByParentSend( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + options: AvsAssessmentV2SummaryOperationsListByParentOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessments/{assessmentName}/summaries{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + projectName: projectName, + assessmentName: assessmentName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listByParentDeserialize( + result: PathUncheckedResponse, +): Promise<_AvsAssessmentV2SummaryListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _avsAssessmentV2SummaryListResultDeserializer(result.body); +} + +/** List AvsAssessmentV2Summary resources by AvsAssessmentV2 */ +export function listByParent( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + options: AvsAssessmentV2SummaryOperationsListByParentOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByParentSend(context, resourceGroupName, projectName, assessmentName, options), + _listByParentDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + summaryName: string, + options: AvsAssessmentV2SummaryOperationsGetOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessments/{assessmentName}/summaries/{summaryName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + projectName: projectName, + assessmentName: assessmentName, + summaryName: summaryName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return avsAssessmentV2SummaryDeserializer(result.body); +} + +/** Get a AvsAssessmentV2Summary */ +export async function get( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + summaryName: string, + options: AvsAssessmentV2SummaryOperationsGetOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + projectName, + assessmentName, + summaryName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/migrate/arm-migrate/src/api/avsAssessmentV2SummaryOperations/options.ts b/sdk/migrate/arm-migrate/src/api/avsAssessmentV2SummaryOperations/options.ts new file mode 100644 index 000000000000..9dbd5f974ad5 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsAssessmentV2SummaryOperations/options.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AvsAssessmentV2SummaryOperationsListByParentOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface AvsAssessmentV2SummaryOperationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/migrate/arm-migrate/src/api/avsAssessmentsV2Operations/index.ts b/sdk/migrate/arm-migrate/src/api/avsAssessmentsV2Operations/index.ts new file mode 100644 index 000000000000..1605fc74c387 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsAssessmentsV2Operations/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { downloadUrl, $delete, create, listByParent, get } from "./operations.js"; +export { + AvsAssessmentsV2OperationsDownloadUrlOptionalParams, + AvsAssessmentsV2OperationsDeleteOptionalParams, + AvsAssessmentsV2OperationsCreateOptionalParams, + AvsAssessmentsV2OperationsListByParentOptionalParams, + AvsAssessmentsV2OperationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/migrate/arm-migrate/src/api/avsAssessmentsV2Operations/operations.ts b/sdk/migrate/arm-migrate/src/api/avsAssessmentsV2Operations/operations.ts new file mode 100644 index 000000000000..4e11e2df37d0 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsAssessmentsV2Operations/operations.ts @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + AvsAssessmentV2, + avsAssessmentV2Serializer, + avsAssessmentV2Deserializer, + _AvsAssessmentV2ListResult, + _avsAssessmentV2ListResultDeserializer, + _downloadUrlRequestSerializer, + DownloadUrl, + downloadUrlDeserializer, +} from "../../models/models.js"; +import { + AvsAssessmentsV2OperationsDownloadUrlOptionalParams, + AvsAssessmentsV2OperationsDeleteOptionalParams, + AvsAssessmentsV2OperationsCreateOptionalParams, + AvsAssessmentsV2OperationsListByParentOptionalParams, + AvsAssessmentsV2OperationsGetOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _downloadUrlSend( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + body: Record, + options: AvsAssessmentsV2OperationsDownloadUrlOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessments/{assessmentName}/downloadUrl{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + projectName: projectName, + assessmentName: assessmentName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: _downloadUrlRequestSerializer(body), + }); +} + +export async function _downloadUrlDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return downloadUrlDeserializer(result.body); +} + +/** Get the URL for downloading the assessment in a report format. */ +export function downloadUrl( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + body: Record, + options: AvsAssessmentsV2OperationsDownloadUrlOptionalParams = { + requestOptions: {}, + }, +): PollerLike, DownloadUrl> { + return getLongRunningPoller(context, _downloadUrlDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _downloadUrlSend(context, resourceGroupName, projectName, assessmentName, body, options), + resourceLocationConfig: "location", + }) as PollerLike, DownloadUrl>; +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + options: AvsAssessmentsV2OperationsDeleteOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessments/{assessmentName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + projectName: projectName, + assessmentName: assessmentName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a AvsAssessmentV2 */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export async function $delete( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + options: AvsAssessmentsV2OperationsDeleteOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + projectName, + assessmentName, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createSend( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + resource: AvsAssessmentV2, + options: AvsAssessmentsV2OperationsCreateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessments/{assessmentName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + projectName: projectName, + assessmentName: assessmentName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: avsAssessmentV2Serializer(resource), + }); +} + +export async function _createDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return avsAssessmentV2Deserializer(result.body); +} + +/** Create a AvsAssessmentV2 */ +export function create( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + resource: AvsAssessmentV2, + options: AvsAssessmentsV2OperationsCreateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, AvsAssessmentV2> { + return getLongRunningPoller(context, _createDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createSend(context, resourceGroupName, projectName, assessmentName, resource, options), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, AvsAssessmentV2>; +} + +export function _listByParentSend( + context: Client, + resourceGroupName: string, + projectName: string, + options: AvsAssessmentsV2OperationsListByParentOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessments{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + projectName: projectName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listByParentDeserialize( + result: PathUncheckedResponse, +): Promise<_AvsAssessmentV2ListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _avsAssessmentV2ListResultDeserializer(result.body); +} + +/** List AvsAssessmentV2 resources by AssessmentProject */ +export function listByParent( + context: Client, + resourceGroupName: string, + projectName: string, + options: AvsAssessmentsV2OperationsListByParentOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByParentSend(context, resourceGroupName, projectName, options), + _listByParentDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + options: AvsAssessmentsV2OperationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessments/{assessmentName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + projectName: projectName, + assessmentName: assessmentName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return avsAssessmentV2Deserializer(result.body); +} + +/** Get a AvsAssessmentV2 */ +export async function get( + context: Client, + resourceGroupName: string, + projectName: string, + assessmentName: string, + options: AvsAssessmentsV2OperationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, projectName, assessmentName, options); + return _getDeserialize(result); +} diff --git a/sdk/migrate/arm-migrate/src/api/avsAssessmentsV2Operations/options.ts b/sdk/migrate/arm-migrate/src/api/avsAssessmentsV2Operations/options.ts new file mode 100644 index 000000000000..9491752914ff --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsAssessmentsV2Operations/options.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AvsAssessmentsV2OperationsDownloadUrlOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AvsAssessmentsV2OperationsDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AvsAssessmentsV2OperationsCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AvsAssessmentsV2OperationsListByParentOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AvsAssessmentsV2OperationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/migrate/arm-migrate/src/api/avsGraphAssessmentOptionsOperations/index.ts b/sdk/migrate/arm-migrate/src/api/avsGraphAssessmentOptionsOperations/index.ts new file mode 100644 index 000000000000..be184f2eff1d --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsGraphAssessmentOptionsOperations/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByParent, get } from "./operations.js"; +export { + AvsGraphAssessmentOptionsOperationsListByParentOptionalParams, + AvsGraphAssessmentOptionsOperationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/migrate/arm-migrate/src/api/avsGraphAssessmentOptionsOperations/operations.ts b/sdk/migrate/arm-migrate/src/api/avsGraphAssessmentOptionsOperations/operations.ts new file mode 100644 index 000000000000..617703c77869 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsGraphAssessmentOptionsOperations/operations.ts @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + AvsGraphAssessmentOptions, + avsGraphAssessmentOptionsDeserializer, + _AvsGraphAssessmentOptionsListResult, + _avsGraphAssessmentOptionsListResultDeserializer, +} from "../../models/models.js"; +import { + AvsGraphAssessmentOptionsOperationsListByParentOptionalParams, + AvsGraphAssessmentOptionsOperationsGetOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByParentSend( + context: Client, + resourceGroupName: string, + projectName: string, + options: AvsGraphAssessmentOptionsOperationsListByParentOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessmentOptions{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + projectName: projectName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listByParentDeserialize( + result: PathUncheckedResponse, +): Promise<_AvsGraphAssessmentOptionsListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _avsGraphAssessmentOptionsListResultDeserializer(result.body); +} + +/** List AvsGraphAssessmentOptions resources by AssessmentProject */ +export function listByParent( + context: Client, + resourceGroupName: string, + projectName: string, + options: AvsGraphAssessmentOptionsOperationsListByParentOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByParentSend(context, resourceGroupName, projectName, options), + _listByParentDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + projectName: string, + options: AvsGraphAssessmentOptionsOperationsGetOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessmentOptions/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + projectName: projectName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return avsGraphAssessmentOptionsDeserializer(result.body); +} + +/** Get a AvsGraphAssessmentOptions */ +export async function get( + context: Client, + resourceGroupName: string, + projectName: string, + options: AvsGraphAssessmentOptionsOperationsGetOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getSend(context, resourceGroupName, projectName, options); + return _getDeserialize(result); +} diff --git a/sdk/migrate/arm-migrate/src/api/avsGraphAssessmentOptionsOperations/options.ts b/sdk/migrate/arm-migrate/src/api/avsGraphAssessmentOptionsOperations/options.ts new file mode 100644 index 000000000000..3f32b26b7f19 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/avsGraphAssessmentOptionsOperations/options.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AvsGraphAssessmentOptionsOperationsListByParentOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface AvsGraphAssessmentOptionsOperationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/migrate/arm-migrate/src/api/index.ts b/sdk/migrate/arm-migrate/src/api/index.ts new file mode 100644 index 000000000000..e65023a1a21f --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/index.ts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { createMigrate, MigrateContext, MigrateClientOptionalParams } from "./migrateContext.js"; diff --git a/sdk/migrate/arm-migrate/src/api/migrateContext.ts b/sdk/migrate/arm-migrate/src/api/migrateContext.ts new file mode 100644 index 000000000000..399a93dc7fad --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/migrateContext.ts @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { logger } from "../logger.js"; +import { KnownAvsApiVersions } from "../models/models.js"; +import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; +import { TokenCredential } from "@azure/core-auth"; + +/** Azure Migrate Resource Provider management API. */ +export interface MigrateContext extends Client { + /** The API version to use for this operation. */ + /** Known values of {@link KnownAvsApiVersions} that the service accepts. */ + apiVersion: string; + /** The ID of the target subscription. The value must be an UUID. */ + subscriptionId: string; +} + +/** Optional parameters for the client. */ +export interface MigrateClientOptionalParams extends ClientOptions { + /** The API version to use for this operation. */ + /** Known values of {@link KnownAvsApiVersions} that the service accepts. */ + apiVersion?: string; +} + +/** Azure Migrate Resource Provider management API. */ +export function createMigrate( + credential: TokenCredential, + subscriptionId: string, + options: MigrateClientOptionalParams = {}, +): MigrateContext { + const endpointUrl = options.endpoint ?? options.baseUrl ?? "https://management.azure.com"; + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentInfo = `azsdk-js-arm-migrate/3.0.0-beta.1`; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` + : `azsdk-js-api ${userAgentInfo}`; + const { apiVersion: _, ...updatedOptions } = { + ...options, + userAgentOptions: { userAgentPrefix }, + loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info }, + credentials: { + scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`], + }, + }; + const clientContext = getClient(endpointUrl, credential, updatedOptions); + clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + const apiVersion = options.apiVersion ?? "2024-03-03-preview"; + clientContext.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version")) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); + return { ...clientContext, apiVersion, subscriptionId } as MigrateContext; +} diff --git a/sdk/migrate/arm-migrate/src/api/operations/index.ts b/sdk/migrate/arm-migrate/src/api/operations/index.ts new file mode 100644 index 000000000000..24a804d14fcf --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/operations/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export { OperationsListOptionalParams } from "./options.js"; diff --git a/sdk/migrate/arm-migrate/src/api/operations/operations.ts b/sdk/migrate/arm-migrate/src/api/operations/operations.ts new file mode 100644 index 000000000000..5a4496d04856 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/operations/operations.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateContext as Client } from "../index.js"; +import { + _OperationListResult, + _operationListResultDeserializer, + Operation, + errorResponseDeserializer, +} from "../../models/models.js"; +import { OperationsListOptionalParams } from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/providers/Microsoft.Migrate/operations{?api%2Dversion}", + { + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _operationListResultDeserializer(result.body); +} + +/** List the operations for the provider */ +export function list( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/migrate/arm-migrate/src/api/operations/options.ts b/sdk/migrate/arm-migrate/src/api/operations/options.ts new file mode 100644 index 000000000000..c461016ad1c5 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/api/operations/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams extends OperationOptions {} diff --git a/sdk/migrate/arm-migrate/src/azureMigrateV2.ts b/sdk/migrate/arm-migrate/src/azureMigrateV2.ts deleted file mode 100644 index 831edf856eea..000000000000 --- a/sdk/migrate/arm-migrate/src/azureMigrateV2.ts +++ /dev/null @@ -1,192 +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 coreClient from "@azure/core-client"; -import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import { - PipelineRequest, - PipelineResponse, - SendRequest -} from "@azure/core-rest-pipeline"; -import * as coreAuth from "@azure/core-auth"; -import { - ProjectsImpl, - MachinesImpl, - GroupsImpl, - AssessmentsImpl, - AssessedMachinesImpl, - HyperVCollectorsImpl, - ServerCollectorsImpl, - VMwareCollectorsImpl, - ImportCollectorsImpl, - PrivateEndpointConnectionOperationsImpl, - PrivateLinkResourceOperationsImpl, - OperationsImpl -} from "./operations/index.js"; -import { - Projects, - Machines, - Groups, - Assessments, - AssessedMachines, - HyperVCollectors, - ServerCollectors, - VMwareCollectors, - ImportCollectors, - PrivateEndpointConnectionOperations, - PrivateLinkResourceOperations, - Operations -} from "./operationsInterfaces/index.js"; -import { AzureMigrateV2OptionalParams } from "./models/index.js"; - -export class AzureMigrateV2 extends coreClient.ServiceClient { - $host: string; - subscriptionId: string; - apiVersion: string; - - /** - * Initializes a new instance of the AzureMigrateV2 class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId Azure Subscription Id in which project was created. - * @param options The parameter options - */ - constructor( - credentials: coreAuth.TokenCredential, - subscriptionId: string, - options?: AzureMigrateV2OptionalParams - ) { - 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: AzureMigrateV2OptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials - }; - - const packageDetails = `azsdk-js-arm-migrate/2.0.4`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - const optionsWithDefaults = { - ...defaults, - ...options, - userAgentOptions: { - userAgentPrefix - }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" - }; - super(optionsWithDefaults); - - let bearerTokenAuthenticationPolicyFound: boolean = false; - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName - ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: - optionsWithDefaults.credentialScopes ?? - `${optionsWithDefaults.endpoint}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } - // Parameter assignments - this.subscriptionId = subscriptionId; - - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2019-10-01"; - this.projects = new ProjectsImpl(this); - this.machines = new MachinesImpl(this); - this.groups = new GroupsImpl(this); - this.assessments = new AssessmentsImpl(this); - this.assessedMachines = new AssessedMachinesImpl(this); - this.hyperVCollectors = new HyperVCollectorsImpl(this); - this.serverCollectors = new ServerCollectorsImpl(this); - this.vMwareCollectors = new VMwareCollectorsImpl(this); - this.importCollectors = new ImportCollectorsImpl(this); - this.privateEndpointConnectionOperations = new PrivateEndpointConnectionOperationsImpl( - this - ); - this.privateLinkResourceOperations = new PrivateLinkResourceOperationsImpl( - this - ); - this.operations = new OperationsImpl(this); - this.addCustomApiVersionPolicy(options.apiVersion); - } - - /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ - private addCustomApiVersionPolicy(apiVersion?: string) { - if (!apiVersion) { - return; - } - const apiVersionPolicy = { - name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest - ): Promise { - const param = request.url.split("?"); - if (param.length > 1) { - const newParams = param[1].split("&").map((item) => { - if (item.indexOf("api-version") > -1) { - return "api-version=" + apiVersion; - } else { - return item; - } - }); - request.url = param[0] + "?" + newParams.join("&"); - } - return next(request); - } - }; - this.pipeline.addPolicy(apiVersionPolicy); - } - - projects: Projects; - machines: Machines; - groups: Groups; - assessments: Assessments; - assessedMachines: AssessedMachines; - hyperVCollectors: HyperVCollectors; - serverCollectors: ServerCollectors; - vMwareCollectors: VMwareCollectors; - importCollectors: ImportCollectors; - privateEndpointConnectionOperations: PrivateEndpointConnectionOperations; - privateLinkResourceOperations: PrivateLinkResourceOperations; - operations: Operations; -} diff --git a/sdk/migrate/arm-migrate/src/classic/avsAssessedMachinesV2Operations/index.ts b/sdk/migrate/arm-migrate/src/classic/avsAssessedMachinesV2Operations/index.ts new file mode 100644 index 000000000000..bb7182eb82f5 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/classic/avsAssessedMachinesV2Operations/index.ts @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateContext } from "../../api/migrateContext.js"; +import { AvsAssessedMachineV2 } from "../../models/models.js"; +import { + AvsAssessedMachinesV2OperationsListByParentOptionalParams, + AvsAssessedMachinesV2OperationsGetOptionalParams, +} from "../../api/avsAssessedMachinesV2Operations/options.js"; +import { listByParent, get } from "../../api/avsAssessedMachinesV2Operations/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AvsAssessedMachinesV2Operations operations. */ +export interface AvsAssessedMachinesV2OperationsOperations { + /** List AvsAssessedMachineV2 resources by AvsAssessmentV2 */ + listByParent: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + options?: AvsAssessedMachinesV2OperationsListByParentOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a AvsAssessedMachineV2 */ + get: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + avsAssessedMachineName: string, + options?: AvsAssessedMachinesV2OperationsGetOptionalParams, + ) => Promise; +} + +function _getAvsAssessedMachinesV2Operations(context: MigrateContext) { + return { + listByParent: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + options?: AvsAssessedMachinesV2OperationsListByParentOptionalParams, + ) => listByParent(context, resourceGroupName, projectName, assessmentName, options), + get: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + avsAssessedMachineName: string, + options?: AvsAssessedMachinesV2OperationsGetOptionalParams, + ) => + get(context, resourceGroupName, projectName, assessmentName, avsAssessedMachineName, options), + }; +} + +export function _getAvsAssessedMachinesV2OperationsOperations( + context: MigrateContext, +): AvsAssessedMachinesV2OperationsOperations { + return { + ..._getAvsAssessedMachinesV2Operations(context), + }; +} diff --git a/sdk/migrate/arm-migrate/src/classic/avsAssessmentV2SummaryOperations/index.ts b/sdk/migrate/arm-migrate/src/classic/avsAssessmentV2SummaryOperations/index.ts new file mode 100644 index 000000000000..642f7d1ecea7 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/classic/avsAssessmentV2SummaryOperations/index.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateContext } from "../../api/migrateContext.js"; +import { AvsAssessmentV2Summary } from "../../models/models.js"; +import { + AvsAssessmentV2SummaryOperationsListByParentOptionalParams, + AvsAssessmentV2SummaryOperationsGetOptionalParams, +} from "../../api/avsAssessmentV2SummaryOperations/options.js"; +import { listByParent, get } from "../../api/avsAssessmentV2SummaryOperations/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AvsAssessmentV2SummaryOperations operations. */ +export interface AvsAssessmentV2SummaryOperationsOperations { + /** List AvsAssessmentV2Summary resources by AvsAssessmentV2 */ + listByParent: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + options?: AvsAssessmentV2SummaryOperationsListByParentOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a AvsAssessmentV2Summary */ + get: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + summaryName: string, + options?: AvsAssessmentV2SummaryOperationsGetOptionalParams, + ) => Promise; +} + +function _getAvsAssessmentV2SummaryOperations(context: MigrateContext) { + return { + listByParent: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + options?: AvsAssessmentV2SummaryOperationsListByParentOptionalParams, + ) => listByParent(context, resourceGroupName, projectName, assessmentName, options), + get: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + summaryName: string, + options?: AvsAssessmentV2SummaryOperationsGetOptionalParams, + ) => get(context, resourceGroupName, projectName, assessmentName, summaryName, options), + }; +} + +export function _getAvsAssessmentV2SummaryOperationsOperations( + context: MigrateContext, +): AvsAssessmentV2SummaryOperationsOperations { + return { + ..._getAvsAssessmentV2SummaryOperations(context), + }; +} diff --git a/sdk/migrate/arm-migrate/src/classic/avsAssessmentsV2Operations/index.ts b/sdk/migrate/arm-migrate/src/classic/avsAssessmentsV2Operations/index.ts new file mode 100644 index 000000000000..3f706400be44 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/classic/avsAssessmentsV2Operations/index.ts @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateContext } from "../../api/migrateContext.js"; +import { AvsAssessmentV2, DownloadUrl } from "../../models/models.js"; +import { + AvsAssessmentsV2OperationsDownloadUrlOptionalParams, + AvsAssessmentsV2OperationsDeleteOptionalParams, + AvsAssessmentsV2OperationsCreateOptionalParams, + AvsAssessmentsV2OperationsListByParentOptionalParams, + AvsAssessmentsV2OperationsGetOptionalParams, +} from "../../api/avsAssessmentsV2Operations/options.js"; +import { + downloadUrl, + $delete, + create, + listByParent, + get, +} from "../../api/avsAssessmentsV2Operations/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a AvsAssessmentsV2Operations operations. */ +export interface AvsAssessmentsV2OperationsOperations { + /** Get the URL for downloading the assessment in a report format. */ + downloadUrl: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + body: Record, + options?: AvsAssessmentsV2OperationsDownloadUrlOptionalParams, + ) => PollerLike, DownloadUrl>; + /** Delete a AvsAssessmentV2 */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + options?: AvsAssessmentsV2OperationsDeleteOptionalParams, + ) => Promise; + /** Create a AvsAssessmentV2 */ + create: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + resource: AvsAssessmentV2, + options?: AvsAssessmentsV2OperationsCreateOptionalParams, + ) => PollerLike, AvsAssessmentV2>; + /** List AvsAssessmentV2 resources by AssessmentProject */ + listByParent: ( + resourceGroupName: string, + projectName: string, + options?: AvsAssessmentsV2OperationsListByParentOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a AvsAssessmentV2 */ + get: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + options?: AvsAssessmentsV2OperationsGetOptionalParams, + ) => Promise; +} + +function _getAvsAssessmentsV2Operations(context: MigrateContext) { + return { + downloadUrl: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + body: Record, + options?: AvsAssessmentsV2OperationsDownloadUrlOptionalParams, + ) => downloadUrl(context, resourceGroupName, projectName, assessmentName, body, options), + delete: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + options?: AvsAssessmentsV2OperationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, projectName, assessmentName, options), + create: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + resource: AvsAssessmentV2, + options?: AvsAssessmentsV2OperationsCreateOptionalParams, + ) => create(context, resourceGroupName, projectName, assessmentName, resource, options), + listByParent: ( + resourceGroupName: string, + projectName: string, + options?: AvsAssessmentsV2OperationsListByParentOptionalParams, + ) => listByParent(context, resourceGroupName, projectName, options), + get: ( + resourceGroupName: string, + projectName: string, + assessmentName: string, + options?: AvsAssessmentsV2OperationsGetOptionalParams, + ) => get(context, resourceGroupName, projectName, assessmentName, options), + }; +} + +export function _getAvsAssessmentsV2OperationsOperations( + context: MigrateContext, +): AvsAssessmentsV2OperationsOperations { + return { + ..._getAvsAssessmentsV2Operations(context), + }; +} diff --git a/sdk/migrate/arm-migrate/src/classic/avsGraphAssessmentOptionsOperations/index.ts b/sdk/migrate/arm-migrate/src/classic/avsGraphAssessmentOptionsOperations/index.ts new file mode 100644 index 000000000000..bf807933c7b0 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/classic/avsGraphAssessmentOptionsOperations/index.ts @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateContext } from "../../api/migrateContext.js"; +import { AvsGraphAssessmentOptions } from "../../models/models.js"; +import { + AvsGraphAssessmentOptionsOperationsListByParentOptionalParams, + AvsGraphAssessmentOptionsOperationsGetOptionalParams, +} from "../../api/avsGraphAssessmentOptionsOperations/options.js"; +import { listByParent, get } from "../../api/avsGraphAssessmentOptionsOperations/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AvsGraphAssessmentOptionsOperations operations. */ +export interface AvsGraphAssessmentOptionsOperationsOperations { + /** List AvsGraphAssessmentOptions resources by AssessmentProject */ + listByParent: ( + resourceGroupName: string, + projectName: string, + options?: AvsGraphAssessmentOptionsOperationsListByParentOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a AvsGraphAssessmentOptions */ + get: ( + resourceGroupName: string, + projectName: string, + options?: AvsGraphAssessmentOptionsOperationsGetOptionalParams, + ) => Promise; +} + +function _getAvsGraphAssessmentOptionsOperations(context: MigrateContext) { + return { + listByParent: ( + resourceGroupName: string, + projectName: string, + options?: AvsGraphAssessmentOptionsOperationsListByParentOptionalParams, + ) => listByParent(context, resourceGroupName, projectName, options), + get: ( + resourceGroupName: string, + projectName: string, + options?: AvsGraphAssessmentOptionsOperationsGetOptionalParams, + ) => get(context, resourceGroupName, projectName, options), + }; +} + +export function _getAvsGraphAssessmentOptionsOperationsOperations( + context: MigrateContext, +): AvsGraphAssessmentOptionsOperationsOperations { + return { + ..._getAvsGraphAssessmentOptionsOperations(context), + }; +} diff --git a/sdk/migrate/arm-migrate/src/classic/index.ts b/sdk/migrate/arm-migrate/src/classic/index.ts new file mode 100644 index 000000000000..d05526134295 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/classic/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { AvsAssessedMachinesV2OperationsOperations } from "./avsAssessedMachinesV2Operations/index.js"; +export { AvsAssessmentsV2OperationsOperations } from "./avsAssessmentsV2Operations/index.js"; +export { AvsAssessmentV2SummaryOperationsOperations } from "./avsAssessmentV2SummaryOperations/index.js"; +export { AvsGraphAssessmentOptionsOperationsOperations } from "./avsGraphAssessmentOptionsOperations/index.js"; +export { OperationsOperations } from "./operations/index.js"; diff --git a/sdk/migrate/arm-migrate/src/classic/operations/index.ts b/sdk/migrate/arm-migrate/src/classic/operations/index.ts new file mode 100644 index 000000000000..6e74d6b5db7f --- /dev/null +++ b/sdk/migrate/arm-migrate/src/classic/operations/index.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateContext } from "../../api/migrateContext.js"; +import { Operation } from "../../models/models.js"; +import { OperationsListOptionalParams } from "../../api/operations/options.js"; +import { list } from "../../api/operations/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Operations operations. */ +export interface OperationsOperations { + /** List the operations for the provider */ + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; +} + +function _getOperations(context: MigrateContext) { + return { + list: (options?: OperationsListOptionalParams) => list(context, options), + }; +} + +export function _getOperationsOperations(context: MigrateContext): OperationsOperations { + return { + ..._getOperations(context), + }; +} diff --git a/sdk/migrate/arm-migrate/src/index.ts b/sdk/migrate/arm-migrate/src/index.ts index 6c37cfc449dc..c40c6f62ad3c 100644 --- a/sdk/migrate/arm-migrate/src/index.ts +++ b/sdk/migrate/arm-migrate/src/index.ts @@ -1,13 +1,180 @@ -/* - * 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. - */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. -/// -export { getContinuationToken } from "./pagingHelper.js"; -export * from "./models/index.js"; -export { AzureMigrateV2 } from "./azureMigrateV2.js"; -export * from "./operationsInterfaces/index.js"; +import { + PageSettings, + ContinuablePage, + PagedAsyncIterableIterator, +} from "./static-helpers/pagingHelpers.js"; + +export { MigrateClient } from "./migrateClient.js"; +export { restorePoller, RestorePollerOptions } from "./restorePollerHelpers.js"; +export { + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + AvsAssessmentV2, + AvsAssessmentPropertiesV2, + KnownProvisioningState, + ProvisioningState, + Scope, + KnownScopeType, + ScopeType, + AvsAssessmentSettings, + KnownAzureCurrency, + AzureCurrency, + KnownAssessmentSizingCriterion, + AssessmentSizingCriterion, + PerformanceData, + KnownPercentile, + Percentile, + KnownTimeRange, + TimeRange, + SavingsSettings, + KnownSavingsOptions, + SavingsOptions, + KnownAzureOffer, + AzureOffer, + BillingSettings, + KnownLicensingProgram, + LicensingProgram, + KnownEnvironmentType, + EnvironmentType, + KnownFttAndRaidLevel, + FttAndRaidLevel, + KnownAzureAvsNodeType, + AzureAvsNodeType, + KnownAvsAssessmentScenario, + AvsAssessmentScenario, + KnownExternalStorageType, + ExternalStorageType, + AssessmentDetails, + KnownAssessmentStatus, + AssessmentStatus, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + DownloadUrl, + AvsAssessedMachineV2, + AvsAssessedMachinePropertiesV2, + KnownMigrateWorkloadType, + MigrateWorkloadType, + Linkages, + KnownLinkageType, + LinkageType, + KnownLinkageKind, + LinkageKind, + AvsRecommendationsMigrationIssuesMigrationSuitabilitySkus, + Configuration, + KnownAzureTarget, + AzureTarget, + RecommendedFor, + KnownStrategyType, + StrategyType, + KnownMigrationPlatform, + MigrationPlatform, + MigrationSuitability, + KnownCloudSuitabilityCommon, + CloudSuitabilityCommon, + SecuritySuitability, + CostDetailsCommon, + NameValuePairCostType, + KnownCostType, + CostType, + SavingsDetailsCommon, + NameValuePairSavingsType, + KnownSavingsType, + SavingsType, + MigrationIssues, + KnownMigrationIssuesCategory, + MigrationIssuesCategory, + MoreInformation, + SkusMigrationSuitability, + KnownSkuKind, + SkuKind, + KnownSkuType, + SkuType, + SourceRecommendationMigrationSuitability, + SkuDetails, + NameValuePair, + AvsAssessedMachineExtendedDetails, + ErrorModel, + AvsAssessedDiskV2, + AvsAssessedNetworkAdapter, + KnownMachineBootType, + MachineBootType, + KnownGuestOperatingSystemArchitecture, + GuestOperatingSystemArchitecture, + KnownAssessedMachineType, + AssessedMachineType, + AvsAssessmentV2Summary, + AvsAssessmentSummaryPropertiesV2, + KnownSummaryType, + SummaryType, + SourceDetails, + KnownAssessmentSource, + AssessmentSource, + TargetDetails, + TargetSourcePair, + MigrationDetails, + NameValuePairCloudSuitabilityCommon, + KnownMigrationType, + MigrationType, + ManagementDetails, + KnownAzureManagementOfferingType, + AzureManagementOfferingType, + KnownCloudSuitability, + CloudSuitability, + KnownAzureAvsSuitabilityExplanation, + AzureAvsSuitabilityExplanation, + AvsEstimatedNode, + KnownAzureReservedInstance, + AzureReservedInstance, + AvsEstimatedExternalStorage, + AvsEstimatedNetwork, + KnownNetworkSkuType, + NetworkSkuType, + AvsGraphAssessmentOptions, + AvsGraphAssessmentOptionsProperties, + AvsAssessmentOptionsOutboundEdgeGroup, + KnownAzureLocation, + AzureLocation, + KnownAvsApiVersions, +} from "./models/index.js"; +export { MigrateClientOptionalParams } from "./api/index.js"; +export { + AvsAssessedMachinesV2OperationsListByParentOptionalParams, + AvsAssessedMachinesV2OperationsGetOptionalParams, +} from "./api/avsAssessedMachinesV2Operations/index.js"; +export { + AvsAssessmentsV2OperationsDownloadUrlOptionalParams, + AvsAssessmentsV2OperationsDeleteOptionalParams, + AvsAssessmentsV2OperationsCreateOptionalParams, + AvsAssessmentsV2OperationsListByParentOptionalParams, + AvsAssessmentsV2OperationsGetOptionalParams, +} from "./api/avsAssessmentsV2Operations/index.js"; +export { + AvsAssessmentV2SummaryOperationsListByParentOptionalParams, + AvsAssessmentV2SummaryOperationsGetOptionalParams, +} from "./api/avsAssessmentV2SummaryOperations/index.js"; +export { + AvsGraphAssessmentOptionsOperationsListByParentOptionalParams, + AvsGraphAssessmentOptionsOperationsGetOptionalParams, +} from "./api/avsGraphAssessmentOptionsOperations/index.js"; +export { OperationsListOptionalParams } from "./api/operations/index.js"; +export { + AvsAssessedMachinesV2OperationsOperations, + AvsAssessmentsV2OperationsOperations, + AvsAssessmentV2SummaryOperationsOperations, + AvsGraphAssessmentOptionsOperationsOperations, + OperationsOperations, +} from "./classic/index.js"; +export { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; diff --git a/sdk/migrate/arm-migrate/src/logger.ts b/sdk/migrate/arm-migrate/src/logger.ts new file mode 100644 index 000000000000..d3112d30b8a2 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("arm-migrate"); diff --git a/sdk/migrate/arm-migrate/src/migrateClient.ts b/sdk/migrate/arm-migrate/src/migrateClient.ts new file mode 100644 index 000000000000..315e59e2251d --- /dev/null +++ b/sdk/migrate/arm-migrate/src/migrateClient.ts @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createMigrate, MigrateContext, MigrateClientOptionalParams } from "./api/index.js"; +import { + AvsGraphAssessmentOptionsOperationsOperations, + _getAvsGraphAssessmentOptionsOperationsOperations, +} from "./classic/avsGraphAssessmentOptionsOperations/index.js"; +import { + AvsAssessmentV2SummaryOperationsOperations, + _getAvsAssessmentV2SummaryOperationsOperations, +} from "./classic/avsAssessmentV2SummaryOperations/index.js"; +import { + AvsAssessedMachinesV2OperationsOperations, + _getAvsAssessedMachinesV2OperationsOperations, +} from "./classic/avsAssessedMachinesV2Operations/index.js"; +import { + AvsAssessmentsV2OperationsOperations, + _getAvsAssessmentsV2OperationsOperations, +} from "./classic/avsAssessmentsV2Operations/index.js"; +import { OperationsOperations, _getOperationsOperations } from "./classic/operations/index.js"; +import { Pipeline } from "@azure/core-rest-pipeline"; +import { TokenCredential } from "@azure/core-auth"; + +export { MigrateClientOptionalParams } from "./api/migrateContext.js"; + +export class MigrateClient { + private _client: MigrateContext; + /** The pipeline used by this client to make requests */ + public readonly pipeline: Pipeline; + + /** Azure Migrate Resource Provider management API. */ + constructor( + credential: TokenCredential, + subscriptionId: string, + options: MigrateClientOptionalParams = {}, + ) { + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-client` + : `azsdk-js-client`; + this._client = createMigrate(credential, subscriptionId, { + ...options, + userAgentOptions: { userAgentPrefix }, + }); + this.pipeline = this._client.pipeline; + this.avsGraphAssessmentOptionsOperations = _getAvsGraphAssessmentOptionsOperationsOperations( + this._client, + ); + this.avsAssessmentV2SummaryOperations = _getAvsAssessmentV2SummaryOperationsOperations( + this._client, + ); + this.avsAssessedMachinesV2Operations = _getAvsAssessedMachinesV2OperationsOperations( + this._client, + ); + this.avsAssessmentsV2Operations = _getAvsAssessmentsV2OperationsOperations(this._client); + this.operations = _getOperationsOperations(this._client); + } + + /** The operation groups for avsGraphAssessmentOptionsOperations */ + public readonly avsGraphAssessmentOptionsOperations: AvsGraphAssessmentOptionsOperationsOperations; + /** The operation groups for avsAssessmentV2SummaryOperations */ + public readonly avsAssessmentV2SummaryOperations: AvsAssessmentV2SummaryOperationsOperations; + /** The operation groups for avsAssessedMachinesV2Operations */ + public readonly avsAssessedMachinesV2Operations: AvsAssessedMachinesV2OperationsOperations; + /** The operation groups for avsAssessmentsV2Operations */ + public readonly avsAssessmentsV2Operations: AvsAssessmentsV2OperationsOperations; + /** The operation groups for operations */ + public readonly operations: OperationsOperations; +} diff --git a/sdk/migrate/arm-migrate/src/models/index.ts b/sdk/migrate/arm-migrate/src/models/index.ts index d99e1b1a5e89..ed034b901fae 100644 --- a/sdk/migrate/arm-migrate/src/models/index.ts +++ b/sdk/migrate/arm-migrate/src/models/index.ts @@ -1,3523 +1,143 @@ -/* - * 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"; - -/** List of projects. */ -export interface ProjectResultList { - /** List of projects. */ - value?: Project[]; - nextLink?: string; -} - -/** Azure Migrate Project. */ -export interface Project { - /** - * Path reference to this project /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Name of the project. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Type of the object = [Microsoft.Migrate/assessmentProjects]. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** For optimistic concurrency control. */ - eTag?: string; - /** Azure location in which project is created. */ - location?: string; - /** Tags provided by Azure Tagging service. */ - tags?: Record; - /** Properties of the project. */ - properties?: ProjectProperties; -} - -/** Properties of a project. */ -export interface ProjectProperties { - /** - * Time when this project was created. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdTimestamp?: Date; - /** - * Time when this project was last updated. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedTimestamp?: Date; - /** - * Endpoint at which the collector agent can call agent REST API. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceEndpoint?: string; - /** Assessment solution ARM id tracked by Microsoft.Migrate/migrateProjects. */ - assessmentSolutionId?: string; - /** Assessment project status. */ - projectStatus?: ProjectStatus; - /** The ARM id of service map workspace created by customer. */ - customerWorkspaceId?: string; - /** Location of service map workspace created by customer. */ - customerWorkspaceLocation?: string; - /** - * Number of groups created in the project. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfGroups?: number; - /** - * Number of machines in the project. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfMachines?: number; - /** - * Number of assessments created in the project. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfAssessments?: number; - /** - * Time when last assessment was created. Date-Time represented in ISO-8601 format. This value will be null until assessment is created. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastAssessmentTimestamp?: Date; - /** This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. */ - publicNetworkAccess?: string; - /** - * The list of private endpoint connections to the project. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateEndpointConnections?: PrivateEndpointConnection[]; - /** The ARM id of the storage account used for interactions when public access is disabled. */ - customerStorageAccountArmId?: string; - /** - * Provisioning state of the project. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; -} - -/** A private endpoint connection for a project. */ -export interface PrivateEndpointConnection { - /** - * Name of the private endpoint endpoint connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Type of the object = [Microsoft.Migrate/assessmentProjects/privateEndpointConnections]. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** For optimistic concurrency control. */ - eTag?: string; - /** - * Path reference to this private endpoint endpoint connection. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/privateEndpointConnections/{privateEndpointConnectionName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** Properties of the private endpoint endpoint connection. */ - properties: PrivateEndpointConnectionProperties; -} - -/** Private endpoint connection properties. */ -export interface PrivateEndpointConnectionProperties { - /** - * Indicates whether there is an ongoing operation on the private endpoint. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: PrivateEndpointConnectionPropertiesProvisioningState; - /** - * ARM id for the private endpoint resource corresponding to the connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateEndpoint?: ResourceId; - /** State of the private endpoint connection. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; -} - -/** ARM id for a resource. */ -export interface ResourceId { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; -} - -/** State of a private endpoint connection. */ -export interface PrivateLinkServiceConnectionState { - /** Connection status of the private endpoint connection. */ - status?: PrivateLinkServiceConnectionStateStatus; - /** Description of the private endpoint connection. */ - description?: string; - /** Actions required on the private endpoint connection. */ - actionsRequired?: string; -} - -/** An error response from the Azure Migrate service. */ -export interface CloudError { - /** An error response from the Azure Migrate service. */ - error?: CloudErrorBody; -} - -/** An error response from the Azure Migrate 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; - /** The target of the particular error. For example, the name of the property in error. */ - target?: string; - /** A list of additional details about the error. */ - details?: CloudErrorBody[]; -} - -/** Assessment options. */ -export interface AssessmentOptions { - /** - * Unique name of an assessment options. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Unique identifier of an assessment options. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** Properties of the assessment options. */ - properties: AssessmentOptionsProperties; -} - -/** Assessment options properties. */ -export interface AssessmentOptionsProperties { - /** - * Dictionary of VM families grouped by vm family name describing the targeted azure locations of VM family and the category of the family. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vmFamilies?: VmFamily[]; - /** - * List of supported VM Families. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reservedInstanceVmFamilies?: string[]; - /** - * List of supported Azure regions for reserved instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reservedInstanceSupportedLocations?: string[]; - /** - * List of supported currencies for reserved instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reservedInstanceSupportedCurrencies?: string[]; - /** - * List of supported Azure offer codes for reserved instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reservedInstanceSupportedOffers?: string[]; -} - -/** VM family name, the list of targeted azure locations and the category of the family. */ -export interface VmFamily { - /** - * Name of the VM family. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly familyName?: string; - /** - * List of Azure regions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetLocations?: string[]; - /** - * Category of the VM family. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly category?: string[]; -} - -/** List of API operations. */ -export interface AssessmentOptionsResultList { - /** List of operations. */ - value?: AssessmentOptions[]; -} - -/** List of machines. */ -export interface MachineResultList { - /** List of machines. */ - value?: Machine[]; - nextLink?: string; -} - -/** A machine in a migration project. */ -export interface Machine { - /** - * Path reference to this machine. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/machines/{machineName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Name of the machine. It is a GUID which is unique identifier of machine in private data center. For user-readable name, we have a displayName property on this machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** For optimistic concurrency control. */ - eTag?: string; - /** - * Type of the object = [Microsoft.Migrate/assessmentProjects/machines]. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Properties of the machine. */ - properties?: MachineProperties; -} - -/** Properties of a machine. */ -export interface MachineProperties { - /** - * Boot type of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly bootType?: MachineBootType; - /** - * ARM ID of the data center as tracked by the Microsoft.OffAzure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly datacenterManagementServerArmId?: string; - /** - * ARM ID of the machine as tracked by the Microsoft.OffAzure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly discoveryMachineArmId?: string; - /** - * Name of the server hosting the datacenter management solution. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly datacenterManagementServerName?: string; - /** - * User readable name of the machine as defined by the user in their private datacenter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** - * Memory in Megabytes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly megabytesOfMemory?: number; - /** - * Processor count. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfCores?: number; - /** - * Operating System type of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operatingSystemType?: string; - /** - * Operating System name of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operatingSystemName?: string; - /** - * Operating System version of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operatingSystemVersion?: string; - /** - * Description of the machine - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * List of references to the groups that the machine is member of. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groups?: string[]; - /** - * Time when this machine was created. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdTimestamp?: Date; - /** - * Time when this machine was last updated. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedTimestamp?: Date; - /** - * Dictionary of disks attached to the machine. Key is ID of disk. Value is a disk object - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly disks?: { [propertyName: string]: Disk }; - /** - * Dictionary of network adapters attached to the machine. Key is ID of network adapter. Value is a network adapter object - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkAdapters?: { [propertyName: string]: NetworkAdapter }; -} - -/** A disk discovered on a machine. */ -export interface Disk { - /** - * Gigabytes of storage provisioned for this disk. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gigabytesAllocated?: number; - /** - * User friendly name of the disk. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; -} - -/** A network adapter discovered on a machine. */ -export interface NetworkAdapter { - /** - * MAC Address of the network adapter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly macAddress?: string; - /** - * List of IP Addresses on the network adapter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipAddresses?: string[]; - /** - * User friendly name of the network adapter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; -} - -/** List of groups. */ -export interface GroupResultList { - /** List of groups. */ - value?: Group[]; -} - -/** A group created in a Migration project. */ -export interface Group { - /** - * Path reference to this group. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Name of the group. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** For optimistic concurrency control. */ - eTag?: string; - /** - * Type of the object = [Microsoft.Migrate/assessmentProjects/groups]. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Properties of the group. */ - properties: GroupProperties; -} - -/** Properties of group resource. */ -export interface GroupProperties { - /** - * Whether the group has been created and is valid. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupStatus?: GroupStatus; - /** - * Number of machines part of this group. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly machineCount?: number; - /** - * List of References to Assessments created on this group. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly assessments?: string[]; - /** - * If the assessments are in running state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly areAssessmentsRunning?: boolean; - /** - * Time when this group was created. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdTimestamp?: Date; - /** - * Time when this group was last updated. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedTimestamp?: Date; - /** The type of group. */ - groupType?: string; -} - -/** Properties of group update. */ -export interface UpdateGroupBody { - /** For optimistic concurrency control. */ - eTag?: string; - /** Properties of the group. */ - properties?: GroupBodyProperties; -} - -/** Body properties of group update. */ -export interface GroupBodyProperties { - /** Whether to add or remove the machines. */ - operationType?: GroupUpdateOperation; - /** List of machine names that are part of this group. */ - machines?: string[]; -} - -/** List of assessments. */ -export interface AssessmentResultList { - /** List of assessments. */ - value?: Assessment[]; -} - -/** An assessment created for a group in the Migration project. */ -export interface Assessment { - /** - * Path reference to this assessment. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}/assessment/{assessmentName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Unique name of an assessment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** For optimistic concurrency control. */ - eTag?: string; - /** - * Type of the object = [Microsoft.Migrate/assessmentProjects/groups/assessments]. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Properties of the assessment. */ - properties: AssessmentProperties; -} - -/** Properties of an assessment. */ -export interface AssessmentProperties { - /** Target Azure location for which the machines should be assessed. These enums are the same as used by Compute API. */ - azureLocation: AzureLocation; - /** Offer code according to which cost estimation is done. */ - azureOfferCode: AzureOfferCode; - /** - * Enterprise agreement subscription arm id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eaSubscriptionId?: string; - /** Pricing tier for Size evaluation. */ - azurePricingTier: AzurePricingTier; - /** Storage Redundancy type offered by Azure. */ - azureStorageRedundancy: AzureStorageRedundancy; - /** Scaling factor used over utilization data to add a performance buffer for new machines to be created in Azure. Min Value = 1.0, Max value = 1.9, Default = 1.3. */ - scalingFactor: number; - /** Percentile of performance data used to recommend Azure size. */ - percentile: Percentile; - /** Time range of performance data used to recommend a size. */ - timeRange: TimeRange; - /** - * Start time to consider performance data for assessment - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly perfDataStartTime?: Date; - /** - * End time to consider performance data for assessment - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly perfDataEndTime?: Date; - /** User configurable setting that describes the status of the assessment. */ - stage: AssessmentStage; - /** Currency to report prices in. */ - currency: Currency; - /** AHUB discount on windows virtual machines. */ - azureHybridUseBenefit: AzureHybridUseBenefit; - /** Custom discount percentage to be applied on final costs. Can be in the range [0, 100]. */ - discountPercentage: number; - /** - * Confidence rating percentage for assessment. Can be in the range [0, 100]. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly confidenceRatingInPercentage?: number; - /** Assessment sizing criterion. */ - sizingCriterion: AssessmentSizingCriterion; - /** Azure reserved instance. */ - reservedInstance: ReservedInstance; - /** List of azure VM families. */ - azureVmFamilies: AzureVmFamily[]; - /** Storage type selected for this disk. */ - azureDiskType: AzureDiskType; - /** Specify the duration for which the VMs are up in the on-premises environment. */ - vmUptime: VmUptime; - /** - * Time when the Azure Prices were queried. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly pricesTimestamp?: Date; - /** - * Time when this project was created. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdTimestamp?: Date; - /** - * Time when this project was last updated. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedTimestamp?: Date; - /** - * Monthly compute cost estimate for the machines that are part of this assessment as a group, for a 31-day month. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyComputeCost?: number; - /** - * Monthly network cost estimate for the machines that are part of this assessment as a group, for a 31-day month. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyBandwidthCost?: number; - /** - * Monthly storage cost estimate for the machines that are part of this assessment as a group, for a 31-day month. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyStorageCost?: number; - /** - * Monthly premium storage cost estimate for the machines that are part of this assessment as a group, for a 31-day month. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyPremiumStorageCost?: number; - /** - * Monthly standard SSD storage cost estimate for the machines that are part of this assessment as a group, for a 31-day month. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyStandardSSDStorageCost?: number; - /** - * Whether the assessment has been created and is valid. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: AssessmentStatus; - /** - * Number of assessed machines part of this assessment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfMachines?: number; -} - -export interface VmUptime { - /** Number of days in a month for VM uptime. */ - daysPerMonth?: number; - /** Number of hours per day for VM uptime. */ - hoursPerDay?: number; -} - -/** Download URL for assessment report. */ -export interface DownloadUrl { - /** - * Hyperlink to download report. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly assessmentReportUrl?: string; - /** - * Expiry date of download url. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expirationTime?: Date; -} - -/** List of assessed machines. */ -export interface AssessedMachineResultList { - /** List of assessed machines. */ - value?: AssessedMachine[]; - nextLink?: string; -} - -/** A machine evaluated as part of an assessment. */ -export interface AssessedMachine { - /** - * Path reference to this assessed machine. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}/assessments/{assessmentName}/assessedMachines/{assessedMachineName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Name of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** For optimistic concurrency control. */ - eTag?: string; - /** - * Type of the object = [Microsoft.Migrate/assessmentProjects/groups/assessments/assessedMachines]. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Properties of an assessed machine. */ - properties?: AssessedMachineProperties; -} - -/** Properties of an assessed machine. */ -export interface AssessedMachineProperties { - /** - * Boot type of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly bootType?: MachineBootType; - /** - * ARM ID of the discovered machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly datacenterMachineArmId?: string; - /** - * ARM ID of the discovered datacenter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly datacenterManagementServerArmId?: string; - /** - * Name of the server hosting the datacenter management solution. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly datacenterManagementServerName?: string; - /** - * Description of the machine - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * User readable name of the machine as defined by the user in their private datacenter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** - * Memory in Megabytes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly megabytesOfMemory?: number; - /** - * Processor count. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfCores?: number; - /** - * Operating System type of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operatingSystemType?: string; - /** - * Operating System name of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operatingSystemName?: string; - /** - * Operating System version of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operatingSystemVersion?: string; - /** - * Monthly network cost estimate for the network adapters that are attached to this machine as a group, for a 31-day month. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyBandwidthCost?: number; - /** - * Monthly storage cost estimate for the disks that are attached to this machine as a group, for a 31-day month. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyStorageCost?: number; - /** - * Monthly premium storage cost estimate for the disks that are attached to this machine as a group, for a 31-day month. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyPremiumStorageCost?: number; - /** - * Monthly standard SSD storage cost estimate for the disks that are attached to this machine as a group, for a 31-day month. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyStandardSSDStorageCost?: number; - /** - * Confidence rating of assessed machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly confidenceRatingInPercentage?: number; - /** - * Dictionary of disks attached to the machine. Key is ID of disk. Value is a disk object. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly disks?: { [propertyName: string]: AssessedDisk }; - /** - * Dictionary of network adapters attached to the machine. Key is name of the adapter. Value is a network adapter object. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkAdapters?: { [propertyName: string]: AssessedNetworkAdapter }; - /** - * Recommended Azure size for this machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly recommendedSize?: AzureVmSize; - /** - * Number of CPU cores in the Recommended Azure VM Size. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfCoresForRecommendedSize?: number; - /** - * Megabytes of memory in the Recommended Azure VM Size. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly megabytesOfMemoryForRecommendedSize?: number; - /** - * Compute Cost for a 31-day month, if the machine is migrated to Azure with the Recommended Size. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyComputeCostForRecommendedSize?: number; - /** - * Utilization percentage of the processor core as observed in the private data center, in the Time Range selected on Assessment, reported as the Percentile value based on the percentile number selected in assessment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly percentageCoresUtilization?: number; - /** - * Utilization percentage of the memory as observed in the private data center, in the Time Range selected on Assessment, reported as the Percentile value based on the percentile number selected in assessment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly percentageMemoryUtilization?: number; - /** - * Whether machine is suitable for migration to Azure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly suitability?: CloudSuitability; - /** - * If machine is not ready to be migrated, this explains the reasons and mitigation steps. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly suitabilityExplanation?: AzureVmSuitabilityExplanation; - /** - * If machine is not suitable for cloud, this explains the reasons. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly suitabilityDetail?: AzureVmSuitabilityDetail; - /** - * Time when this machine was created. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdTimestamp?: Date; - /** - * Time when this machine was last updated. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedTimestamp?: Date; -} - -/** A disk assessed for an assessment. */ -export interface AssessedDisk { - /** - * Name of the assessed disk. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * User friendly name of the assessed disk. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** - * Gigabytes of storage provisioned for this disk. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gigabytesProvisioned?: number; - /** - * Disk throughput in MegaBytes per second. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly megabytesPerSecondOfRead?: number; - /** - * Disk throughput in MegaBytes per second. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly megabytesPerSecondOfWrite?: number; - /** - * Number of read operations per second for the disk. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfReadOperationsPerSecond?: number; - /** - * Number of read and write operations per second for the disk. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly numberOfWriteOperationsPerSecond?: number; - /** - * Estimated aggregate storage cost for a 31-day month for this disk. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyStorageCost?: number; - /** - * Storage type selected for this disk. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly recommendedDiskType?: AzureDiskType; - /** - * Recommended Azure size for the disk, given utilization data and preferences set on Assessment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly recommendedDiskSize?: AzureDiskSize; - /** - * Gigabytes of storage provided by the recommended Azure disk size. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gigabytesForRecommendedDiskSize?: number; - /** - * Whether this disk is suitable for Azure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly suitability?: CloudSuitability; - /** - * If disk is not suitable to be migrated, this explains the reasons and mitigation steps. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly suitabilityExplanation?: AzureDiskSuitabilityExplanation; - /** - * If disk is suitable to be migrate but some conditions/checks were not considered while calculating suitability, this explains the details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly suitabilityDetail?: AzureDiskSuitabilityDetail; -} - -/** A network adapter assessed for an assessment. */ -export interface AssessedNetworkAdapter { - /** - * MAC Address of the network adapter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly macAddress?: string; - /** - * List of IP Addresses on the network adapter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipAddresses?: string[]; - /** - * User friendly name of the assessed network adapter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** - * Monthly cost estimate for network bandwidth used by this network adapter. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monthlyBandwidthCosts?: number; - /** - * Adapter throughput for incoming traffic in MegaBytes per second. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly megabytesPerSecondReceived?: number; - /** - * Adapter throughput for outgoing traffic in MegaBytes per second. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly megabytesPerSecondTransmitted?: number; - /** Gigabytes transmitted through this adapter each month. */ - netGigabytesTransmittedPerMonth?: number; - /** - * Whether this adapter is suitable for Azure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly suitability?: CloudSuitability; - /** - * If network adapter is suitable, this explains the reasons and mitigation steps. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly suitabilityExplanation?: AzureNetworkAdapterSuitabilityExplanation; - /** - * If network adapter is not suitable for cloud, this explains the reasons. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly suitabilityDetail?: AzureNetworkAdapterSuitabilityDetail; -} - -/** List of Hyper-V collectors. */ -export interface HyperVCollectorList { - /** List of Hyper-V collectors. */ - value?: HyperVCollector[]; -} - -export interface HyperVCollector { - eTag?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - properties?: CollectorProperties; -} - -export interface CollectorProperties { - /** The ARM id of the discovery service site. */ - discoverySiteId?: string; - /** - * Time when this collector was created. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdTimestamp?: string; - /** - * Time when this collector was updated. Date-Time represented in ISO-8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedTimestamp?: string; - agentProperties?: CollectorAgentProperties; -} - -export interface CollectorAgentProperties { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly version?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastHeartbeatUtc?: Date; - spnDetails?: CollectorBodyAgentSpnProperties; -} - -export interface CollectorBodyAgentSpnProperties { - /** AAD Authority URL which was used to request the token for the service principal. */ - authority?: string; - /** Application/client Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. */ - applicationId?: string; - /** Intended audience for the service principal. */ - audience?: string; - /** Object Id of the service principal with which the on-premise management/data plane components would communicate with our Azure services. */ - objectId?: string; - /** Tenant Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. */ - tenantId?: string; -} - -/** List of Server collectors. */ -export interface ServerCollectorList { - /** List of Server collectors. */ - value?: ServerCollector[]; -} - -export interface ServerCollector { - eTag?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - properties?: CollectorProperties; -} - -/** List of VMware collectors. */ -export interface VMwareCollectorList { - /** List of VMware collectors. */ - value?: VMwareCollector[]; -} - -export interface VMwareCollector { - eTag?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - properties?: CollectorProperties; -} - -/** List of Import collectors. */ -export interface ImportCollectorList { - /** List of Import collectors. */ - value?: ImportCollector[]; -} - -export interface ImportCollector { - eTag?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - properties?: ImportCollectorProperties; -} - -export interface ImportCollectorProperties { - discoverySiteId?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly createdTimestamp?: string; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly updatedTimestamp?: string; -} - -/** A collection of private endpoint connections for a project. */ -export interface PrivateEndpointConnectionCollection { - /** - * A list of private endpoint connections for a project. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: PrivateEndpointConnection[]; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A private link resource for a project for which a private endpoint can be created. */ -export interface PrivateLinkResource { - /** - * Name of the private link resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Type of the object = [Microsoft.Migrate/assessmentProjects/privateLinkResources]. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Path reference to this private link resource. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/privateLinkResources/{privateLinkResourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Properties of the private link resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly properties?: PrivateLinkResourceProperties; -} - -/** Properties of a private link resource. */ -export interface PrivateLinkResourceProperties { - /** - * The private link resource required member names. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredMembers?: string[]; - /** - * Required DNS zone names of the the private link resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredZoneNames?: string[]; - /** - * The private link resource group id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupId?: string; -} - -/** A list of private link resources */ -export interface PrivateLinkResourceCollection { - /** - * Array of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: PrivateLinkResource[]; - /** - * Link to retrieve next page of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** List of API operations. */ -export interface OperationResultList { - /** List of operations. */ - value?: Operation[]; -} - -/** A REST API operation supported by the provider. */ -export interface Operation { - /** - * Name of the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Displayable properties of the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly display?: OperationDisplay; - /** - * Origin of the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: string; -} - -/** Displayable properties of the operation. */ -export interface OperationDisplay { - /** - * Provider of the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provider?: string; - /** - * Resource operated on by the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resource?: string; - /** - * Operation Type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operation?: string; - /** - * Description of the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; -} - -/** Defines headers for Projects_listBySubscription operation. */ -export interface ProjectsListBySubscriptionHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Projects_list operation. */ -export interface ProjectsListHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Projects_get operation. */ -export interface ProjectsGetHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Projects_create operation. */ -export interface ProjectsCreateHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Projects_update operation. */ -export interface ProjectsUpdateHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Projects_delete operation. */ -export interface ProjectsDeleteHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Projects_assessmentOptions operation. */ -export interface ProjectsAssessmentOptionsHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Projects_assessmentOptionsList operation. */ -export interface ProjectsAssessmentOptionsListHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Projects_listBySubscriptionNext operation. */ -export interface ProjectsListBySubscriptionNextHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Projects_listNext operation. */ -export interface ProjectsListNextHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Machines_listByProject operation. */ -export interface MachinesListByProjectHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Machines_get operation. */ -export interface MachinesGetHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Machines_listByProjectNext operation. */ -export interface MachinesListByProjectNextHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Groups_listByProject operation. */ -export interface GroupsListByProjectHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Groups_get operation. */ -export interface GroupsGetHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Groups_create operation. */ -export interface GroupsCreateHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Groups_delete operation. */ -export interface GroupsDeleteHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Groups_updateMachines operation. */ -export interface GroupsUpdateMachinesHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Assessments_listByGroup operation. */ -export interface AssessmentsListByGroupHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Assessments_listByProject operation. */ -export interface AssessmentsListByProjectHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Assessments_get operation. */ -export interface AssessmentsGetHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Assessments_create operation. */ -export interface AssessmentsCreateHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Assessments_delete operation. */ -export interface AssessmentsDeleteHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for Assessments_getReportDownloadUrl operation. */ -export interface AssessmentsGetReportDownloadUrlHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for AssessedMachines_listByAssessment operation. */ -export interface AssessedMachinesListByAssessmentHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for AssessedMachines_get operation. */ -export interface AssessedMachinesGetHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for AssessedMachines_listByAssessmentNext operation. */ -export interface AssessedMachinesListByAssessmentNextHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for HyperVCollectors_listByProject operation. */ -export interface HyperVCollectorsListByProjectHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for HyperVCollectors_get operation. */ -export interface HyperVCollectorsGetHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for HyperVCollectors_create operation. */ -export interface HyperVCollectorsCreateHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for HyperVCollectors_delete operation. */ -export interface HyperVCollectorsDeleteHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for ServerCollectors_listByProject operation. */ -export interface ServerCollectorsListByProjectHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for ServerCollectors_get operation. */ -export interface ServerCollectorsGetHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for ServerCollectors_create operation. */ -export interface ServerCollectorsCreateHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for ServerCollectors_delete operation. */ -export interface ServerCollectorsDeleteHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for VMwareCollectors_listByProject operation. */ -export interface VMwareCollectorsListByProjectHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for VMwareCollectors_get operation. */ -export interface VMwareCollectorsGetHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for VMwareCollectors_create operation. */ -export interface VMwareCollectorsCreateHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for VMwareCollectors_delete operation. */ -export interface VMwareCollectorsDeleteHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for ImportCollectors_listByProject operation. */ -export interface ImportCollectorsListByProjectHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for ImportCollectors_get operation. */ -export interface ImportCollectorsGetHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for ImportCollectors_create operation. */ -export interface ImportCollectorsCreateHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for ImportCollectors_delete operation. */ -export interface ImportCollectorsDeleteHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for PrivateEndpointConnection_listByProject operation. */ -export interface PrivateEndpointConnectionListByProjectHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for PrivateEndpointConnection_get operation. */ -export interface PrivateEndpointConnectionGetHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for PrivateEndpointConnection_update operation. */ -export interface PrivateEndpointConnectionUpdateHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for PrivateEndpointConnection_delete operation. */ -export interface PrivateEndpointConnectionDeleteHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for PrivateLinkResource_get operation. */ -export interface PrivateLinkResourceGetHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Defines headers for PrivateLinkResource_listByProject operation. */ -export interface PrivateLinkResourceListByProjectHeaders { - /** Service generated Request ID. */ - xMsRequestId?: string; -} - -/** Known values of {@link ProjectStatus} that the service accepts. */ -export enum KnownProjectStatus { - /** Active */ - Active = "Active", - /** Inactive */ - Inactive = "Inactive" -} - -/** - * Defines values for ProjectStatus. \ - * {@link KnownProjectStatus} can be used interchangeably with ProjectStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Active** \ - * **Inactive** - */ -export type ProjectStatus = string; - -/** Known values of {@link PrivateEndpointConnectionPropertiesProvisioningState} that the service accepts. */ -export enum KnownPrivateEndpointConnectionPropertiesProvisioningState { - /** Accepted */ - Accepted = "Accepted", - /** InProgress */ - InProgress = "InProgress", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed" -} - -/** - * Defines values for PrivateEndpointConnectionPropertiesProvisioningState. \ - * {@link KnownPrivateEndpointConnectionPropertiesProvisioningState} can be used interchangeably with PrivateEndpointConnectionPropertiesProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Accepted** \ - * **InProgress** \ - * **Succeeded** \ - * **Failed** - */ -export type PrivateEndpointConnectionPropertiesProvisioningState = string; - -/** Known values of {@link PrivateLinkServiceConnectionStateStatus} that the service accepts. */ -export enum KnownPrivateLinkServiceConnectionStateStatus { - /** Approved */ - Approved = "Approved", - /** Pending */ - Pending = "Pending", - /** Rejected */ - Rejected = "Rejected", - /** Disconnected */ - Disconnected = "Disconnected" -} - -/** - * Defines values for PrivateLinkServiceConnectionStateStatus. \ - * {@link KnownPrivateLinkServiceConnectionStateStatus} can be used interchangeably with PrivateLinkServiceConnectionStateStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Approved** \ - * **Pending** \ - * **Rejected** \ - * **Disconnected** - */ -export type PrivateLinkServiceConnectionStateStatus = string; - -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - /** Accepted */ - Accepted = "Accepted", - /** Creating */ - Creating = "Creating", - /** Deleting */ - Deleting = "Deleting", - /** Failed */ - Failed = "Failed", - /** Moving */ - Moving = "Moving", - /** Succeeded */ - Succeeded = "Succeeded" -} - -/** - * Defines values for ProvisioningState. \ - * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Accepted** \ - * **Creating** \ - * **Deleting** \ - * **Failed** \ - * **Moving** \ - * **Succeeded** - */ -export type ProvisioningState = string; - -/** Known values of {@link MachineBootType} that the service accepts. */ -export enum KnownMachineBootType { - /** Unknown */ - Unknown = "Unknown", - /** EFI */ - EFI = "EFI", - /** Bios */ - Bios = "BIOS" -} - -/** - * Defines values for MachineBootType. \ - * {@link KnownMachineBootType} can be used interchangeably with MachineBootType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **EFI** \ - * **BIOS** - */ -export type MachineBootType = string; - -/** Known values of {@link GroupStatus} that the service accepts. */ -export enum KnownGroupStatus { - /** Created */ - Created = "Created", - /** Updated */ - Updated = "Updated", - /** Running */ - Running = "Running", - /** Completed */ - Completed = "Completed", - /** Invalid */ - Invalid = "Invalid" -} - -/** - * Defines values for GroupStatus. \ - * {@link KnownGroupStatus} can be used interchangeably with GroupStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Created** \ - * **Updated** \ - * **Running** \ - * **Completed** \ - * **Invalid** - */ -export type GroupStatus = string; - -/** Known values of {@link GroupUpdateOperation} that the service accepts. */ -export enum KnownGroupUpdateOperation { - /** Add */ - Add = "Add", - /** Remove */ - Remove = "Remove" -} - -/** - * Defines values for GroupUpdateOperation. \ - * {@link KnownGroupUpdateOperation} can be used interchangeably with GroupUpdateOperation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Add** \ - * **Remove** - */ -export type GroupUpdateOperation = string; - -/** Known values of {@link AzureLocation} that the service accepts. */ -export enum KnownAzureLocation { - /** Unknown */ - Unknown = "Unknown", - /** EastAsia */ - EastAsia = "EastAsia", - /** SoutheastAsia */ - SoutheastAsia = "SoutheastAsia", - /** AustraliaEast */ - AustraliaEast = "AustraliaEast", - /** AustraliaSoutheast */ - AustraliaSoutheast = "AustraliaSoutheast", - /** BrazilSouth */ - BrazilSouth = "BrazilSouth", - /** CanadaCentral */ - CanadaCentral = "CanadaCentral", - /** CanadaEast */ - CanadaEast = "CanadaEast", - /** WestEurope */ - WestEurope = "WestEurope", - /** NorthEurope */ - NorthEurope = "NorthEurope", - /** CentralIndia */ - CentralIndia = "CentralIndia", - /** SouthIndia */ - SouthIndia = "SouthIndia", - /** WestIndia */ - WestIndia = "WestIndia", - /** JapanEast */ - JapanEast = "JapanEast", - /** JapanWest */ - JapanWest = "JapanWest", - /** KoreaCentral */ - KoreaCentral = "KoreaCentral", - /** KoreaSouth */ - KoreaSouth = "KoreaSouth", - /** UkWest */ - UkWest = "UkWest", - /** UkSouth */ - UkSouth = "UkSouth", - /** NorthCentralUs */ - NorthCentralUs = "NorthCentralUs", - /** EastUs */ - EastUs = "EastUs", - /** WestUs2 */ - WestUs2 = "WestUs2", - /** SouthCentralUs */ - SouthCentralUs = "SouthCentralUs", - /** CentralUs */ - CentralUs = "CentralUs", - /** EastUs2 */ - EastUs2 = "EastUs2", - /** WestUs */ - WestUs = "WestUs", - /** WestCentralUs */ - WestCentralUs = "WestCentralUs", - /** GermanyCentral */ - GermanyCentral = "GermanyCentral", - /** GermanyNortheast */ - GermanyNortheast = "GermanyNortheast", - /** ChinaNorth */ - ChinaNorth = "ChinaNorth", - /** ChinaEast */ - ChinaEast = "ChinaEast", - /** USGovArizona */ - USGovArizona = "USGovArizona", - /** USGovTexas */ - USGovTexas = "USGovTexas", - /** USGovIowa */ - USGovIowa = "USGovIowa", - /** USGovVirginia */ - USGovVirginia = "USGovVirginia", - /** USDoDCentral */ - USDoDCentral = "USDoDCentral", - /** USDoDEast */ - USDoDEast = "USDoDEast" -} - -/** - * Defines values for AzureLocation. \ - * {@link KnownAzureLocation} can be used interchangeably with AzureLocation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **EastAsia** \ - * **SoutheastAsia** \ - * **AustraliaEast** \ - * **AustraliaSoutheast** \ - * **BrazilSouth** \ - * **CanadaCentral** \ - * **CanadaEast** \ - * **WestEurope** \ - * **NorthEurope** \ - * **CentralIndia** \ - * **SouthIndia** \ - * **WestIndia** \ - * **JapanEast** \ - * **JapanWest** \ - * **KoreaCentral** \ - * **KoreaSouth** \ - * **UkWest** \ - * **UkSouth** \ - * **NorthCentralUs** \ - * **EastUs** \ - * **WestUs2** \ - * **SouthCentralUs** \ - * **CentralUs** \ - * **EastUs2** \ - * **WestUs** \ - * **WestCentralUs** \ - * **GermanyCentral** \ - * **GermanyNortheast** \ - * **ChinaNorth** \ - * **ChinaEast** \ - * **USGovArizona** \ - * **USGovTexas** \ - * **USGovIowa** \ - * **USGovVirginia** \ - * **USDoDCentral** \ - * **USDoDEast** - */ -export type AzureLocation = string; - -/** Known values of {@link AzureOfferCode} that the service accepts. */ -export enum KnownAzureOfferCode { - /** Unknown */ - Unknown = "Unknown", - /** Msazr0003P */ - Msazr0003P = "MSAZR0003P", - /** Msazr0044P */ - Msazr0044P = "MSAZR0044P", - /** Msazr0059P */ - Msazr0059P = "MSAZR0059P", - /** Msazr0060P */ - Msazr0060P = "MSAZR0060P", - /** Msazr0062P */ - Msazr0062P = "MSAZR0062P", - /** Msazr0063P */ - Msazr0063P = "MSAZR0063P", - /** Msazr0064P */ - Msazr0064P = "MSAZR0064P", - /** Msazr0029P */ - Msazr0029P = "MSAZR0029P", - /** Msazr0022P */ - Msazr0022P = "MSAZR0022P", - /** Msazr0023P */ - Msazr0023P = "MSAZR0023P", - /** Msazr0148P */ - Msazr0148P = "MSAZR0148P", - /** Msazr0025P */ - Msazr0025P = "MSAZR0025P", - /** Msazr0036P */ - Msazr0036P = "MSAZR0036P", - /** Msazr0120P */ - Msazr0120P = "MSAZR0120P", - /** Msazr0121P */ - Msazr0121P = "MSAZR0121P", - /** Msazr0122P */ - Msazr0122P = "MSAZR0122P", - /** Msazr0123P */ - Msazr0123P = "MSAZR0123P", - /** Msazr0124P */ - Msazr0124P = "MSAZR0124P", - /** Msazr0125P */ - Msazr0125P = "MSAZR0125P", - /** Msazr0126P */ - Msazr0126P = "MSAZR0126P", - /** Msazr0127P */ - Msazr0127P = "MSAZR0127P", - /** Msazr0128P */ - Msazr0128P = "MSAZR0128P", - /** Msazr0129P */ - Msazr0129P = "MSAZR0129P", - /** Msazr0130P */ - Msazr0130P = "MSAZR0130P", - /** Msazr0111P */ - Msazr0111P = "MSAZR0111P", - /** Msazr0144P */ - Msazr0144P = "MSAZR0144P", - /** Msazr0149P */ - Msazr0149P = "MSAZR0149P", - /** Msmcazr0044P */ - Msmcazr0044P = "MSMCAZR0044P", - /** Msmcazr0059P */ - Msmcazr0059P = "MSMCAZR0059P", - /** Msmcazr0060P */ - Msmcazr0060P = "MSMCAZR0060P", - /** Msmcazr0063P */ - Msmcazr0063P = "MSMCAZR0063P", - /** Msmcazr0120P */ - Msmcazr0120P = "MSMCAZR0120P", - /** Msmcazr0121P */ - Msmcazr0121P = "MSMCAZR0121P", - /** Msmcazr0125P */ - Msmcazr0125P = "MSMCAZR0125P", - /** Msmcazr0128P */ - Msmcazr0128P = "MSMCAZR0128P", - /** Msazrde0003P */ - Msazrde0003P = "MSAZRDE0003P", - /** Msazrde0044P */ - Msazrde0044P = "MSAZRDE0044P", - /** Msazrusgov0003P */ - Msazrusgov0003P = "MSAZRUSGOV0003P", - /** EA */ - EA = "EA" -} - -/** - * Defines values for AzureOfferCode. \ - * {@link KnownAzureOfferCode} can be used interchangeably with AzureOfferCode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **MSAZR0003P** \ - * **MSAZR0044P** \ - * **MSAZR0059P** \ - * **MSAZR0060P** \ - * **MSAZR0062P** \ - * **MSAZR0063P** \ - * **MSAZR0064P** \ - * **MSAZR0029P** \ - * **MSAZR0022P** \ - * **MSAZR0023P** \ - * **MSAZR0148P** \ - * **MSAZR0025P** \ - * **MSAZR0036P** \ - * **MSAZR0120P** \ - * **MSAZR0121P** \ - * **MSAZR0122P** \ - * **MSAZR0123P** \ - * **MSAZR0124P** \ - * **MSAZR0125P** \ - * **MSAZR0126P** \ - * **MSAZR0127P** \ - * **MSAZR0128P** \ - * **MSAZR0129P** \ - * **MSAZR0130P** \ - * **MSAZR0111P** \ - * **MSAZR0144P** \ - * **MSAZR0149P** \ - * **MSMCAZR0044P** \ - * **MSMCAZR0059P** \ - * **MSMCAZR0060P** \ - * **MSMCAZR0063P** \ - * **MSMCAZR0120P** \ - * **MSMCAZR0121P** \ - * **MSMCAZR0125P** \ - * **MSMCAZR0128P** \ - * **MSAZRDE0003P** \ - * **MSAZRDE0044P** \ - * **MSAZRUSGOV0003P** \ - * **EA** - */ -export type AzureOfferCode = string; - -/** Known values of {@link AzurePricingTier} that the service accepts. */ -export enum KnownAzurePricingTier { - /** Standard */ - Standard = "Standard", - /** Basic */ - Basic = "Basic" -} - -/** - * Defines values for AzurePricingTier. \ - * {@link KnownAzurePricingTier} can be used interchangeably with AzurePricingTier, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard** \ - * **Basic** - */ -export type AzurePricingTier = string; - -/** Known values of {@link AzureStorageRedundancy} that the service accepts. */ -export enum KnownAzureStorageRedundancy { - /** Unknown */ - Unknown = "Unknown", - /** LocallyRedundant */ - LocallyRedundant = "LocallyRedundant", - /** ZoneRedundant */ - ZoneRedundant = "ZoneRedundant", - /** GeoRedundant */ - GeoRedundant = "GeoRedundant", - /** ReadAccessGeoRedundant */ - ReadAccessGeoRedundant = "ReadAccessGeoRedundant" -} - -/** - * Defines values for AzureStorageRedundancy. \ - * {@link KnownAzureStorageRedundancy} can be used interchangeably with AzureStorageRedundancy, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **LocallyRedundant** \ - * **ZoneRedundant** \ - * **GeoRedundant** \ - * **ReadAccessGeoRedundant** - */ -export type AzureStorageRedundancy = string; - -/** Known values of {@link Percentile} that the service accepts. */ -export enum KnownPercentile { - /** Percentile50 */ - Percentile50 = "Percentile50", - /** Percentile90 */ - Percentile90 = "Percentile90", - /** Percentile95 */ - Percentile95 = "Percentile95", - /** Percentile99 */ - Percentile99 = "Percentile99" -} - -/** - * Defines values for Percentile. \ - * {@link KnownPercentile} can be used interchangeably with Percentile, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Percentile50** \ - * **Percentile90** \ - * **Percentile95** \ - * **Percentile99** - */ -export type Percentile = string; - -/** Known values of {@link TimeRange} that the service accepts. */ -export enum KnownTimeRange { - /** Day */ - Day = "Day", - /** Week */ - Week = "Week", - /** Month */ - Month = "Month", - /** Custom */ - Custom = "Custom" -} - -/** - * Defines values for TimeRange. \ - * {@link KnownTimeRange} can be used interchangeably with TimeRange, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Day** \ - * **Week** \ - * **Month** \ - * **Custom** - */ -export type TimeRange = string; - -/** Known values of {@link AssessmentStage} that the service accepts. */ -export enum KnownAssessmentStage { - /** InProgress */ - InProgress = "InProgress", - /** UnderReview */ - UnderReview = "UnderReview", - /** Approved */ - Approved = "Approved" -} - -/** - * Defines values for AssessmentStage. \ - * {@link KnownAssessmentStage} can be used interchangeably with AssessmentStage, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **InProgress** \ - * **UnderReview** \ - * **Approved** - */ -export type AssessmentStage = string; - -/** Known values of {@link Currency} that the service accepts. */ -export enum KnownCurrency { - /** Unknown */ - Unknown = "Unknown", - /** USD */ - USD = "USD", - /** DKK */ - DKK = "DKK", - /** CAD */ - CAD = "CAD", - /** IDR */ - IDR = "IDR", - /** JPY */ - JPY = "JPY", - /** KRW */ - KRW = "KRW", - /** NZD */ - NZD = "NZD", - /** NOK */ - NOK = "NOK", - /** RUB */ - RUB = "RUB", - /** SAR */ - SAR = "SAR", - /** ZAR */ - ZAR = "ZAR", - /** SEK */ - SEK = "SEK", - /** TRY */ - TRY = "TRY", - /** GBP */ - GBP = "GBP", - /** MXN */ - MXN = "MXN", - /** MYR */ - MYR = "MYR", - /** INR */ - INR = "INR", - /** HKD */ - HKD = "HKD", - /** BRL */ - BRL = "BRL", - /** TWD */ - TWD = "TWD", - /** EUR */ - EUR = "EUR", - /** CHF */ - CHF = "CHF", - /** ARS */ - ARS = "ARS", - /** AUD */ - AUD = "AUD", - /** CNY */ - CNY = "CNY" -} - -/** - * Defines values for Currency. \ - * {@link KnownCurrency} can be used interchangeably with Currency, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **USD** \ - * **DKK** \ - * **CAD** \ - * **IDR** \ - * **JPY** \ - * **KRW** \ - * **NZD** \ - * **NOK** \ - * **RUB** \ - * **SAR** \ - * **ZAR** \ - * **SEK** \ - * **TRY** \ - * **GBP** \ - * **MXN** \ - * **MYR** \ - * **INR** \ - * **HKD** \ - * **BRL** \ - * **TWD** \ - * **EUR** \ - * **CHF** \ - * **ARS** \ - * **AUD** \ - * **CNY** - */ -export type Currency = string; - -/** Known values of {@link AzureHybridUseBenefit} that the service accepts. */ -export enum KnownAzureHybridUseBenefit { - /** Unknown */ - Unknown = "Unknown", - /** Yes */ - Yes = "Yes", - /** No */ - No = "No" -} - -/** - * Defines values for AzureHybridUseBenefit. \ - * {@link KnownAzureHybridUseBenefit} can be used interchangeably with AzureHybridUseBenefit, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Yes** \ - * **No** - */ -export type AzureHybridUseBenefit = string; - -/** Known values of {@link AssessmentSizingCriterion} that the service accepts. */ -export enum KnownAssessmentSizingCriterion { - /** PerformanceBased */ - PerformanceBased = "PerformanceBased", - /** AsOnPremises */ - AsOnPremises = "AsOnPremises" -} - -/** - * Defines values for AssessmentSizingCriterion. \ - * {@link KnownAssessmentSizingCriterion} can be used interchangeably with AssessmentSizingCriterion, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PerformanceBased** \ - * **AsOnPremises** - */ -export type AssessmentSizingCriterion = string; - -/** Known values of {@link ReservedInstance} that the service accepts. */ -export enum KnownReservedInstance { - /** None */ - None = "None", - /** RI1Year */ - RI1Year = "RI1Year", - /** RI3Year */ - RI3Year = "RI3Year" -} - -/** - * Defines values for ReservedInstance. \ - * {@link KnownReservedInstance} can be used interchangeably with ReservedInstance, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **RI1Year** \ - * **RI3Year** - */ -export type ReservedInstance = string; - -/** Known values of {@link AzureVmFamily} that the service accepts. */ -export enum KnownAzureVmFamily { - /** Unknown */ - Unknown = "Unknown", - /** BasicA0A4 */ - BasicA0A4 = "Basic_A0_A4", - /** StandardA0A7 */ - StandardA0A7 = "Standard_A0_A7", - /** StandardA8A11 */ - StandardA8A11 = "Standard_A8_A11", - /** Av2Series */ - Av2Series = "Av2_series", - /** DSeries */ - DSeries = "D_series", - /** Dv2Series */ - Dv2Series = "Dv2_series", - /** DSSeries */ - DSSeries = "DS_series", - /** DSv2Series */ - DSv2Series = "DSv2_series", - /** FSeries */ - FSeries = "F_series", - /** FsSeries */ - FsSeries = "Fs_series", - /** GSeries */ - GSeries = "G_series", - /** GSSeries */ - GSSeries = "GS_series", - /** HSeries */ - HSeries = "H_series", - /** LsSeries */ - LsSeries = "Ls_series", - /** Dsv3Series */ - Dsv3Series = "Dsv3_series", - /** Dv3Series */ - Dv3Series = "Dv3_series", - /** Fsv2Series */ - Fsv2Series = "Fsv2_series", - /** Ev3Series */ - Ev3Series = "Ev3_series", - /** Esv3Series */ - Esv3Series = "Esv3_series", - /** MSeries */ - MSeries = "M_series", - /** DCSeries */ - DCSeries = "DC_Series" -} - -/** - * Defines values for AzureVmFamily. \ - * {@link KnownAzureVmFamily} can be used interchangeably with AzureVmFamily, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Basic_A0_A4** \ - * **Standard_A0_A7** \ - * **Standard_A8_A11** \ - * **Av2_series** \ - * **D_series** \ - * **Dv2_series** \ - * **DS_series** \ - * **DSv2_series** \ - * **F_series** \ - * **Fs_series** \ - * **G_series** \ - * **GS_series** \ - * **H_series** \ - * **Ls_series** \ - * **Dsv3_series** \ - * **Dv3_series** \ - * **Fsv2_series** \ - * **Ev3_series** \ - * **Esv3_series** \ - * **M_series** \ - * **DC_Series** - */ -export type AzureVmFamily = string; - -/** Known values of {@link AzureDiskType} that the service accepts. */ -export enum KnownAzureDiskType { - /** Unknown */ - Unknown = "Unknown", - /** Standard */ - Standard = "Standard", - /** Premium */ - Premium = "Premium", - /** StandardSSD */ - StandardSSD = "StandardSSD", - /** StandardOrPremium */ - StandardOrPremium = "StandardOrPremium" -} - -/** - * Defines values for AzureDiskType. \ - * {@link KnownAzureDiskType} can be used interchangeably with AzureDiskType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Standard** \ - * **Premium** \ - * **StandardSSD** \ - * **StandardOrPremium** - */ -export type AzureDiskType = string; - -/** Known values of {@link AssessmentStatus} that the service accepts. */ -export enum KnownAssessmentStatus { - /** Created */ - Created = "Created", - /** Updated */ - Updated = "Updated", - /** Running */ - Running = "Running", - /** Completed */ - Completed = "Completed", - /** Invalid */ - Invalid = "Invalid", - /** OutOfSync */ - OutOfSync = "OutOfSync", - /** OutDated */ - OutDated = "OutDated" -} - -/** - * Defines values for AssessmentStatus. \ - * {@link KnownAssessmentStatus} can be used interchangeably with AssessmentStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Created** \ - * **Updated** \ - * **Running** \ - * **Completed** \ - * **Invalid** \ - * **OutOfSync** \ - * **OutDated** - */ -export type AssessmentStatus = string; - -/** Known values of {@link AzureDiskSize} that the service accepts. */ -export enum KnownAzureDiskSize { - /** Unknown */ - Unknown = "Unknown", - /** StandardS4 */ - StandardS4 = "Standard_S4", - /** StandardS6 */ - StandardS6 = "Standard_S6", - /** StandardS10 */ - StandardS10 = "Standard_S10", - /** StandardS15 */ - StandardS15 = "Standard_S15", - /** StandardS20 */ - StandardS20 = "Standard_S20", - /** StandardS30 */ - StandardS30 = "Standard_S30", - /** StandardS40 */ - StandardS40 = "Standard_S40", - /** StandardS50 */ - StandardS50 = "Standard_S50", - /** PremiumP4 */ - PremiumP4 = "Premium_P4", - /** PremiumP6 */ - PremiumP6 = "Premium_P6", - /** PremiumP10 */ - PremiumP10 = "Premium_P10", - /** PremiumP15 */ - PremiumP15 = "Premium_P15", - /** PremiumP20 */ - PremiumP20 = "Premium_P20", - /** PremiumP30 */ - PremiumP30 = "Premium_P30", - /** PremiumP40 */ - PremiumP40 = "Premium_P40", - /** PremiumP50 */ - PremiumP50 = "Premium_P50", - /** StandardS60 */ - StandardS60 = "Standard_S60", - /** StandardS70 */ - StandardS70 = "Standard_S70", - /** StandardS80 */ - StandardS80 = "Standard_S80", - /** PremiumP60 */ - PremiumP60 = "Premium_P60", - /** PremiumP70 */ - PremiumP70 = "Premium_P70", - /** PremiumP80 */ - PremiumP80 = "Premium_P80", - /** StandardSSDE10 */ - StandardSSDE10 = "StandardSSD_E10", - /** StandardSSDE15 */ - StandardSSDE15 = "StandardSSD_E15", - /** StandardSSDE20 */ - StandardSSDE20 = "StandardSSD_E20", - /** StandardSSDE30 */ - StandardSSDE30 = "StandardSSD_E30", - /** StandardSSDE40 */ - StandardSSDE40 = "StandardSSD_E40", - /** StandardSSDE50 */ - StandardSSDE50 = "StandardSSD_E50", - /** StandardSSDE60 */ - StandardSSDE60 = "StandardSSD_E60", - /** StandardSSDE70 */ - StandardSSDE70 = "StandardSSD_E70", - /** StandardSSDE80 */ - StandardSSDE80 = "StandardSSD_E80", - /** StandardSSDE4 */ - StandardSSDE4 = "StandardSSD_E4", - /** StandardSSDE6 */ - StandardSSDE6 = "StandardSSD_E6" -} - -/** - * Defines values for AzureDiskSize. \ - * {@link KnownAzureDiskSize} can be used interchangeably with AzureDiskSize, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Standard_S4** \ - * **Standard_S6** \ - * **Standard_S10** \ - * **Standard_S15** \ - * **Standard_S20** \ - * **Standard_S30** \ - * **Standard_S40** \ - * **Standard_S50** \ - * **Premium_P4** \ - * **Premium_P6** \ - * **Premium_P10** \ - * **Premium_P15** \ - * **Premium_P20** \ - * **Premium_P30** \ - * **Premium_P40** \ - * **Premium_P50** \ - * **Standard_S60** \ - * **Standard_S70** \ - * **Standard_S80** \ - * **Premium_P60** \ - * **Premium_P70** \ - * **Premium_P80** \ - * **StandardSSD_E10** \ - * **StandardSSD_E15** \ - * **StandardSSD_E20** \ - * **StandardSSD_E30** \ - * **StandardSSD_E40** \ - * **StandardSSD_E50** \ - * **StandardSSD_E60** \ - * **StandardSSD_E70** \ - * **StandardSSD_E80** \ - * **StandardSSD_E4** \ - * **StandardSSD_E6** - */ -export type AzureDiskSize = string; - -/** Known values of {@link CloudSuitability} that the service accepts. */ -export enum KnownCloudSuitability { - /** Unknown */ - Unknown = "Unknown", - /** NotSuitable */ - NotSuitable = "NotSuitable", - /** Suitable */ - Suitable = "Suitable", - /** ConditionallySuitable */ - ConditionallySuitable = "ConditionallySuitable", - /** ReadinessUnknown */ - ReadinessUnknown = "ReadinessUnknown" -} - -/** - * Defines values for CloudSuitability. \ - * {@link KnownCloudSuitability} can be used interchangeably with CloudSuitability, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **NotSuitable** \ - * **Suitable** \ - * **ConditionallySuitable** \ - * **ReadinessUnknown** - */ -export type CloudSuitability = string; - -/** Known values of {@link AzureDiskSuitabilityExplanation} that the service accepts. */ -export enum KnownAzureDiskSuitabilityExplanation { - /** Unknown */ - Unknown = "Unknown", - /** NotApplicable */ - NotApplicable = "NotApplicable", - /** DiskSizeGreaterThanSupported */ - DiskSizeGreaterThanSupported = "DiskSizeGreaterThanSupported", - /** NoSuitableDiskSizeForIops */ - NoSuitableDiskSizeForIops = "NoSuitableDiskSizeForIops", - /** NoSuitableDiskSizeForThroughput */ - NoSuitableDiskSizeForThroughput = "NoSuitableDiskSizeForThroughput", - /** NoDiskSizeFoundInSelectedLocation */ - NoDiskSizeFoundInSelectedLocation = "NoDiskSizeFoundInSelectedLocation", - /** NoDiskSizeFoundForSelectedRedundancy */ - NoDiskSizeFoundForSelectedRedundancy = "NoDiskSizeFoundForSelectedRedundancy", - /** InternalErrorOccurredForDiskEvaluation */ - InternalErrorOccurredForDiskEvaluation = "InternalErrorOccurredForDiskEvaluation", - /** NoEaPriceFoundForDiskSize */ - NoEaPriceFoundForDiskSize = "NoEaPriceFoundForDiskSize" -} - -/** - * Defines values for AzureDiskSuitabilityExplanation. \ - * {@link KnownAzureDiskSuitabilityExplanation} can be used interchangeably with AzureDiskSuitabilityExplanation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **NotApplicable** \ - * **DiskSizeGreaterThanSupported** \ - * **NoSuitableDiskSizeForIops** \ - * **NoSuitableDiskSizeForThroughput** \ - * **NoDiskSizeFoundInSelectedLocation** \ - * **NoDiskSizeFoundForSelectedRedundancy** \ - * **InternalErrorOccurredForDiskEvaluation** \ - * **NoEaPriceFoundForDiskSize** - */ -export type AzureDiskSuitabilityExplanation = string; - -/** Known values of {@link AzureDiskSuitabilityDetail} that the service accepts. */ -export enum KnownAzureDiskSuitabilityDetail { - /** None */ - None = "None", - /** NumberOfReadOperationsPerSecondMissing */ - NumberOfReadOperationsPerSecondMissing = "NumberOfReadOperationsPerSecondMissing", - /** NumberOfWriteOperationsPerSecondMissing */ - NumberOfWriteOperationsPerSecondMissing = "NumberOfWriteOperationsPerSecondMissing", - /** MegabytesPerSecondOfReadMissing */ - MegabytesPerSecondOfReadMissing = "MegabytesPerSecondOfReadMissing", - /** MegabytesPerSecondOfWriteMissing */ - MegabytesPerSecondOfWriteMissing = "MegabytesPerSecondOfWriteMissing", - /** DiskGigabytesConsumedMissing */ - DiskGigabytesConsumedMissing = "DiskGigabytesConsumedMissing", - /** DiskGigabytesProvisionedMissing */ - DiskGigabytesProvisionedMissing = "DiskGigabytesProvisionedMissing", - /** NumberOfReadOperationsPerSecondOutOfRange */ - NumberOfReadOperationsPerSecondOutOfRange = "NumberOfReadOperationsPerSecondOutOfRange", - /** NumberOfWriteOperationsPerSecondOutOfRange */ - NumberOfWriteOperationsPerSecondOutOfRange = "NumberOfWriteOperationsPerSecondOutOfRange", - /** MegabytesPerSecondOfReadOutOfRange */ - MegabytesPerSecondOfReadOutOfRange = "MegabytesPerSecondOfReadOutOfRange", - /** MegabytesPerSecondOfWriteOutOfRange */ - MegabytesPerSecondOfWriteOutOfRange = "MegabytesPerSecondOfWriteOutOfRange", - /** DiskGigabytesConsumedOutOfRange */ - DiskGigabytesConsumedOutOfRange = "DiskGigabytesConsumedOutOfRange", - /** DiskGigabytesProvisionedOutOfRange */ - DiskGigabytesProvisionedOutOfRange = "DiskGigabytesProvisionedOutOfRange" -} - -/** - * Defines values for AzureDiskSuitabilityDetail. \ - * {@link KnownAzureDiskSuitabilityDetail} can be used interchangeably with AzureDiskSuitabilityDetail, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **NumberOfReadOperationsPerSecondMissing** \ - * **NumberOfWriteOperationsPerSecondMissing** \ - * **MegabytesPerSecondOfReadMissing** \ - * **MegabytesPerSecondOfWriteMissing** \ - * **DiskGigabytesConsumedMissing** \ - * **DiskGigabytesProvisionedMissing** \ - * **NumberOfReadOperationsPerSecondOutOfRange** \ - * **NumberOfWriteOperationsPerSecondOutOfRange** \ - * **MegabytesPerSecondOfReadOutOfRange** \ - * **MegabytesPerSecondOfWriteOutOfRange** \ - * **DiskGigabytesConsumedOutOfRange** \ - * **DiskGigabytesProvisionedOutOfRange** - */ -export type AzureDiskSuitabilityDetail = string; - -/** Known values of {@link AzureNetworkAdapterSuitabilityExplanation} that the service accepts. */ -export enum KnownAzureNetworkAdapterSuitabilityExplanation { - /** Unknown */ - Unknown = "Unknown", - /** NotApplicable */ - NotApplicable = "NotApplicable", - /** InternalErrorOccurred */ - InternalErrorOccurred = "InternalErrorOccurred" -} - -/** - * Defines values for AzureNetworkAdapterSuitabilityExplanation. \ - * {@link KnownAzureNetworkAdapterSuitabilityExplanation} can be used interchangeably with AzureNetworkAdapterSuitabilityExplanation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **NotApplicable** \ - * **InternalErrorOccurred** - */ -export type AzureNetworkAdapterSuitabilityExplanation = string; - -/** Known values of {@link AzureNetworkAdapterSuitabilityDetail} that the service accepts. */ -export enum KnownAzureNetworkAdapterSuitabilityDetail { - /** None */ - None = "None", - /** MegabytesOfDataTransmittedMissing */ - MegabytesOfDataTransmittedMissing = "MegabytesOfDataTransmittedMissing", - /** MegabytesOfDataTransmittedOutOfRange */ - MegabytesOfDataTransmittedOutOfRange = "MegabytesOfDataTransmittedOutOfRange" -} - -/** - * Defines values for AzureNetworkAdapterSuitabilityDetail. \ - * {@link KnownAzureNetworkAdapterSuitabilityDetail} can be used interchangeably with AzureNetworkAdapterSuitabilityDetail, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **MegabytesOfDataTransmittedMissing** \ - * **MegabytesOfDataTransmittedOutOfRange** - */ -export type AzureNetworkAdapterSuitabilityDetail = string; - -/** Known values of {@link AzureVmSize} that the service accepts. */ -export enum KnownAzureVmSize { - /** Unknown */ - Unknown = "Unknown", - /** BasicA0 */ - BasicA0 = "Basic_A0", - /** BasicA1 */ - BasicA1 = "Basic_A1", - /** BasicA2 */ - BasicA2 = "Basic_A2", - /** BasicA3 */ - BasicA3 = "Basic_A3", - /** BasicA4 */ - BasicA4 = "Basic_A4", - /** StandardA0 */ - StandardA0 = "Standard_A0", - /** StandardA1 */ - StandardA1 = "Standard_A1", - /** StandardA2 */ - StandardA2 = "Standard_A2", - /** StandardA3 */ - StandardA3 = "Standard_A3", - /** StandardA4 */ - StandardA4 = "Standard_A4", - /** StandardA5 */ - StandardA5 = "Standard_A5", - /** StandardA6 */ - StandardA6 = "Standard_A6", - /** StandardA7 */ - StandardA7 = "Standard_A7", - /** StandardA8 */ - StandardA8 = "Standard_A8", - /** StandardA9 */ - StandardA9 = "Standard_A9", - /** StandardA10 */ - StandardA10 = "Standard_A10", - /** StandardA11 */ - StandardA11 = "Standard_A11", - /** StandardA1V2 */ - StandardA1V2 = "Standard_A1_v2", - /** StandardA2V2 */ - StandardA2V2 = "Standard_A2_v2", - /** StandardA4V2 */ - StandardA4V2 = "Standard_A4_v2", - /** StandardA8V2 */ - StandardA8V2 = "Standard_A8_v2", - /** StandardA2MV2 */ - StandardA2MV2 = "Standard_A2m_v2", - /** StandardA4MV2 */ - StandardA4MV2 = "Standard_A4m_v2", - /** StandardA8MV2 */ - StandardA8MV2 = "Standard_A8m_v2", - /** StandardD1 */ - StandardD1 = "Standard_D1", - /** StandardD2 */ - StandardD2 = "Standard_D2", - /** StandardD3 */ - StandardD3 = "Standard_D3", - /** StandardD4 */ - StandardD4 = "Standard_D4", - /** StandardD11 */ - StandardD11 = "Standard_D11", - /** StandardD12 */ - StandardD12 = "Standard_D12", - /** StandardD13 */ - StandardD13 = "Standard_D13", - /** StandardD14 */ - StandardD14 = "Standard_D14", - /** StandardD1V2 */ - StandardD1V2 = "Standard_D1_v2", - /** StandardD2V2 */ - StandardD2V2 = "Standard_D2_v2", - /** StandardD3V2 */ - StandardD3V2 = "Standard_D3_v2", - /** StandardD4V2 */ - StandardD4V2 = "Standard_D4_v2", - /** StandardD5V2 */ - StandardD5V2 = "Standard_D5_v2", - /** StandardD11V2 */ - StandardD11V2 = "Standard_D11_v2", - /** StandardD12V2 */ - StandardD12V2 = "Standard_D12_v2", - /** StandardD13V2 */ - StandardD13V2 = "Standard_D13_v2", - /** StandardD14V2 */ - StandardD14V2 = "Standard_D14_v2", - /** StandardD15V2 */ - StandardD15V2 = "Standard_D15_v2", - /** StandardDS1 */ - StandardDS1 = "Standard_DS1", - /** StandardDS2 */ - StandardDS2 = "Standard_DS2", - /** StandardDS3 */ - StandardDS3 = "Standard_DS3", - /** StandardDS4 */ - StandardDS4 = "Standard_DS4", - /** StandardDS11 */ - StandardDS11 = "Standard_DS11", - /** StandardDS12 */ - StandardDS12 = "Standard_DS12", - /** StandardDS13 */ - StandardDS13 = "Standard_DS13", - /** StandardDS14 */ - StandardDS14 = "Standard_DS14", - /** StandardDS1V2 */ - StandardDS1V2 = "Standard_DS1_v2", - /** StandardDS2V2 */ - StandardDS2V2 = "Standard_DS2_v2", - /** StandardDS3V2 */ - StandardDS3V2 = "Standard_DS3_v2", - /** StandardDS4V2 */ - StandardDS4V2 = "Standard_DS4_v2", - /** StandardDS5V2 */ - StandardDS5V2 = "Standard_DS5_v2", - /** StandardDS11V2 */ - StandardDS11V2 = "Standard_DS11_v2", - /** StandardDS12V2 */ - StandardDS12V2 = "Standard_DS12_v2", - /** StandardDS13V2 */ - StandardDS13V2 = "Standard_DS13_v2", - /** StandardDS14V2 */ - StandardDS14V2 = "Standard_DS14_v2", - /** StandardDS15V2 */ - StandardDS15V2 = "Standard_DS15_v2", - /** StandardF1 */ - StandardF1 = "Standard_F1", - /** StandardF2 */ - StandardF2 = "Standard_F2", - /** StandardF4 */ - StandardF4 = "Standard_F4", - /** StandardF8 */ - StandardF8 = "Standard_F8", - /** StandardF16 */ - StandardF16 = "Standard_F16", - /** StandardF1S */ - StandardF1S = "Standard_F1s", - /** StandardF2S */ - StandardF2S = "Standard_F2s", - /** StandardF4S */ - StandardF4S = "Standard_F4s", - /** StandardF8S */ - StandardF8S = "Standard_F8s", - /** StandardF16S */ - StandardF16S = "Standard_F16s", - /** StandardG1 */ - StandardG1 = "Standard_G1", - /** StandardG2 */ - StandardG2 = "Standard_G2", - /** StandardG3 */ - StandardG3 = "Standard_G3", - /** StandardG4 */ - StandardG4 = "Standard_G4", - /** StandardG5 */ - StandardG5 = "Standard_G5", - /** StandardGS1 */ - StandardGS1 = "Standard_GS1", - /** StandardGS2 */ - StandardGS2 = "Standard_GS2", - /** StandardGS3 */ - StandardGS3 = "Standard_GS3", - /** StandardGS4 */ - StandardGS4 = "Standard_GS4", - /** StandardGS5 */ - StandardGS5 = "Standard_GS5", - /** StandardH8 */ - StandardH8 = "Standard_H8", - /** StandardH16 */ - StandardH16 = "Standard_H16", - /** StandardH8M */ - StandardH8M = "Standard_H8m", - /** StandardH16M */ - StandardH16M = "Standard_H16m", - /** StandardH16R */ - StandardH16R = "Standard_H16r", - /** StandardH16Mr */ - StandardH16Mr = "Standard_H16mr", - /** StandardL4S */ - StandardL4S = "Standard_L4s", - /** StandardL8S */ - StandardL8S = "Standard_L8s", - /** StandardL16S */ - StandardL16S = "Standard_L16s", - /** StandardL32S */ - StandardL32S = "Standard_L32s", - /** StandardD2SV3 */ - StandardD2SV3 = "Standard_D2s_v3", - /** StandardD4SV3 */ - StandardD4SV3 = "Standard_D4s_v3", - /** StandardD8SV3 */ - StandardD8SV3 = "Standard_D8s_v3", - /** StandardD16SV3 */ - StandardD16SV3 = "Standard_D16s_v3", - /** StandardD32SV3 */ - StandardD32SV3 = "Standard_D32s_v3", - /** StandardD64SV3 */ - StandardD64SV3 = "Standard_D64s_v3", - /** StandardD2V3 */ - StandardD2V3 = "Standard_D2_v3", - /** StandardD4V3 */ - StandardD4V3 = "Standard_D4_v3", - /** StandardD8V3 */ - StandardD8V3 = "Standard_D8_v3", - /** StandardD16V3 */ - StandardD16V3 = "Standard_D16_v3", - /** StandardD32V3 */ - StandardD32V3 = "Standard_D32_v3", - /** StandardD64V3 */ - StandardD64V3 = "Standard_D64_v3", - /** StandardF2SV2 */ - StandardF2SV2 = "Standard_F2s_v2", - /** StandardF4SV2 */ - StandardF4SV2 = "Standard_F4s_v2", - /** StandardF8SV2 */ - StandardF8SV2 = "Standard_F8s_v2", - /** StandardF16SV2 */ - StandardF16SV2 = "Standard_F16s_v2", - /** StandardF32SV2 */ - StandardF32SV2 = "Standard_F32s_v2", - /** StandardF64SV2 */ - StandardF64SV2 = "Standard_F64s_v2", - /** StandardF72SV2 */ - StandardF72SV2 = "Standard_F72s_v2", - /** StandardE2V3 */ - StandardE2V3 = "Standard_E2_v3", - /** StandardE4V3 */ - StandardE4V3 = "Standard_E4_v3", - /** StandardE8V3 */ - StandardE8V3 = "Standard_E8_v3", - /** StandardE16V3 */ - StandardE16V3 = "Standard_E16_v3", - /** StandardE32V3 */ - StandardE32V3 = "Standard_E32_v3", - /** StandardE64V3 */ - StandardE64V3 = "Standard_E64_v3", - /** StandardE2SV3 */ - StandardE2SV3 = "Standard_E2s_v3", - /** StandardE4SV3 */ - StandardE4SV3 = "Standard_E4s_v3", - /** StandardE8SV3 */ - StandardE8SV3 = "Standard_E8s_v3", - /** StandardE16SV3 */ - StandardE16SV3 = "Standard_E16s_v3", - /** StandardE32SV3 */ - StandardE32SV3 = "Standard_E32s_v3", - /** StandardE64SV3 */ - StandardE64SV3 = "Standard_E64s_v3", - /** StandardM64S */ - StandardM64S = "Standard_M64s", - /** StandardM64Ms */ - StandardM64Ms = "Standard_M64ms", - /** StandardM128S */ - StandardM128S = "Standard_M128s", - /** StandardM128Ms */ - StandardM128Ms = "Standard_M128ms" -} - -/** - * Defines values for AzureVmSize. \ - * {@link KnownAzureVmSize} can be used interchangeably with AzureVmSize, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Basic_A0** \ - * **Basic_A1** \ - * **Basic_A2** \ - * **Basic_A3** \ - * **Basic_A4** \ - * **Standard_A0** \ - * **Standard_A1** \ - * **Standard_A2** \ - * **Standard_A3** \ - * **Standard_A4** \ - * **Standard_A5** \ - * **Standard_A6** \ - * **Standard_A7** \ - * **Standard_A8** \ - * **Standard_A9** \ - * **Standard_A10** \ - * **Standard_A11** \ - * **Standard_A1_v2** \ - * **Standard_A2_v2** \ - * **Standard_A4_v2** \ - * **Standard_A8_v2** \ - * **Standard_A2m_v2** \ - * **Standard_A4m_v2** \ - * **Standard_A8m_v2** \ - * **Standard_D1** \ - * **Standard_D2** \ - * **Standard_D3** \ - * **Standard_D4** \ - * **Standard_D11** \ - * **Standard_D12** \ - * **Standard_D13** \ - * **Standard_D14** \ - * **Standard_D1_v2** \ - * **Standard_D2_v2** \ - * **Standard_D3_v2** \ - * **Standard_D4_v2** \ - * **Standard_D5_v2** \ - * **Standard_D11_v2** \ - * **Standard_D12_v2** \ - * **Standard_D13_v2** \ - * **Standard_D14_v2** \ - * **Standard_D15_v2** \ - * **Standard_DS1** \ - * **Standard_DS2** \ - * **Standard_DS3** \ - * **Standard_DS4** \ - * **Standard_DS11** \ - * **Standard_DS12** \ - * **Standard_DS13** \ - * **Standard_DS14** \ - * **Standard_DS1_v2** \ - * **Standard_DS2_v2** \ - * **Standard_DS3_v2** \ - * **Standard_DS4_v2** \ - * **Standard_DS5_v2** \ - * **Standard_DS11_v2** \ - * **Standard_DS12_v2** \ - * **Standard_DS13_v2** \ - * **Standard_DS14_v2** \ - * **Standard_DS15_v2** \ - * **Standard_F1** \ - * **Standard_F2** \ - * **Standard_F4** \ - * **Standard_F8** \ - * **Standard_F16** \ - * **Standard_F1s** \ - * **Standard_F2s** \ - * **Standard_F4s** \ - * **Standard_F8s** \ - * **Standard_F16s** \ - * **Standard_G1** \ - * **Standard_G2** \ - * **Standard_G3** \ - * **Standard_G4** \ - * **Standard_G5** \ - * **Standard_GS1** \ - * **Standard_GS2** \ - * **Standard_GS3** \ - * **Standard_GS4** \ - * **Standard_GS5** \ - * **Standard_H8** \ - * **Standard_H16** \ - * **Standard_H8m** \ - * **Standard_H16m** \ - * **Standard_H16r** \ - * **Standard_H16mr** \ - * **Standard_L4s** \ - * **Standard_L8s** \ - * **Standard_L16s** \ - * **Standard_L32s** \ - * **Standard_D2s_v3** \ - * **Standard_D4s_v3** \ - * **Standard_D8s_v3** \ - * **Standard_D16s_v3** \ - * **Standard_D32s_v3** \ - * **Standard_D64s_v3** \ - * **Standard_D2_v3** \ - * **Standard_D4_v3** \ - * **Standard_D8_v3** \ - * **Standard_D16_v3** \ - * **Standard_D32_v3** \ - * **Standard_D64_v3** \ - * **Standard_F2s_v2** \ - * **Standard_F4s_v2** \ - * **Standard_F8s_v2** \ - * **Standard_F16s_v2** \ - * **Standard_F32s_v2** \ - * **Standard_F64s_v2** \ - * **Standard_F72s_v2** \ - * **Standard_E2_v3** \ - * **Standard_E4_v3** \ - * **Standard_E8_v3** \ - * **Standard_E16_v3** \ - * **Standard_E32_v3** \ - * **Standard_E64_v3** \ - * **Standard_E2s_v3** \ - * **Standard_E4s_v3** \ - * **Standard_E8s_v3** \ - * **Standard_E16s_v3** \ - * **Standard_E32s_v3** \ - * **Standard_E64s_v3** \ - * **Standard_M64s** \ - * **Standard_M64ms** \ - * **Standard_M128s** \ - * **Standard_M128ms** - */ -export type AzureVmSize = string; - -/** Known values of {@link AzureVmSuitabilityExplanation} that the service accepts. */ -export enum KnownAzureVmSuitabilityExplanation { - /** Unknown */ - Unknown = "Unknown", - /** NotApplicable */ - NotApplicable = "NotApplicable", - /** GuestOperatingSystemArchitectureNotSupported */ - GuestOperatingSystemArchitectureNotSupported = "GuestOperatingSystemArchitectureNotSupported", - /** GuestOperatingSystemNotSupported */ - GuestOperatingSystemNotSupported = "GuestOperatingSystemNotSupported", - /** BootTypeNotSupported */ - BootTypeNotSupported = "BootTypeNotSupported", - /** MoreDisksThanSupported */ - MoreDisksThanSupported = "MoreDisksThanSupported", - /** NoSuitableVmSizeFound */ - NoSuitableVmSizeFound = "NoSuitableVmSizeFound", - /** OneOrMoreDisksNotSuitable */ - OneOrMoreDisksNotSuitable = "OneOrMoreDisksNotSuitable", - /** OneOrMoreAdaptersNotSuitable */ - OneOrMoreAdaptersNotSuitable = "OneOrMoreAdaptersNotSuitable", - /** InternalErrorOccurredDuringComputeEvaluation */ - InternalErrorOccurredDuringComputeEvaluation = "InternalErrorOccurredDuringComputeEvaluation", - /** InternalErrorOccurredDuringStorageEvaluation */ - InternalErrorOccurredDuringStorageEvaluation = "InternalErrorOccurredDuringStorageEvaluation", - /** InternalErrorOccurredDuringNetworkEvaluation */ - InternalErrorOccurredDuringNetworkEvaluation = "InternalErrorOccurredDuringNetworkEvaluation", - /** NoVmSizeSupportsStoragePerformance */ - NoVmSizeSupportsStoragePerformance = "NoVmSizeSupportsStoragePerformance", - /** NoVmSizeSupportsNetworkPerformance */ - NoVmSizeSupportsNetworkPerformance = "NoVmSizeSupportsNetworkPerformance", - /** NoVmSizeForSelectedPricingTier */ - NoVmSizeForSelectedPricingTier = "NoVmSizeForSelectedPricingTier", - /** NoVmSizeForSelectedAzureLocation */ - NoVmSizeForSelectedAzureLocation = "NoVmSizeForSelectedAzureLocation", - /** CheckRedHatLinuxVersion */ - CheckRedHatLinuxVersion = "CheckRedHatLinuxVersion", - /** CheckOpenSuseLinuxVersion */ - CheckOpenSuseLinuxVersion = "CheckOpenSuseLinuxVersion", - /** CheckWindowsServer2008R2Version */ - CheckWindowsServer2008R2Version = "CheckWindowsServer2008R2Version", - /** CheckCentOsVersion */ - CheckCentOsVersion = "CheckCentOsVersion", - /** CheckDebianLinuxVersion */ - CheckDebianLinuxVersion = "CheckDebianLinuxVersion", - /** CheckSuseLinuxVersion */ - CheckSuseLinuxVersion = "CheckSuseLinuxVersion", - /** CheckOracleLinuxVersion */ - CheckOracleLinuxVersion = "CheckOracleLinuxVersion", - /** CheckUbuntuLinuxVersion */ - CheckUbuntuLinuxVersion = "CheckUbuntuLinuxVersion", - /** CheckCoreOsLinuxVersion */ - CheckCoreOsLinuxVersion = "CheckCoreOsLinuxVersion", - /** WindowsServerVersionConditionallySupported */ - WindowsServerVersionConditionallySupported = "WindowsServerVersionConditionallySupported", - /** NoGuestOperatingSystemConditionallySupported */ - NoGuestOperatingSystemConditionallySupported = "NoGuestOperatingSystemConditionallySupported", - /** WindowsClientVersionsConditionallySupported */ - WindowsClientVersionsConditionallySupported = "WindowsClientVersionsConditionallySupported", - /** BootTypeUnknown */ - BootTypeUnknown = "BootTypeUnknown", - /** GuestOperatingSystemUnknown */ - GuestOperatingSystemUnknown = "GuestOperatingSystemUnknown", - /** WindowsServerVersionsSupportedWithCaveat */ - WindowsServerVersionsSupportedWithCaveat = "WindowsServerVersionsSupportedWithCaveat", - /** WindowsOSNoLongerUnderMSSupport */ - WindowsOSNoLongerUnderMSSupport = "WindowsOSNoLongerUnderMSSupport", - /** EndorsedWithConditionsLinuxDistributions */ - EndorsedWithConditionsLinuxDistributions = "EndorsedWithConditionsLinuxDistributions", - /** UnendorsedLinuxDistributions */ - UnendorsedLinuxDistributions = "UnendorsedLinuxDistributions", - /** NoVmSizeForStandardPricingTier */ - NoVmSizeForStandardPricingTier = "NoVmSizeForStandardPricingTier", - /** NoVmSizeForBasicPricingTier */ - NoVmSizeForBasicPricingTier = "NoVmSizeForBasicPricingTier" -} - -/** - * Defines values for AzureVmSuitabilityExplanation. \ - * {@link KnownAzureVmSuitabilityExplanation} can be used interchangeably with AzureVmSuitabilityExplanation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **NotApplicable** \ - * **GuestOperatingSystemArchitectureNotSupported** \ - * **GuestOperatingSystemNotSupported** \ - * **BootTypeNotSupported** \ - * **MoreDisksThanSupported** \ - * **NoSuitableVmSizeFound** \ - * **OneOrMoreDisksNotSuitable** \ - * **OneOrMoreAdaptersNotSuitable** \ - * **InternalErrorOccurredDuringComputeEvaluation** \ - * **InternalErrorOccurredDuringStorageEvaluation** \ - * **InternalErrorOccurredDuringNetworkEvaluation** \ - * **NoVmSizeSupportsStoragePerformance** \ - * **NoVmSizeSupportsNetworkPerformance** \ - * **NoVmSizeForSelectedPricingTier** \ - * **NoVmSizeForSelectedAzureLocation** \ - * **CheckRedHatLinuxVersion** \ - * **CheckOpenSuseLinuxVersion** \ - * **CheckWindowsServer2008R2Version** \ - * **CheckCentOsVersion** \ - * **CheckDebianLinuxVersion** \ - * **CheckSuseLinuxVersion** \ - * **CheckOracleLinuxVersion** \ - * **CheckUbuntuLinuxVersion** \ - * **CheckCoreOsLinuxVersion** \ - * **WindowsServerVersionConditionallySupported** \ - * **NoGuestOperatingSystemConditionallySupported** \ - * **WindowsClientVersionsConditionallySupported** \ - * **BootTypeUnknown** \ - * **GuestOperatingSystemUnknown** \ - * **WindowsServerVersionsSupportedWithCaveat** \ - * **WindowsOSNoLongerUnderMSSupport** \ - * **EndorsedWithConditionsLinuxDistributions** \ - * **UnendorsedLinuxDistributions** \ - * **NoVmSizeForStandardPricingTier** \ - * **NoVmSizeForBasicPricingTier** - */ -export type AzureVmSuitabilityExplanation = string; - -/** Known values of {@link AzureVmSuitabilityDetail} that the service accepts. */ -export enum KnownAzureVmSuitabilityDetail { - /** None */ - None = "None", - /** RecommendedSizeHasLessNetworkAdapters */ - RecommendedSizeHasLessNetworkAdapters = "RecommendedSizeHasLessNetworkAdapters", - /** CannotReportComputeCost */ - CannotReportComputeCost = "CannotReportComputeCost", - /** CannotReportStorageCost */ - CannotReportStorageCost = "CannotReportStorageCost", - /** CannotReportBandwidthCosts */ - CannotReportBandwidthCosts = "CannotReportBandwidthCosts", - /** PercentageOfCoresUtilizedMissing */ - PercentageOfCoresUtilizedMissing = "PercentageOfCoresUtilizedMissing", - /** PercentageOfMemoryUtilizedMissing */ - PercentageOfMemoryUtilizedMissing = "PercentageOfMemoryUtilizedMissing", - /** PercentageOfCoresUtilizedOutOfRange */ - PercentageOfCoresUtilizedOutOfRange = "PercentageOfCoresUtilizedOutOfRange", - /** PercentageOfMemoryUtilizedOutOfRange */ - PercentageOfMemoryUtilizedOutOfRange = "PercentageOfMemoryUtilizedOutOfRange" -} - -/** - * Defines values for AzureVmSuitabilityDetail. \ - * {@link KnownAzureVmSuitabilityDetail} can be used interchangeably with AzureVmSuitabilityDetail, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **RecommendedSizeHasLessNetworkAdapters** \ - * **CannotReportComputeCost** \ - * **CannotReportStorageCost** \ - * **CannotReportBandwidthCosts** \ - * **PercentageOfCoresUtilizedMissing** \ - * **PercentageOfMemoryUtilizedMissing** \ - * **PercentageOfCoresUtilizedOutOfRange** \ - * **PercentageOfMemoryUtilizedOutOfRange** - */ -export type AzureVmSuitabilityDetail = string; - -/** Optional parameters. */ -export interface ProjectsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type ProjectsListBySubscriptionResponse = ProjectsListBySubscriptionHeaders & - ProjectResultList; - -/** Optional parameters. */ -export interface ProjectsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ProjectsListResponse = ProjectsListHeaders & ProjectResultList; - -/** Optional parameters. */ -export interface ProjectsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ProjectsGetResponse = ProjectsGetHeaders & Project; - -/** Optional parameters. */ -export interface ProjectsCreateOptionalParams - extends coreClient.OperationOptions { - /** New or Updated project object. */ - project?: Project; -} - -/** Contains response data for the create operation. */ -export type ProjectsCreateResponse = ProjectsCreateHeaders & Project; - -/** Optional parameters. */ -export interface ProjectsUpdateOptionalParams - extends coreClient.OperationOptions { - /** Updated project object. */ - project?: Project; -} - -/** Contains response data for the update operation. */ -export type ProjectsUpdateResponse = ProjectsUpdateHeaders & Project; - -/** Optional parameters. */ -export interface ProjectsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the delete operation. */ -export type ProjectsDeleteResponse = ProjectsDeleteHeaders; - -/** Optional parameters. */ -export interface ProjectsAssessmentOptionsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the assessmentOptions operation. */ -export type ProjectsAssessmentOptionsResponse = ProjectsAssessmentOptionsHeaders & - AssessmentOptions; - -/** Optional parameters. */ -export interface ProjectsAssessmentOptionsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the assessmentOptionsList operation. */ -export type ProjectsAssessmentOptionsListResponse = ProjectsAssessmentOptionsListHeaders & - AssessmentOptionsResultList; - -/** Optional parameters. */ -export interface ProjectsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type ProjectsListBySubscriptionNextResponse = ProjectsListBySubscriptionNextHeaders & - ProjectResultList; - -/** Optional parameters. */ -export interface ProjectsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ProjectsListNextResponse = ProjectsListNextHeaders & - ProjectResultList; - -/** Optional parameters. */ -export interface MachinesListByProjectOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProject operation. */ -export type MachinesListByProjectResponse = MachinesListByProjectHeaders & - MachineResultList; - -/** Optional parameters. */ -export interface MachinesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type MachinesGetResponse = MachinesGetHeaders & Machine; - -/** Optional parameters. */ -export interface MachinesListByProjectNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProjectNext operation. */ -export type MachinesListByProjectNextResponse = MachinesListByProjectNextHeaders & - MachineResultList; - -/** Optional parameters. */ -export interface GroupsListByProjectOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProject operation. */ -export type GroupsListByProjectResponse = GroupsListByProjectHeaders & - GroupResultList; - -/** Optional parameters. */ -export interface GroupsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type GroupsGetResponse = GroupsGetHeaders & Group; - -/** Optional parameters. */ -export interface GroupsCreateOptionalParams - extends coreClient.OperationOptions { - /** New or Updated Group object. */ - group?: Group; -} - -/** Contains response data for the create operation. */ -export type GroupsCreateResponse = GroupsCreateHeaders & Group; - -/** Optional parameters. */ -export interface GroupsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the delete operation. */ -export type GroupsDeleteResponse = GroupsDeleteHeaders; - -/** Optional parameters. */ -export interface GroupsUpdateMachinesOptionalParams - extends coreClient.OperationOptions { - /** Machines list to be added or removed from group. */ - groupUpdateProperties?: UpdateGroupBody; -} - -/** Contains response data for the updateMachines operation. */ -export type GroupsUpdateMachinesResponse = GroupsUpdateMachinesHeaders & Group; - -/** Optional parameters. */ -export interface AssessmentsListByGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByGroup operation. */ -export type AssessmentsListByGroupResponse = AssessmentsListByGroupHeaders & - AssessmentResultList; - -/** Optional parameters. */ -export interface AssessmentsListByProjectOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProject operation. */ -export type AssessmentsListByProjectResponse = AssessmentsListByProjectHeaders & - AssessmentResultList; - -/** Optional parameters. */ -export interface AssessmentsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AssessmentsGetResponse = AssessmentsGetHeaders & Assessment; - -/** Optional parameters. */ -export interface AssessmentsCreateOptionalParams - extends coreClient.OperationOptions { - /** New or Updated Assessment object. */ - assessment?: Assessment; -} - -/** Contains response data for the create operation. */ -export type AssessmentsCreateResponse = AssessmentsCreateHeaders & Assessment; - -/** Optional parameters. */ -export interface AssessmentsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the delete operation. */ -export type AssessmentsDeleteResponse = AssessmentsDeleteHeaders; - -/** Optional parameters. */ -export interface AssessmentsGetReportDownloadUrlOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getReportDownloadUrl operation. */ -export type AssessmentsGetReportDownloadUrlResponse = AssessmentsGetReportDownloadUrlHeaders & - DownloadUrl; - -/** Optional parameters. */ -export interface AssessedMachinesListByAssessmentOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByAssessment operation. */ -export type AssessedMachinesListByAssessmentResponse = AssessedMachinesListByAssessmentHeaders & - AssessedMachineResultList; - -/** Optional parameters. */ -export interface AssessedMachinesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AssessedMachinesGetResponse = AssessedMachinesGetHeaders & - AssessedMachine; - -/** Optional parameters. */ -export interface AssessedMachinesListByAssessmentNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByAssessmentNext operation. */ -export type AssessedMachinesListByAssessmentNextResponse = AssessedMachinesListByAssessmentNextHeaders & - AssessedMachineResultList; - -/** Optional parameters. */ -export interface HyperVCollectorsListByProjectOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProject operation. */ -export type HyperVCollectorsListByProjectResponse = HyperVCollectorsListByProjectHeaders & - HyperVCollectorList; - -/** Optional parameters. */ -export interface HyperVCollectorsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type HyperVCollectorsGetResponse = HyperVCollectorsGetHeaders & - HyperVCollector; - -/** Optional parameters. */ -export interface HyperVCollectorsCreateOptionalParams - extends coreClient.OperationOptions { - /** New or Updated Hyper-V collector. */ - collectorBody?: HyperVCollector; -} - -/** Contains response data for the create operation. */ -export type HyperVCollectorsCreateResponse = HyperVCollectorsCreateHeaders & - HyperVCollector; - -/** Optional parameters. */ -export interface HyperVCollectorsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the delete operation. */ -export type HyperVCollectorsDeleteResponse = HyperVCollectorsDeleteHeaders; - -/** Optional parameters. */ -export interface ServerCollectorsListByProjectOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProject operation. */ -export type ServerCollectorsListByProjectResponse = ServerCollectorsListByProjectHeaders & - ServerCollectorList; - -/** Optional parameters. */ -export interface ServerCollectorsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ServerCollectorsGetResponse = ServerCollectorsGetHeaders & - ServerCollector; - -/** Optional parameters. */ -export interface ServerCollectorsCreateOptionalParams - extends coreClient.OperationOptions { - /** New or Updated Server collector. */ - collectorBody?: ServerCollector; -} - -/** Contains response data for the create operation. */ -export type ServerCollectorsCreateResponse = ServerCollectorsCreateHeaders & - ServerCollector; - -/** Optional parameters. */ -export interface ServerCollectorsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the delete operation. */ -export type ServerCollectorsDeleteResponse = ServerCollectorsDeleteHeaders; - -/** Optional parameters. */ -export interface VMwareCollectorsListByProjectOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProject operation. */ -export type VMwareCollectorsListByProjectResponse = VMwareCollectorsListByProjectHeaders & - VMwareCollectorList; - -/** Optional parameters. */ -export interface VMwareCollectorsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VMwareCollectorsGetResponse = VMwareCollectorsGetHeaders & - VMwareCollector; - -/** Optional parameters. */ -export interface VMwareCollectorsCreateOptionalParams - extends coreClient.OperationOptions { - /** New or Updated VMware collector. */ - collectorBody?: VMwareCollector; -} - -/** Contains response data for the create operation. */ -export type VMwareCollectorsCreateResponse = VMwareCollectorsCreateHeaders & - VMwareCollector; - -/** Optional parameters. */ -export interface VMwareCollectorsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the delete operation. */ -export type VMwareCollectorsDeleteResponse = VMwareCollectorsDeleteHeaders; - -/** Optional parameters. */ -export interface ImportCollectorsListByProjectOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProject operation. */ -export type ImportCollectorsListByProjectResponse = ImportCollectorsListByProjectHeaders & - ImportCollectorList; - -/** Optional parameters. */ -export interface ImportCollectorsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ImportCollectorsGetResponse = ImportCollectorsGetHeaders & - ImportCollector; - -/** Optional parameters. */ -export interface ImportCollectorsCreateOptionalParams - extends coreClient.OperationOptions { - /** New or Updated Import collector. */ - collectorBody?: ImportCollector; -} - -/** Contains response data for the create operation. */ -export type ImportCollectorsCreateResponse = ImportCollectorsCreateHeaders & - ImportCollector; - -/** Optional parameters. */ -export interface ImportCollectorsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the delete operation. */ -export type ImportCollectorsDeleteResponse = ImportCollectorsDeleteHeaders; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionListByProjectOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProject operation. */ -export type PrivateEndpointConnectionListByProjectResponse = PrivateEndpointConnectionListByProjectHeaders & - PrivateEndpointConnectionCollection; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PrivateEndpointConnectionGetResponse = PrivateEndpointConnectionGetHeaders & - PrivateEndpointConnection; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionUpdateOptionalParams - extends coreClient.OperationOptions { - /** New or Updated Private Endpoint Connection object. */ - privateEndpointConnectionBody?: PrivateEndpointConnection; -} - -/** Contains response data for the update operation. */ -export type PrivateEndpointConnectionUpdateResponse = PrivateEndpointConnectionUpdateHeaders & - PrivateEndpointConnection; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the delete operation. */ -export type PrivateEndpointConnectionDeleteResponse = PrivateEndpointConnectionDeleteHeaders; - -/** Optional parameters. */ -export interface PrivateLinkResourceGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PrivateLinkResourceGetResponse = PrivateLinkResourceGetHeaders & - PrivateLinkResource; - -/** Optional parameters. */ -export interface PrivateLinkResourceListByProjectOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProject operation. */ -export type PrivateLinkResourceListByProjectResponse = PrivateLinkResourceListByProjectHeaders & - PrivateLinkResourceCollection; - -/** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type OperationsListResponse = OperationResultList; - -/** Optional parameters. */ -export interface AzureMigrateV2OptionalParams - extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + AvsAssessmentV2, + AvsAssessmentPropertiesV2, + KnownProvisioningState, + ProvisioningState, + Scope, + KnownScopeType, + ScopeType, + AvsAssessmentSettings, + KnownAzureCurrency, + AzureCurrency, + KnownAssessmentSizingCriterion, + AssessmentSizingCriterion, + PerformanceData, + KnownPercentile, + Percentile, + KnownTimeRange, + TimeRange, + SavingsSettings, + KnownSavingsOptions, + SavingsOptions, + KnownAzureOffer, + AzureOffer, + BillingSettings, + KnownLicensingProgram, + LicensingProgram, + KnownEnvironmentType, + EnvironmentType, + KnownFttAndRaidLevel, + FttAndRaidLevel, + KnownAzureAvsNodeType, + AzureAvsNodeType, + KnownAvsAssessmentScenario, + AvsAssessmentScenario, + KnownExternalStorageType, + ExternalStorageType, + AssessmentDetails, + KnownAssessmentStatus, + AssessmentStatus, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + DownloadUrl, + AvsAssessedMachineV2, + AvsAssessedMachinePropertiesV2, + KnownMigrateWorkloadType, + MigrateWorkloadType, + Linkages, + KnownLinkageType, + LinkageType, + KnownLinkageKind, + LinkageKind, + AvsRecommendationsMigrationIssuesMigrationSuitabilitySkus, + Configuration, + KnownAzureTarget, + AzureTarget, + RecommendedFor, + KnownStrategyType, + StrategyType, + KnownMigrationPlatform, + MigrationPlatform, + MigrationSuitability, + KnownCloudSuitabilityCommon, + CloudSuitabilityCommon, + SecuritySuitability, + CostDetailsCommon, + NameValuePairCostType, + KnownCostType, + CostType, + SavingsDetailsCommon, + NameValuePairSavingsType, + KnownSavingsType, + SavingsType, + MigrationIssues, + KnownMigrationIssuesCategory, + MigrationIssuesCategory, + MoreInformation, + SkusMigrationSuitability, + KnownSkuKind, + SkuKind, + KnownSkuType, + SkuType, + SourceRecommendationMigrationSuitability, + SkuDetails, + NameValuePair, + AvsAssessedMachineExtendedDetails, + ErrorModel, + AvsAssessedDiskV2, + AvsAssessedNetworkAdapter, + KnownMachineBootType, + MachineBootType, + KnownGuestOperatingSystemArchitecture, + GuestOperatingSystemArchitecture, + KnownAssessedMachineType, + AssessedMachineType, + AvsAssessmentV2Summary, + AvsAssessmentSummaryPropertiesV2, + KnownSummaryType, + SummaryType, + SourceDetails, + KnownAssessmentSource, + AssessmentSource, + TargetDetails, + TargetSourcePair, + MigrationDetails, + NameValuePairCloudSuitabilityCommon, + KnownMigrationType, + MigrationType, + ManagementDetails, + KnownAzureManagementOfferingType, + AzureManagementOfferingType, + KnownCloudSuitability, + CloudSuitability, + KnownAzureAvsSuitabilityExplanation, + AzureAvsSuitabilityExplanation, + AvsEstimatedNode, + KnownAzureReservedInstance, + AzureReservedInstance, + AvsEstimatedExternalStorage, + AvsEstimatedNetwork, + KnownNetworkSkuType, + NetworkSkuType, + AvsGraphAssessmentOptions, + AvsGraphAssessmentOptionsProperties, + AvsAssessmentOptionsOutboundEdgeGroup, + KnownAzureLocation, + AzureLocation, + KnownAvsApiVersions, +} from "./models.js"; diff --git a/sdk/migrate/arm-migrate/src/models/mappers.ts b/sdk/migrate/arm-migrate/src/models/mappers.ts deleted file mode 100644 index 7dae35de5ddc..000000000000 --- a/sdk/migrate/arm-migrate/src/models/mappers.ts +++ /dev/null @@ -1,3135 +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 coreClient from "@azure/core-client"; - -export const ProjectResultList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectResultList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Project" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const Project: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Project", - 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" - } - }, - eTag: { - serializedName: "eTag", - type: { - name: "String" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ProjectProperties" - } - } - } - } -}; - -export const ProjectProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectProperties", - modelProperties: { - createdTimestamp: { - serializedName: "createdTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - updatedTimestamp: { - serializedName: "updatedTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - serviceEndpoint: { - serializedName: "serviceEndpoint", - readOnly: true, - type: { - name: "String" - } - }, - assessmentSolutionId: { - serializedName: "assessmentSolutionId", - type: { - name: "String" - } - }, - projectStatus: { - serializedName: "projectStatus", - type: { - name: "String" - } - }, - customerWorkspaceId: { - serializedName: "customerWorkspaceId", - type: { - name: "String" - } - }, - customerWorkspaceLocation: { - serializedName: "customerWorkspaceLocation", - type: { - name: "String" - } - }, - numberOfGroups: { - serializedName: "numberOfGroups", - readOnly: true, - type: { - name: "Number" - } - }, - numberOfMachines: { - serializedName: "numberOfMachines", - readOnly: true, - type: { - name: "Number" - } - }, - numberOfAssessments: { - serializedName: "numberOfAssessments", - readOnly: true, - type: { - name: "Number" - } - }, - lastAssessmentTimestamp: { - serializedName: "lastAssessmentTimestamp", - readOnly: true, - nullable: true, - type: { - name: "DateTime" - } - }, - publicNetworkAccess: { - serializedName: "publicNetworkAccess", - type: { - name: "String" - } - }, - privateEndpointConnections: { - serializedName: "privateEndpointConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } - } - }, - customerStorageAccountArmId: { - serializedName: "customerStorageAccountArmId", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PrivateEndpointConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - eTag: { - serializedName: "eTag", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "PrivateEndpointConnectionProperties" - } - } - } - } -}; - -export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionProperties", - modelProperties: { - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - privateEndpoint: { - serializedName: "privateEndpoint", - type: { - name: "Composite", - className: "ResourceId" - } - }, - privateLinkServiceConnectionState: { - serializedName: "privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState" - } - } - } - } -}; - -export const ResourceId: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceId", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - modelProperties: { - status: { - serializedName: "status", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - }, - actionsRequired: { - serializedName: "actionsRequired", - type: { - name: "String" - } - } - } - } -}; - -export const CloudError: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudError", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "CloudErrorBody" - } - } - } - } -}; - -export const CloudErrorBody: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudErrorBody", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - }, - target: { - serializedName: "target", - type: { - name: "String" - } - }, - details: { - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CloudErrorBody" - } - } - } - } - } - } -}; - -export const AssessmentOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessmentOptions", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AssessmentOptionsProperties" - } - } - } - } -}; - -export const AssessmentOptionsProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessmentOptionsProperties", - modelProperties: { - vmFamilies: { - serializedName: "vmFamilies", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VmFamily" - } - } - } - }, - reservedInstanceVmFamilies: { - serializedName: "reservedInstanceVmFamilies", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - reservedInstanceSupportedLocations: { - serializedName: "reservedInstanceSupportedLocations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - reservedInstanceSupportedCurrencies: { - serializedName: "reservedInstanceSupportedCurrencies", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - reservedInstanceSupportedOffers: { - serializedName: "reservedInstanceSupportedOffers", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const VmFamily: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmFamily", - modelProperties: { - familyName: { - serializedName: "familyName", - readOnly: true, - type: { - name: "String" - } - }, - targetLocations: { - serializedName: "targetLocations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - category: { - serializedName: "category", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const AssessmentOptionsResultList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessmentOptionsResultList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AssessmentOptions" - } - } - } - } - } - } -}; - -export const MachineResultList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineResultList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Machine" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const Machine: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Machine", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - eTag: { - serializedName: "eTag", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "MachineProperties" - } - } - } - } -}; - -export const MachineProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineProperties", - modelProperties: { - bootType: { - serializedName: "bootType", - readOnly: true, - type: { - name: "String" - } - }, - datacenterManagementServerArmId: { - serializedName: "datacenterManagementServerArmId", - readOnly: true, - type: { - name: "String" - } - }, - discoveryMachineArmId: { - serializedName: "discoveryMachineArmId", - readOnly: true, - type: { - name: "String" - } - }, - datacenterManagementServerName: { - serializedName: "datacenterManagementServerName", - readOnly: true, - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String" - } - }, - megabytesOfMemory: { - serializedName: "megabytesOfMemory", - readOnly: true, - type: { - name: "Number" - } - }, - numberOfCores: { - serializedName: "numberOfCores", - readOnly: true, - type: { - name: "Number" - } - }, - operatingSystemType: { - serializedName: "operatingSystemType", - readOnly: true, - type: { - name: "String" - } - }, - operatingSystemName: { - serializedName: "operatingSystemName", - readOnly: true, - type: { - name: "String" - } - }, - operatingSystemVersion: { - serializedName: "operatingSystemVersion", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String" - } - }, - groups: { - serializedName: "groups", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - createdTimestamp: { - serializedName: "createdTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - updatedTimestamp: { - serializedName: "updatedTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - disks: { - serializedName: "disks", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "Disk" } } - } - }, - networkAdapters: { - serializedName: "networkAdapters", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "NetworkAdapter" } } - } - } - } - } -}; - -export const Disk: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Disk", - modelProperties: { - gigabytesAllocated: { - serializedName: "gigabytesAllocated", - readOnly: true, - type: { - name: "Number" - } - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const NetworkAdapter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkAdapter", - modelProperties: { - macAddress: { - serializedName: "macAddress", - readOnly: true, - type: { - name: "String" - } - }, - ipAddresses: { - serializedName: "ipAddresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const GroupResultList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GroupResultList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Group" - } - } - } - } - } - } -}; - -export const Group: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Group", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - eTag: { - serializedName: "eTag", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "GroupProperties" - } - } - } - } -}; - -export const GroupProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GroupProperties", - modelProperties: { - groupStatus: { - serializedName: "groupStatus", - readOnly: true, - type: { - name: "String" - } - }, - machineCount: { - serializedName: "machineCount", - readOnly: true, - type: { - name: "Number" - } - }, - assessments: { - serializedName: "assessments", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - areAssessmentsRunning: { - serializedName: "areAssessmentsRunning", - readOnly: true, - type: { - name: "Boolean" - } - }, - createdTimestamp: { - serializedName: "createdTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - updatedTimestamp: { - serializedName: "updatedTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - groupType: { - serializedName: "groupType", - type: { - name: "String" - } - } - } - } -}; - -export const UpdateGroupBody: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UpdateGroupBody", - modelProperties: { - eTag: { - serializedName: "eTag", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "GroupBodyProperties" - } - } - } - } -}; - -export const GroupBodyProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GroupBodyProperties", - modelProperties: { - operationType: { - serializedName: "operationType", - type: { - name: "String" - } - }, - machines: { - serializedName: "machines", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const AssessmentResultList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessmentResultList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Assessment" - } - } - } - } - } - } -}; - -export const Assessment: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Assessment", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - eTag: { - serializedName: "eTag", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AssessmentProperties" - } - } - } - } -}; - -export const AssessmentProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessmentProperties", - modelProperties: { - azureLocation: { - serializedName: "azureLocation", - required: true, - type: { - name: "String" - } - }, - azureOfferCode: { - serializedName: "azureOfferCode", - required: true, - type: { - name: "String" - } - }, - eaSubscriptionId: { - serializedName: "eaSubscriptionId", - readOnly: true, - type: { - name: "String" - } - }, - azurePricingTier: { - serializedName: "azurePricingTier", - required: true, - type: { - name: "String" - } - }, - azureStorageRedundancy: { - serializedName: "azureStorageRedundancy", - required: true, - type: { - name: "String" - } - }, - scalingFactor: { - serializedName: "scalingFactor", - required: true, - type: { - name: "Number" - } - }, - percentile: { - serializedName: "percentile", - required: true, - type: { - name: "String" - } - }, - timeRange: { - serializedName: "timeRange", - required: true, - type: { - name: "String" - } - }, - perfDataStartTime: { - serializedName: "perfDataStartTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - perfDataEndTime: { - serializedName: "perfDataEndTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - stage: { - serializedName: "stage", - required: true, - type: { - name: "String" - } - }, - currency: { - serializedName: "currency", - required: true, - type: { - name: "String" - } - }, - azureHybridUseBenefit: { - serializedName: "azureHybridUseBenefit", - required: true, - type: { - name: "String" - } - }, - discountPercentage: { - serializedName: "discountPercentage", - required: true, - type: { - name: "Number" - } - }, - confidenceRatingInPercentage: { - serializedName: "confidenceRatingInPercentage", - readOnly: true, - nullable: true, - type: { - name: "Number" - } - }, - sizingCriterion: { - serializedName: "sizingCriterion", - required: true, - type: { - name: "String" - } - }, - reservedInstance: { - serializedName: "reservedInstance", - required: true, - type: { - name: "String" - } - }, - azureVmFamilies: { - serializedName: "azureVmFamilies", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - azureDiskType: { - serializedName: "azureDiskType", - required: true, - type: { - name: "String" - } - }, - vmUptime: { - serializedName: "vmUptime", - type: { - name: "Composite", - className: "VmUptime" - } - }, - pricesTimestamp: { - serializedName: "pricesTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - createdTimestamp: { - serializedName: "createdTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - updatedTimestamp: { - serializedName: "updatedTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - monthlyComputeCost: { - serializedName: "monthlyComputeCost", - readOnly: true, - type: { - name: "Number" - } - }, - monthlyBandwidthCost: { - serializedName: "monthlyBandwidthCost", - readOnly: true, - type: { - name: "Number" - } - }, - monthlyStorageCost: { - serializedName: "monthlyStorageCost", - readOnly: true, - type: { - name: "Number" - } - }, - monthlyPremiumStorageCost: { - serializedName: "monthlyPremiumStorageCost", - readOnly: true, - type: { - name: "Number" - } - }, - monthlyStandardSSDStorageCost: { - serializedName: "monthlyStandardSSDStorageCost", - readOnly: true, - type: { - name: "Number" - } - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String" - } - }, - numberOfMachines: { - serializedName: "numberOfMachines", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; - -export const VmUptime: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmUptime", - modelProperties: { - daysPerMonth: { - serializedName: "daysPerMonth", - type: { - name: "Number" - } - }, - hoursPerDay: { - serializedName: "hoursPerDay", - type: { - name: "Number" - } - } - } - } -}; - -export const DownloadUrl: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DownloadUrl", - modelProperties: { - assessmentReportUrl: { - serializedName: "assessmentReportUrl", - readOnly: true, - type: { - name: "String" - } - }, - expirationTime: { - serializedName: "expirationTime", - readOnly: true, - type: { - name: "DateTime" - } - } - } - } -}; - -export const AssessedMachineResultList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessedMachineResultList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AssessedMachine" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const AssessedMachine: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessedMachine", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - eTag: { - serializedName: "eTag", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AssessedMachineProperties" - } - } - } - } -}; - -export const AssessedMachineProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessedMachineProperties", - modelProperties: { - bootType: { - serializedName: "bootType", - readOnly: true, - type: { - name: "String" - } - }, - datacenterMachineArmId: { - serializedName: "datacenterMachineArmId", - readOnly: true, - type: { - name: "String" - } - }, - datacenterManagementServerArmId: { - serializedName: "datacenterManagementServerArmId", - readOnly: true, - type: { - name: "String" - } - }, - datacenterManagementServerName: { - serializedName: "datacenterManagementServerName", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String" - } - }, - megabytesOfMemory: { - serializedName: "megabytesOfMemory", - readOnly: true, - type: { - name: "Number" - } - }, - numberOfCores: { - serializedName: "numberOfCores", - readOnly: true, - type: { - name: "Number" - } - }, - operatingSystemType: { - serializedName: "operatingSystemType", - readOnly: true, - type: { - name: "String" - } - }, - operatingSystemName: { - serializedName: "operatingSystemName", - readOnly: true, - type: { - name: "String" - } - }, - operatingSystemVersion: { - serializedName: "operatingSystemVersion", - readOnly: true, - type: { - name: "String" - } - }, - monthlyBandwidthCost: { - serializedName: "monthlyBandwidthCost", - readOnly: true, - type: { - name: "Number" - } - }, - monthlyStorageCost: { - serializedName: "monthlyStorageCost", - readOnly: true, - type: { - name: "Number" - } - }, - monthlyPremiumStorageCost: { - serializedName: "monthlyPremiumStorageCost", - readOnly: true, - type: { - name: "Number" - } - }, - monthlyStandardSSDStorageCost: { - serializedName: "monthlyStandardSSDStorageCost", - readOnly: true, - type: { - name: "Number" - } - }, - confidenceRatingInPercentage: { - serializedName: "confidenceRatingInPercentage", - readOnly: true, - nullable: true, - type: { - name: "Number" - } - }, - disks: { - serializedName: "disks", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "AssessedDisk" } } - } - }, - networkAdapters: { - serializedName: "networkAdapters", - readOnly: true, - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "AssessedNetworkAdapter" } - } - } - }, - recommendedSize: { - serializedName: "recommendedSize", - readOnly: true, - type: { - name: "String" - } - }, - numberOfCoresForRecommendedSize: { - serializedName: "numberOfCoresForRecommendedSize", - readOnly: true, - type: { - name: "Number" - } - }, - megabytesOfMemoryForRecommendedSize: { - serializedName: "megabytesOfMemoryForRecommendedSize", - readOnly: true, - type: { - name: "Number" - } - }, - monthlyComputeCostForRecommendedSize: { - serializedName: "monthlyComputeCostForRecommendedSize", - readOnly: true, - type: { - name: "Number" - } - }, - percentageCoresUtilization: { - serializedName: "percentageCoresUtilization", - readOnly: true, - type: { - name: "Number" - } - }, - percentageMemoryUtilization: { - serializedName: "percentageMemoryUtilization", - readOnly: true, - type: { - name: "Number" - } - }, - suitability: { - serializedName: "suitability", - readOnly: true, - type: { - name: "String" - } - }, - suitabilityExplanation: { - serializedName: "suitabilityExplanation", - readOnly: true, - type: { - name: "String" - } - }, - suitabilityDetail: { - serializedName: "suitabilityDetail", - readOnly: true, - type: { - name: "String" - } - }, - createdTimestamp: { - serializedName: "createdTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - updatedTimestamp: { - serializedName: "updatedTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - } - } - } -}; - -export const AssessedDisk: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessedDisk", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String" - } - }, - gigabytesProvisioned: { - serializedName: "gigabytesProvisioned", - readOnly: true, - type: { - name: "Number" - } - }, - megabytesPerSecondOfRead: { - serializedName: "megabytesPerSecondOfRead", - readOnly: true, - type: { - name: "Number" - } - }, - megabytesPerSecondOfWrite: { - serializedName: "megabytesPerSecondOfWrite", - readOnly: true, - type: { - name: "Number" - } - }, - numberOfReadOperationsPerSecond: { - serializedName: "numberOfReadOperationsPerSecond", - readOnly: true, - type: { - name: "Number" - } - }, - numberOfWriteOperationsPerSecond: { - serializedName: "numberOfWriteOperationsPerSecond", - readOnly: true, - type: { - name: "Number" - } - }, - monthlyStorageCost: { - serializedName: "monthlyStorageCost", - readOnly: true, - type: { - name: "Number" - } - }, - recommendedDiskType: { - serializedName: "recommendedDiskType", - readOnly: true, - type: { - name: "String" - } - }, - recommendedDiskSize: { - serializedName: "recommendedDiskSize", - readOnly: true, - type: { - name: "String" - } - }, - gigabytesForRecommendedDiskSize: { - serializedName: "gigabytesForRecommendedDiskSize", - readOnly: true, - type: { - name: "Number" - } - }, - suitability: { - serializedName: "suitability", - readOnly: true, - type: { - name: "String" - } - }, - suitabilityExplanation: { - serializedName: "suitabilityExplanation", - readOnly: true, - type: { - name: "String" - } - }, - suitabilityDetail: { - serializedName: "suitabilityDetail", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const AssessedNetworkAdapter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessedNetworkAdapter", - modelProperties: { - macAddress: { - serializedName: "macAddress", - readOnly: true, - type: { - name: "String" - } - }, - ipAddresses: { - serializedName: "ipAddresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String" - } - }, - monthlyBandwidthCosts: { - serializedName: "monthlyBandwidthCosts", - readOnly: true, - type: { - name: "Number" - } - }, - megabytesPerSecondReceived: { - serializedName: "megabytesPerSecondReceived", - readOnly: true, - type: { - name: "Number" - } - }, - megabytesPerSecondTransmitted: { - serializedName: "megabytesPerSecondTransmitted", - readOnly: true, - type: { - name: "Number" - } - }, - netGigabytesTransmittedPerMonth: { - serializedName: "netGigabytesTransmittedPerMonth", - type: { - name: "Number" - } - }, - suitability: { - serializedName: "suitability", - readOnly: true, - type: { - name: "String" - } - }, - suitabilityExplanation: { - serializedName: "suitabilityExplanation", - readOnly: true, - type: { - name: "String" - } - }, - suitabilityDetail: { - serializedName: "suitabilityDetail", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const HyperVCollectorList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HyperVCollectorList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HyperVCollector" - } - } - } - } - } - } -}; - -export const HyperVCollector: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HyperVCollector", - modelProperties: { - eTag: { - serializedName: "eTag", - 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" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "CollectorProperties" - } - } - } - } -}; - -export const CollectorProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CollectorProperties", - modelProperties: { - discoverySiteId: { - serializedName: "discoverySiteId", - type: { - name: "String" - } - }, - createdTimestamp: { - serializedName: "createdTimestamp", - readOnly: true, - type: { - name: "String" - } - }, - updatedTimestamp: { - serializedName: "updatedTimestamp", - readOnly: true, - type: { - name: "String" - } - }, - agentProperties: { - serializedName: "agentProperties", - type: { - name: "Composite", - className: "CollectorAgentProperties" - } - } - } - } -}; - -export const CollectorAgentProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CollectorAgentProperties", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - version: { - serializedName: "version", - readOnly: true, - type: { - name: "String" - } - }, - lastHeartbeatUtc: { - serializedName: "lastHeartbeatUtc", - readOnly: true, - nullable: true, - type: { - name: "DateTime" - } - }, - spnDetails: { - serializedName: "spnDetails", - type: { - name: "Composite", - className: "CollectorBodyAgentSpnProperties" - } - } - } - } -}; - -export const CollectorBodyAgentSpnProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CollectorBodyAgentSpnProperties", - modelProperties: { - authority: { - serializedName: "authority", - type: { - name: "String" - } - }, - applicationId: { - serializedName: "applicationId", - type: { - name: "String" - } - }, - audience: { - serializedName: "audience", - type: { - name: "String" - } - }, - objectId: { - serializedName: "objectId", - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - type: { - name: "String" - } - } - } - } -}; - -export const ServerCollectorList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServerCollectorList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerCollector" - } - } - } - } - } - } -}; - -export const ServerCollector: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServerCollector", - modelProperties: { - eTag: { - serializedName: "eTag", - 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" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "CollectorProperties" - } - } - } - } -}; - -export const VMwareCollectorList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VMwareCollectorList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VMwareCollector" - } - } - } - } - } - } -}; - -export const VMwareCollector: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VMwareCollector", - modelProperties: { - eTag: { - serializedName: "eTag", - 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" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "CollectorProperties" - } - } - } - } -}; - -export const ImportCollectorList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ImportCollectorList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ImportCollector" - } - } - } - } - } - } -}; - -export const ImportCollector: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ImportCollector", - modelProperties: { - eTag: { - serializedName: "eTag", - 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" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ImportCollectorProperties" - } - } - } - } -}; - -export const ImportCollectorProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ImportCollectorProperties", - modelProperties: { - discoverySiteId: { - serializedName: "discoverySiteId", - type: { - name: "String" - } - }, - createdTimestamp: { - serializedName: "createdTimestamp", - readOnly: true, - type: { - name: "String" - } - }, - updatedTimestamp: { - serializedName: "updatedTimestamp", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PrivateEndpointConnectionCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PrivateLinkResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResource", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "PrivateLinkResourceProperties" - } - } - } - } -}; - -export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResourceProperties", - modelProperties: { - requiredMembers: { - serializedName: "requiredMembers", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - requiredZoneNames: { - serializedName: "requiredZoneNames", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - groupId: { - serializedName: "groupId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PrivateLinkResourceCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResourceCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkResource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const OperationResultList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationResultList", - 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", - readOnly: true, - type: { - name: "String" - } - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay" - } - }, - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - readOnly: true, - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ProjectsListBySubscriptionHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectsListBySubscriptionHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ProjectsListHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectsListHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ProjectsGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectsGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ProjectsCreateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectsCreateHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ProjectsUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectsUpdateHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ProjectsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectsDeleteHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ProjectsAssessmentOptionsHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectsAssessmentOptionsHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ProjectsAssessmentOptionsListHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectsAssessmentOptionsListHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ProjectsListBySubscriptionNextHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectsListBySubscriptionNextHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ProjectsListNextHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProjectsListNextHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const MachinesListByProjectHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachinesListByProjectHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const MachinesGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachinesGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const MachinesListByProjectNextHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachinesListByProjectNextHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const GroupsListByProjectHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GroupsListByProjectHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const GroupsGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GroupsGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const GroupsCreateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GroupsCreateHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const GroupsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GroupsDeleteHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const GroupsUpdateMachinesHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GroupsUpdateMachinesHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const AssessmentsListByGroupHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessmentsListByGroupHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const AssessmentsListByProjectHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessmentsListByProjectHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const AssessmentsGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessmentsGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const AssessmentsCreateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessmentsCreateHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const AssessmentsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessmentsDeleteHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const AssessmentsGetReportDownloadUrlHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessmentsGetReportDownloadUrlHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const AssessedMachinesListByAssessmentHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessedMachinesListByAssessmentHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const AssessedMachinesGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessedMachinesGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const AssessedMachinesListByAssessmentNextHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssessedMachinesListByAssessmentNextHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const HyperVCollectorsListByProjectHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HyperVCollectorsListByProjectHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const HyperVCollectorsGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HyperVCollectorsGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const HyperVCollectorsCreateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HyperVCollectorsCreateHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const HyperVCollectorsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HyperVCollectorsDeleteHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ServerCollectorsListByProjectHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServerCollectorsListByProjectHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ServerCollectorsGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServerCollectorsGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ServerCollectorsCreateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServerCollectorsCreateHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ServerCollectorsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServerCollectorsDeleteHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const VMwareCollectorsListByProjectHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VMwareCollectorsListByProjectHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const VMwareCollectorsGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VMwareCollectorsGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const VMwareCollectorsCreateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VMwareCollectorsCreateHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const VMwareCollectorsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VMwareCollectorsDeleteHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ImportCollectorsListByProjectHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ImportCollectorsListByProjectHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ImportCollectorsGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ImportCollectorsGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ImportCollectorsCreateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ImportCollectorsCreateHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const ImportCollectorsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ImportCollectorsDeleteHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const PrivateEndpointConnectionListByProjectHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionListByProjectHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const PrivateEndpointConnectionGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const PrivateEndpointConnectionUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionUpdateHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const PrivateEndpointConnectionDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionDeleteHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const PrivateLinkResourceGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResourceGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const PrivateLinkResourceListByProjectHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResourceListByProjectHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - } - } - } -}; diff --git a/sdk/migrate/arm-migrate/src/models/models.ts b/sdk/migrate/arm-migrate/src/models/models.ts new file mode 100644 index 000000000000..b3e0ed5c00f5 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/models/models.ts @@ -0,0 +1,3272 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface _OperationListResult { + /** The Operation items on this page */ + value: Operation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _operationListResultDeserializer(item: any): _OperationListResult { + return { + value: operationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function operationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationDeserializer(item); + }); +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ + readonly name?: string; + /** Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ + readonly origin?: Origin; + /** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ + readonly actionType?: ActionType; +} + +export function operationDeserializer(item: any): Operation { + return { + name: item["name"], + isDataAction: item["isDataAction"], + display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), + origin: item["origin"], + actionType: item["actionType"], + }; +} + +/** Localized display information for and operation. */ +export interface OperationDisplay { + /** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */ + readonly provider?: string; + /** The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". */ + readonly resource?: string; + /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". */ + readonly operation?: string; + /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ + readonly description?: string; +} + +export function operationDisplayDeserializer(item: any): OperationDisplay { + return { + provider: item["provider"], + resource: item["resource"], + operation: item["operation"], + description: item["description"], + }; +} + +/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ +export enum KnownOrigin { + /** Indicates the operation is initiated by a user. */ + User = "user", + /** Indicates the operation is initiated by a system. */ + System = "system", + /** Indicates the operation is initiated by a user or system. */ + UserSystem = "user,system", +} + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user**: Indicates the operation is initiated by a user. \ + * **system**: Indicates the operation is initiated by a system. \ + * **user,system**: Indicates the operation is initiated by a user or system. + */ +export type Origin = string; + +/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +export enum KnownActionType { + /** Actions are for internal-only APIs. */ + Internal = "Internal", +} + +/** + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal**: Actions are for internal-only APIs. + */ +export type ActionType = string; + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +export function errorResponseDeserializer(item: any): ErrorResponse { + return { + error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]), + }; +} + +/** The error detail. */ +export interface ErrorDetail { + /** The error code. */ + readonly code?: string; + /** The error message. */ + readonly message?: string; + /** The error target. */ + readonly target?: string; + /** The error details. */ + readonly details?: ErrorDetail[]; + /** The error additional info. */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +export function errorDetailDeserializer(item: any): ErrorDetail { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]), + additionalInfo: !item["additionalInfo"] + ? item["additionalInfo"] + : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]), + }; +} + +export function errorDetailArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorDetailDeserializer(item); + }); +} + +export function errorAdditionalInfoArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorAdditionalInfoDeserializer(item); + }); +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: Record; +} + +export function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo { + return { + type: item["type"], + info: !item["info"] ? item["info"] : _errorAdditionalInfoInfoDeserializer(item["info"]), + }; +} + +/** model interface _ErrorAdditionalInfoInfo */ +export interface _ErrorAdditionalInfoInfo {} + +export function _errorAdditionalInfoInfoDeserializer(item: any): _ErrorAdditionalInfoInfo { + return item; +} + +/** AVS assessment V2 resource. */ +export interface AvsAssessmentV2 extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: AvsAssessmentPropertiesV2; +} + +export function avsAssessmentV2Serializer(item: AvsAssessmentV2): any { + return { + properties: !item["properties"] + ? item["properties"] + : avsAssessmentPropertiesV2Serializer(item["properties"]), + }; +} + +export function avsAssessmentV2Deserializer(item: any): AvsAssessmentV2 { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : avsAssessmentPropertiesV2Deserializer(item["properties"]), + }; +} + +/** Assessment properties class. */ +export interface AvsAssessmentPropertiesV2 { + /** The status of the last operation. */ + readonly provisioningState?: ProvisioningState; + /** Gets or sets the scope of assessment. */ + scope?: Scope; + /** Gets or sets the settings for the assessment. */ + settings?: AvsAssessmentSettings; + /** Gets or sets the details of the assessment. */ + details?: AssessmentDetails; + /** Gets or sets the machine assessment ARM ID for VM fallback. */ + fallbackMachineAssessmentArmId?: string; +} + +export function avsAssessmentPropertiesV2Serializer(item: AvsAssessmentPropertiesV2): any { + return { + scope: !item["scope"] ? item["scope"] : scopeSerializer(item["scope"]), + settings: !item["settings"] + ? item["settings"] + : avsAssessmentSettingsSerializer(item["settings"]), + details: !item["details"] ? item["details"] : assessmentDetailsSerializer(item["details"]), + fallbackMachineAssessmentArmId: item["fallbackMachineAssessmentArmId"], + }; +} + +export function avsAssessmentPropertiesV2Deserializer(item: any): AvsAssessmentPropertiesV2 { + return { + provisioningState: item["provisioningState"], + scope: !item["scope"] ? item["scope"] : scopeDeserializer(item["scope"]), + settings: !item["settings"] + ? item["settings"] + : avsAssessmentSettingsDeserializer(item["settings"]), + details: !item["details"] ? item["details"] : assessmentDetailsDeserializer(item["details"]), + fallbackMachineAssessmentArmId: item["fallbackMachineAssessmentArmId"], + }; +} + +/** The status of the current operation. */ +export enum KnownProvisioningState { + /** Resource provisioning Successful. */ + Succeeded = "Succeeded", + /** Resource provisioning Failed. */ + Failed = "Failed", + /** Resource provisioning Canceled. */ + Canceled = "Canceled", + /** Resource is being Provisioned. */ + Provisioning = "Provisioning", + /** Resource is being Updated. */ + Updating = "Updating", + /** Resource is being Deleted. */ + Deleting = "Deleting", + /** Resource is being Accepted. */ + Accepted = "Accepted", +} + +/** + * The status of the current operation. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource provisioning Successful. \ + * **Failed**: Resource provisioning Failed. \ + * **Canceled**: Resource provisioning Canceled. \ + * **Provisioning**: Resource is being Provisioned. \ + * **Updating**: Resource is being Updated. \ + * **Deleting**: Resource is being Deleted. \ + * **Accepted**: Resource is being Accepted. + */ +export type ProvisioningState = string; + +/** Scope of the assessment. */ +export interface Scope { + /** The scope type */ + scopeType?: ScopeType; + /** The server group arm id. */ + serverGroupId?: string; + /** The ARG query. */ + azureResourceGraphQuery?: string; +} + +export function scopeSerializer(item: Scope): any { + return { + scopeType: item["scopeType"], + serverGroupId: item["serverGroupId"], + azureResourceGraphQuery: item["azureResourceGraphQuery"], + }; +} + +export function scopeDeserializer(item: any): Scope { + return { + scopeType: item["scopeType"], + serverGroupId: item["serverGroupId"], + azureResourceGraphQuery: item["azureResourceGraphQuery"], + }; +} + +/** Scope type */ +export enum KnownScopeType { + /** ServerGroupId - Scope type */ + ServerGroupId = "ServerGroupId", + /** AzureResourceGraphQuery - Scope type */ + AzureResourceGraphQuery = "AzureResourceGraphQuery", +} + +/** + * Scope type \ + * {@link KnownScopeType} can be used interchangeably with ScopeType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ServerGroupId**: ServerGroupId - Scope type \ + * **AzureResourceGraphQuery**: AzureResourceGraphQuery - Scope type + */ +export type ScopeType = string; + +/** Properties of the AVS assessment. */ +export interface AvsAssessmentSettings { + /** Azure Location or Azure region where to which the machines will be migrated. */ + azureLocation?: string; + /** Currency in which prices should be reported. */ + currency?: AzureCurrency; + /** + * Percentage of buffer that user wants on performance metrics when recommending + * Azure sizes. + */ + scalingFactor?: number; + /** Custom discount percentage. */ + discountPercentage?: number; + /** Assessment sizing criterion. */ + sizingCriterion?: AssessmentSizingCriterion; + /** Gets or sets the performance data. */ + performanceData?: PerformanceData; + /** Gets or sets the savings settings. */ + savingsSettings?: SavingsSettings; + /** Gets or sets the billing settings. */ + billingSettings?: BillingSettings; + /** Gets or sets user configurable setting to display the environment type. */ + environmentType?: EnvironmentType; + /** List of Failures to tolerate and RAID levels in a common property. */ + failuresToTolerateAndRaidLevelList?: FttAndRaidLevel[]; + /** VCPU over subscription. */ + vcpuOversubscription?: number; + /** AVS node types. */ + nodeTypes?: AzureAvsNodeType[]; + /** AVS Assessment Scenario. */ + avsAssessmentScenario?: AvsAssessmentScenario; + /** List of AVS external storage types. */ + externalStorageTypes?: ExternalStorageType[]; + /** Gets or sets the CPU headroom. */ + cpuHeadroom?: number; + /** Is VCF license applied */ + isVcfByolEnabled?: boolean; + /** Memory overcommit. */ + memOvercommit?: number; + /** De-duplication compression. */ + dedupeCompression?: number; + /** Is Stretch Cluster Enabled. */ + isStretchClusterEnabled?: boolean; +} + +export function avsAssessmentSettingsSerializer(item: AvsAssessmentSettings): any { + return { + azureLocation: item["azureLocation"], + currency: item["currency"], + scalingFactor: item["scalingFactor"], + discountPercentage: item["discountPercentage"], + sizingCriterion: item["sizingCriterion"], + performanceData: !item["performanceData"] + ? item["performanceData"] + : performanceDataSerializer(item["performanceData"]), + savingsSettings: !item["savingsSettings"] + ? item["savingsSettings"] + : savingsSettingsSerializer(item["savingsSettings"]), + billingSettings: !item["billingSettings"] + ? item["billingSettings"] + : billingSettingsSerializer(item["billingSettings"]), + environmentType: item["environmentType"], + failuresToTolerateAndRaidLevelList: !item["failuresToTolerateAndRaidLevelList"] + ? item["failuresToTolerateAndRaidLevelList"] + : item["failuresToTolerateAndRaidLevelList"].map((p: any) => { + return p; + }), + vcpuOversubscription: item["vcpuOversubscription"], + nodeTypes: !item["nodeTypes"] + ? item["nodeTypes"] + : item["nodeTypes"].map((p: any) => { + return p; + }), + avsAssessmentScenario: item["avsAssessmentScenario"], + externalStorageTypes: !item["externalStorageTypes"] + ? item["externalStorageTypes"] + : item["externalStorageTypes"].map((p: any) => { + return p; + }), + cpuHeadroom: item["cpuHeadroom"], + isVcfByolEnabled: item["isVcfByolEnabled"], + memOvercommit: item["memOvercommit"], + dedupeCompression: item["dedupeCompression"], + isStretchClusterEnabled: item["isStretchClusterEnabled"], + }; +} + +export function avsAssessmentSettingsDeserializer(item: any): AvsAssessmentSettings { + return { + azureLocation: item["azureLocation"], + currency: item["currency"], + scalingFactor: item["scalingFactor"], + discountPercentage: item["discountPercentage"], + sizingCriterion: item["sizingCriterion"], + performanceData: !item["performanceData"] + ? item["performanceData"] + : performanceDataDeserializer(item["performanceData"]), + savingsSettings: !item["savingsSettings"] + ? item["savingsSettings"] + : savingsSettingsDeserializer(item["savingsSettings"]), + billingSettings: !item["billingSettings"] + ? item["billingSettings"] + : billingSettingsDeserializer(item["billingSettings"]), + environmentType: item["environmentType"], + failuresToTolerateAndRaidLevelList: !item["failuresToTolerateAndRaidLevelList"] + ? item["failuresToTolerateAndRaidLevelList"] + : item["failuresToTolerateAndRaidLevelList"].map((p: any) => { + return p; + }), + vcpuOversubscription: item["vcpuOversubscription"], + nodeTypes: !item["nodeTypes"] + ? item["nodeTypes"] + : item["nodeTypes"].map((p: any) => { + return p; + }), + avsAssessmentScenario: item["avsAssessmentScenario"], + externalStorageTypes: !item["externalStorageTypes"] + ? item["externalStorageTypes"] + : item["externalStorageTypes"].map((p: any) => { + return p; + }), + cpuHeadroom: item["cpuHeadroom"], + isVcfByolEnabled: item["isVcfByolEnabled"], + memOvercommit: item["memOvercommit"], + dedupeCompression: item["dedupeCompression"], + isStretchClusterEnabled: item["isStretchClusterEnabled"], + }; +} + +/** Currency for Azure. */ +export enum KnownAzureCurrency { + /** Unknown Currency for Azure */ + Unknown = "Unknown", + /** USD Currency for Azure */ + USD = "USD", + /** DKK Currency for Azure */ + DKK = "DKK", + /** CAD Currency for Azure */ + CAD = "CAD", + /** IDR Currency for Azure */ + IDR = "IDR", + /** JPY Currency for Azure */ + JPY = "JPY", + /** KRW Currency for Azure */ + KRW = "KRW", + /** NZD Currency for Azure */ + NZD = "NZD", + /** NOK Currency for Azure */ + NOK = "NOK", + /** RUB Currency for Azure */ + RUB = "RUB", + /** SAR Currency for Azure */ + SAR = "SAR", + /** ZAR Currency for Azure */ + ZAR = "ZAR", + /** SEK Currency for Azure */ + SEK = "SEK", + /** TRY Currency for Azure */ + TRY = "TRY", + /** GBP Currency for Azure */ + GBP = "GBP", + /** MXN Currency for Azure */ + MXN = "MXN", + /** MYR Currency for Azure */ + MYR = "MYR", + /** INR Currency for Azure */ + INR = "INR", + /** HKD Currency for Azure */ + HKD = "HKD", + /** BRL Currency for Azure */ + BRL = "BRL", + /** TWD Currency for Azure */ + TWD = "TWD", + /** EUR Currency for Azure */ + EUR = "EUR", + /** CHF Currency for Azure */ + CHF = "CHF", + /** ARS Currency for Azure */ + ARS = "ARS", + /** AUD Currency for Azure */ + AUD = "AUD", + /** CNY Currency for Azure */ + CNY = "CNY", +} + +/** + * Currency for Azure. \ + * {@link KnownAzureCurrency} can be used interchangeably with AzureCurrency, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown Currency for Azure \ + * **USD**: USD Currency for Azure \ + * **DKK**: DKK Currency for Azure \ + * **CAD**: CAD Currency for Azure \ + * **IDR**: IDR Currency for Azure \ + * **JPY**: JPY Currency for Azure \ + * **KRW**: KRW Currency for Azure \ + * **NZD**: NZD Currency for Azure \ + * **NOK**: NOK Currency for Azure \ + * **RUB**: RUB Currency for Azure \ + * **SAR**: SAR Currency for Azure \ + * **ZAR**: ZAR Currency for Azure \ + * **SEK**: SEK Currency for Azure \ + * **TRY**: TRY Currency for Azure \ + * **GBP**: GBP Currency for Azure \ + * **MXN**: MXN Currency for Azure \ + * **MYR**: MYR Currency for Azure \ + * **INR**: INR Currency for Azure \ + * **HKD**: HKD Currency for Azure \ + * **BRL**: BRL Currency for Azure \ + * **TWD**: TWD Currency for Azure \ + * **EUR**: EUR Currency for Azure \ + * **CHF**: CHF Currency for Azure \ + * **ARS**: ARS Currency for Azure \ + * **AUD**: AUD Currency for Azure \ + * **CNY**: CNY Currency for Azure + */ +export type AzureCurrency = string; + +/** Assessment Sizing Criteria. */ +export enum KnownAssessmentSizingCriterion { + /** Performance Data based Sizing. */ + PerformanceBased = "PerformanceBased", + /** As On Premises or Static Data based Sizing. */ + AsOnPremises = "AsOnPremises", +} + +/** + * Assessment Sizing Criteria. \ + * {@link KnownAssessmentSizingCriterion} can be used interchangeably with AssessmentSizingCriterion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PerformanceBased**: Performance Data based Sizing. \ + * **AsOnPremises**: As On Premises or Static Data based Sizing. + */ +export type AssessmentSizingCriterion = string; + +/** Performance data class. */ +export interface PerformanceData { + /** + * Percentile of the utilization data values to be considered while assessing + * machines. + */ + percentile?: Percentile; + /** + * Time Range for which the historic utilization data should be considered for + * assessment. + */ + timeRange?: TimeRange; + /** Gets or sets the start time to consider performance data for assessment. */ + perfDataStartTime?: Date; + /** Gets or sets the end time to consider performance data for assessment. */ + perfDataEndTime?: Date; +} + +export function performanceDataSerializer(item: PerformanceData): any { + return { + percentile: item["percentile"], + timeRange: item["timeRange"], + perfDataStartTime: !item["perfDataStartTime"] + ? item["perfDataStartTime"] + : item["perfDataStartTime"].toISOString(), + perfDataEndTime: !item["perfDataEndTime"] + ? item["perfDataEndTime"] + : item["perfDataEndTime"].toISOString(), + }; +} + +export function performanceDataDeserializer(item: any): PerformanceData { + return { + percentile: item["percentile"], + timeRange: item["timeRange"], + perfDataStartTime: !item["perfDataStartTime"] + ? item["perfDataStartTime"] + : new Date(item["perfDataStartTime"]), + perfDataEndTime: !item["perfDataEndTime"] + ? item["perfDataEndTime"] + : new Date(item["perfDataEndTime"]), + }; +} + +/** Percentile for Performance Data. */ +export enum KnownPercentile { + /** Percentile 50. */ + Percentile50 = "Percentile50", + /** Percentile 90. */ + Percentile90 = "Percentile90", + /** Percentile 95. */ + Percentile95 = "Percentile95", + /** Percentile 99. */ + Percentile99 = "Percentile99", + /** Percentile unknown. */ + PercentileUnknown = "PercentileUnknown", +} + +/** + * Percentile for Performance Data. \ + * {@link KnownPercentile} can be used interchangeably with Percentile, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Percentile50**: Percentile 50. \ + * **Percentile90**: Percentile 90. \ + * **Percentile95**: Percentile 95. \ + * **Percentile99**: Percentile 99. \ + * **PercentileUnknown**: Percentile unknown. + */ +export type Percentile = string; + +/** Time Range for Performance Data. */ +export enum KnownTimeRange { + /** Daily. */ + Day = "Day", + /** Weekly. */ + Week = "Week", + /** Monthly. */ + Month = "Month", + /** Custom Time Range. */ + Custom = "Custom", +} + +/** + * Time Range for Performance Data. \ + * {@link KnownTimeRange} can be used interchangeably with TimeRange, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Day**: Daily. \ + * **Week**: Weekly. \ + * **Month**: Monthly. \ + * **Custom**: Custom Time Range. + */ +export type TimeRange = string; + +/** Savings settings class. */ +export interface SavingsSettings { + /** Gets or sets the savings options. */ + savingsOptions?: SavingsOptions; + /** Gets or sets the Azure offer code. */ + azureOfferCode?: AzureOffer; +} + +export function savingsSettingsSerializer(item: SavingsSettings): any { + return { + savingsOptions: item["savingsOptions"], + azureOfferCode: item["azureOfferCode"], + }; +} + +export function savingsSettingsDeserializer(item: any): SavingsSettings { + return { + savingsOptions: item["savingsOptions"], + azureOfferCode: item["azureOfferCode"], + }; +} + +/** The savings options. */ +export enum KnownSavingsOptions { + /** No savings options. */ + None = "None", + /** Reserved Instance for 1 year. */ + RI1Year = "RI1Year", + /** Reserved Instance for 3 years. */ + RI3Year = "RI3Year", + /** The savings plan for 1 year. */ + SavingsPlan1Year = "SavingsPlan1Year", + /** The savings plan for 3 years. */ + SavingsPlan3Year = "SavingsPlan3Year", + /** Custom azure offer code. */ + CustomAzureOfferCode = "CustomAzureOfferCode", +} + +/** + * The savings options. \ + * {@link KnownSavingsOptions} can be used interchangeably with SavingsOptions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No savings options. \ + * **RI1Year**: Reserved Instance for 1 year. \ + * **RI3Year**: Reserved Instance for 3 years. \ + * **SavingsPlan1Year**: The savings plan for 1 year. \ + * **SavingsPlan3Year**: The savings plan for 3 years. \ + * **CustomAzureOfferCode**: Custom azure offer code. + */ +export type SavingsOptions = string; + +/** Azure Offer */ +export enum KnownAzureOffer { + /** Unknown - Azure Offer */ + Unknown = "Unknown", + /** MSAZR0003P Azure Offer */ + Msazr0003P = "MSAZR0003P", + /** MSAZR0023P Azure Offer */ + Msazr0023P = "MSAZR0023P", + /** MSMCAZR0044P Azure Offer */ + Msmcazr0044P = "MSMCAZR0044P", + /** MSMCAZR0059P Azure Offer */ + Msmcazr0059P = "MSMCAZR0059P", + /** MSMCAZR0060P Azure Offer */ + Msmcazr0060P = "MSMCAZR0060P", + /** MSMCAZR0063P Azure Offer */ + Msmcazr0063P = "MSMCAZR0063P", + /** MSAZRUSGOV0003P Azure Offer */ + Msazrusgov0003P = "MSAZRUSGOV0003P", + /** EA Azure Offer */ + EA = "EA", + /** SavingsPlan1Year Azure Offer */ + SavingsPlan1Year = "SavingsPlan1Year", + /** SavingsPlan3Year Azure Offer */ + SavingsPlan3Year = "SavingsPlan3Year", +} + +/** + * Azure Offer \ + * {@link KnownAzureOffer} can be used interchangeably with AzureOffer, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Azure Offer \ + * **MSAZR0003P**: MSAZR0003P Azure Offer \ + * **MSAZR0023P**: MSAZR0023P Azure Offer \ + * **MSMCAZR0044P**: MSMCAZR0044P Azure Offer \ + * **MSMCAZR0059P**: MSMCAZR0059P Azure Offer \ + * **MSMCAZR0060P**: MSMCAZR0060P Azure Offer \ + * **MSMCAZR0063P**: MSMCAZR0063P Azure Offer \ + * **MSAZRUSGOV0003P**: MSAZRUSGOV0003P Azure Offer \ + * **EA**: EA Azure Offer \ + * **SavingsPlan1Year**: SavingsPlan1Year Azure Offer \ + * **SavingsPlan3Year**: SavingsPlan3Year Azure Offer + */ +export type AzureOffer = string; + +/** Billing settings class. */ +export interface BillingSettings { + /** Gets or sets the licensing program. */ + licensingProgram?: LicensingProgram; + /** Gets or sets the subscription ID for licensing program selected. */ + subscriptionId?: string; +} + +export function billingSettingsSerializer(item: BillingSettings): any { + return { + licensingProgram: item["licensingProgram"], + subscriptionId: item["subscriptionId"], + }; +} + +export function billingSettingsDeserializer(item: any): BillingSettings { + return { + licensingProgram: item["licensingProgram"], + subscriptionId: item["subscriptionId"], + }; +} + +/** The licensing program. */ +export enum KnownLicensingProgram { + /** Retail/Pay as you go. */ + Retail = "Retail", + /** Not known */ + Unknown = "Unknown", + /** Enterprise agreement. */ + EA = "EA", + /** Microsoft customer agreement. */ + MCA = "MCA", +} + +/** + * The licensing program. \ + * {@link KnownLicensingProgram} can be used interchangeably with LicensingProgram, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Retail**: Retail\/Pay as you go. \ + * **Unknown**: Not known \ + * **EA**: Enterprise agreement. \ + * **MCA**: Microsoft customer agreement. + */ +export type LicensingProgram = string; + +/** Environment Type */ +export enum KnownEnvironmentType { + /** Production - Environment Type */ + Production = "Production", + /** Unknown - Environment Type */ + Unknown = "Unknown", + /** DevTest - Environment Type */ + DevTest = "DevTest", +} + +/** + * Environment Type \ + * {@link KnownEnvironmentType} can be used interchangeably with EnvironmentType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Production**: Production - Environment Type \ + * **Unknown**: Unknown - Environment Type \ + * **DevTest**: DevTest - Environment Type + */ +export type EnvironmentType = string; + +/** FTT and RAID Level. */ +export enum KnownFttAndRaidLevel { + /** Unknown FTT and RAID Level. */ + Unknown = "Unknown", + /** FTT 1 and RAID Level 1. */ + Ftt1Raid1 = "Ftt1Raid1", + /** FTT 1 and RAID Level 5. */ + Ftt1Raid5 = "Ftt1Raid5", + /** FTT 2 and RAID Level 1. */ + Ftt2Raid1 = "Ftt2Raid1", + /** FTT 2 and RAID Level 6. */ + Ftt2Raid6 = "Ftt2Raid6", + /** FTT 3 and RAID Level 1. */ + Ftt3Raid1 = "Ftt3Raid1", +} + +/** + * FTT and RAID Level. \ + * {@link KnownFttAndRaidLevel} can be used interchangeably with FttAndRaidLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown FTT and RAID Level. \ + * **Ftt1Raid1**: FTT 1 and RAID Level 1. \ + * **Ftt1Raid5**: FTT 1 and RAID Level 5. \ + * **Ftt2Raid1**: FTT 2 and RAID Level 1. \ + * **Ftt2Raid6**: FTT 2 and RAID Level 6. \ + * **Ftt3Raid1**: FTT 3 and RAID Level 1. + */ +export type FttAndRaidLevel = string; + +/** Azure AVS Node type */ +export enum KnownAzureAvsNodeType { + /** Unknown Node type */ + Unknown = "Unknown", + /** AVS36 Node type */ + AV36 = "AV36", + /** AV36P Node type */ + AV36P = "AV36P", + /** AV52 Node type */ + AV52 = "AV52", + /** AV64 Node type */ + AV64 = "AV64", +} + +/** + * Azure AVS Node type \ + * {@link KnownAzureAvsNodeType} can be used interchangeably with AzureAvsNodeType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown Node type \ + * **AV36**: AVS36 Node type \ + * **AV36P**: AV36P Node type \ + * **AV52**: AV52 Node type \ + * **AV64**: AV64 Node type + */ +export type AzureAvsNodeType = string; + +/** Scenarios with which Avs Assessments can be created. */ +export enum KnownAvsAssessmentScenario { + /** Unknown assessment scenario */ + Unknown = "Unknown", + /** Create Assessment for new Avs Sddc */ + NewAvsSddc = "NewAvsSddc", + /** Create Assessment for existing Avs Sddc */ + AvsSddcExpansion = "AvsSddcExpansion", +} + +/** + * Scenarios with which Avs Assessments can be created. \ + * {@link KnownAvsAssessmentScenario} can be used interchangeably with AvsAssessmentScenario, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown assessment scenario \ + * **NewAvsSddc**: Create Assessment for new Avs Sddc \ + * **AvsSddcExpansion**: Create Assessment for existing Avs Sddc + */ +export type AvsAssessmentScenario = string; + +/** Different External storage skus. */ +export enum KnownExternalStorageType { + /** Indicates un-supported external storage. */ + Unknown = "Unknown", + /** Indicates No external storage. */ + None = "None", + /** ANF external storage with Standard SKU. */ + AnfStandard = "AnfStandard", + /** ANF external storage with Premium SKU. */ + AnfPremium = "AnfPremium", + /** ANF external storage with Ultra SKU. */ + AnfUltra = "AnfUltra", +} + +/** + * Different External storage skus. \ + * {@link KnownExternalStorageType} can be used interchangeably with ExternalStorageType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Indicates un-supported external storage. \ + * **None**: Indicates No external storage. \ + * **AnfStandard**: ANF external storage with Standard SKU. \ + * **AnfPremium**: ANF external storage with Premium SKU. \ + * **AnfUltra**: ANF external storage with Ultra SKU. + */ +export type ExternalStorageType = string; + +/** Assessment details class. */ +export interface AssessmentDetails { + /** Confidence Rating in Percentage. */ + readonly confidenceRatingInPercentage?: number; + /** Last time when rates were queried. */ + readonly pricesTimestamp?: Date; + /** Date and Time when assessment was created. */ + readonly createdTimestamp?: Date; + /** Date and Time when assessment was last updated. */ + readonly updatedTimestamp?: Date; + /** Whether assessment is in valid state and all machines have been assessed. */ + readonly status?: AssessmentStatus; +} + +export function assessmentDetailsSerializer(item: AssessmentDetails): any { + return item; +} + +export function assessmentDetailsDeserializer(item: any): AssessmentDetails { + return { + confidenceRatingInPercentage: item["confidenceRatingInPercentage"], + pricesTimestamp: !item["pricesTimestamp"] + ? item["pricesTimestamp"] + : new Date(item["pricesTimestamp"]), + createdTimestamp: !item["createdTimestamp"] + ? item["createdTimestamp"] + : new Date(item["createdTimestamp"]), + updatedTimestamp: !item["updatedTimestamp"] + ? item["updatedTimestamp"] + : new Date(item["updatedTimestamp"]), + status: item["status"], + }; +} + +/** Assessment Status. */ +export enum KnownAssessmentStatus { + /** Assessment is Created. */ + Created = "Created", + /** Assessment is Updated. */ + Updated = "Updated", + /** Assessment is currently running. */ + Running = "Running", + /** Assessment is Completed or Ready. */ + Completed = "Completed", + /** Assessment is Failed i.e. it is now invalid. */ + Invalid = "Invalid", + /** Assessment is Out of Sync. */ + OutOfSync = "OutOfSync", + /** Assessment is Out Dated. */ + OutDated = "OutDated", + /** Assessment is Deleted. */ + Deleted = "Deleted", + /** Assessment has Failed. */ + Failed = "Failed", +} + +/** + * Assessment Status. \ + * {@link KnownAssessmentStatus} can be used interchangeably with AssessmentStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Created**: Assessment is Created. \ + * **Updated**: Assessment is Updated. \ + * **Running**: Assessment is currently running. \ + * **Completed**: Assessment is Completed or Ready. \ + * **Invalid**: Assessment is Failed i.e. it is now invalid. \ + * **OutOfSync**: Assessment is Out of Sync. \ + * **OutDated**: Assessment is Out Dated. \ + * **Deleted**: Assessment is Deleted. \ + * **Failed**: Assessment has Failed. + */ +export type AssessmentStatus = string; + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +export function proxyResourceSerializer(item: ProxyResource): any { + return item; +} + +export function proxyResourceDeserializer(item: any): ProxyResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */ + readonly id?: string; + /** The name of the resource */ + readonly name?: string; + /** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */ + readonly type?: string; + /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemData; +} + +export function resourceSerializer(item: Resource): any { + return item; +} + +export function resourceDeserializer(item: any): Resource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** 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; +} + +export function systemDataDeserializer(item: any): SystemData { + return { + createdBy: item["createdBy"], + createdByType: item["createdByType"], + createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), + lastModifiedBy: item["lastModifiedBy"], + lastModifiedByType: item["lastModifiedByType"], + lastModifiedAt: !item["lastModifiedAt"] + ? item["lastModifiedAt"] + : new Date(item["lastModifiedAt"]), + }; +} + +/** The kind of entity that created the resource. */ +export enum KnownCreatedByType { + /** The entity was created by a user. */ + User = "User", + /** The entity was created by an application. */ + Application = "Application", + /** The entity was created by a managed identity. */ + ManagedIdentity = "ManagedIdentity", + /** The entity was created by a key. */ + Key = "Key", +} + +/** + * The kind of entity that created the resource. \ + * {@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**: The entity was created by a user. \ + * **Application**: The entity was created by an application. \ + * **ManagedIdentity**: The entity was created by a managed identity. \ + * **Key**: The entity was created by a key. + */ +export type CreatedByType = string; + +/** The response of a AvsAssessmentV2 list operation. */ +export interface _AvsAssessmentV2ListResult { + /** The AvsAssessmentV2 items on this page */ + value: AvsAssessmentV2[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _avsAssessmentV2ListResultDeserializer(item: any): _AvsAssessmentV2ListResult { + return { + value: avsAssessmentV2ArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function avsAssessmentV2ArraySerializer(result: Array): any[] { + return result.map((item) => { + return avsAssessmentV2Serializer(item); + }); +} + +export function avsAssessmentV2ArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return avsAssessmentV2Deserializer(item); + }); +} + +/** model interface _DownloadUrlRequest */ +export interface _DownloadUrlRequest {} + +export function _downloadUrlRequestSerializer(item: _DownloadUrlRequest): any { + return item; +} + +/** Data model of Download URL for assessment report. */ +export interface DownloadUrl { + /** Hyperlink to download report. */ + readonly assessmentReportUrl: string; + /** Expiry date of download url. */ + readonly expirationTime: Date; +} + +export function downloadUrlDeserializer(item: any): DownloadUrl { + return { + assessmentReportUrl: item["assessmentReportUrl"], + expirationTime: new Date(item["expirationTime"]), + }; +} + +/** AVS assessment V2 Assessed Machine resource. */ +export interface AvsAssessedMachineV2 extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: AvsAssessedMachinePropertiesV2; +} + +export function avsAssessedMachineV2Deserializer(item: any): AvsAssessedMachineV2 { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : avsAssessedMachinePropertiesV2Deserializer(item["properties"]), + }; +} + +/** AVS assessed machine properties web model. */ +export interface AvsAssessedMachinePropertiesV2 { + /** The workload type */ + readonly workloadType?: MigrateWorkloadType; + /** The linkages list. */ + readonly linkages?: Linkages[]; + /** The recommendation list. */ + readonly recommendations?: AvsRecommendationsMigrationIssuesMigrationSuitabilitySkus[]; + /** The assessed machine extended details. */ + readonly extendedDetails?: AvsAssessedMachineExtendedDetails; + /** Assessed machine type. */ + readonly assessedMachineType?: AssessedMachineType; + /** When was machine first created. */ + readonly createdTimestamp?: Date; + /** When was machine last updated. */ + readonly updatedTimestamp?: Date; +} + +export function avsAssessedMachinePropertiesV2Deserializer( + item: any, +): AvsAssessedMachinePropertiesV2 { + return { + workloadType: item["workloadType"], + linkages: !item["linkages"] ? item["linkages"] : linkagesArrayDeserializer(item["linkages"]), + recommendations: !item["recommendations"] + ? item["recommendations"] + : avsRecommendationsMigrationIssuesMigrationSuitabilitySkusArrayDeserializer( + item["recommendations"], + ), + extendedDetails: !item["extendedDetails"] + ? item["extendedDetails"] + : avsAssessedMachineExtendedDetailsDeserializer(item["extendedDetails"]), + assessedMachineType: item["assessedMachineType"], + createdTimestamp: !item["createdTimestamp"] + ? item["createdTimestamp"] + : new Date(item["createdTimestamp"]), + updatedTimestamp: !item["updatedTimestamp"] + ? item["updatedTimestamp"] + : new Date(item["updatedTimestamp"]), + }; +} + +/** Migration Workload type */ +export enum KnownMigrateWorkloadType { + /** Unknown - Migration Workload type */ + Unknown = "Unknown", + /** Machine - Migration Workload type */ + Machine = "Machine", + /** Server - Migration Workload type */ + Server = "Server", + /** Instance - Migration Workload type */ + Instance = "Instance", + /** WebServer - Migration Workload type */ + WebServer = "WebServer", + /** WebApplication - Migration Workload type */ + WebApplication = "WebApplication", + /** Database - Migration Workload type */ + Database = "Database", + /** Host - Migration Workload type */ + Host = "Host", + /** ManagementServer - Migration Workload type */ + ManagementServer = "ManagementServer", +} + +/** + * Migration Workload type \ + * {@link KnownMigrateWorkloadType} can be used interchangeably with MigrateWorkloadType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Migration Workload type \ + * **Machine**: Machine - Migration Workload type \ + * **Server**: Server - Migration Workload type \ + * **Instance**: Instance - Migration Workload type \ + * **WebServer**: WebServer - Migration Workload type \ + * **WebApplication**: WebApplication - Migration Workload type \ + * **Database**: Database - Migration Workload type \ + * **Host**: Host - Migration Workload type \ + * **ManagementServer**: ManagementServer - Migration Workload type + */ +export type MigrateWorkloadType = string; + +export function linkagesArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return linkagesDeserializer(item); + }); +} + +/** Linkages details */ +export interface Linkages { + /** The workload name */ + readonly workloadName?: string; + /** The linkage type. */ + readonly linkageType?: LinkageType; + /** The linkage kind. */ + readonly kind?: LinkageKind; + /** The arm id. */ + readonly armId?: string; +} + +export function linkagesDeserializer(item: any): Linkages { + return { + workloadName: item["workloadName"], + linkageType: item["linkageType"], + kind: item["kind"], + armId: item["armId"], + }; +} + +/** Linkage type */ +export enum KnownLinkageType { + /** Parent - Linkage type */ + Parent = "Parent", + /** Source - Linkage type */ + Source = "Source", +} + +/** + * Linkage type \ + * {@link KnownLinkageType} can be used interchangeably with LinkageType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Parent**: Parent - Linkage type \ + * **Source**: Source - Linkage type + */ +export type LinkageType = string; + +/** Linkage kind */ +export enum KnownLinkageKind { + /** Unknown - Linkage kind */ + Unknown = "Unknown", + /** Machine - Linkage kind */ + Machine = "Machine", + /** Server - Linkage kind */ + Server = "Server", + /** Instance - Linkage kind */ + Instance = "Instance", + /** WebServer - Linkage kind */ + WebServer = "WebServer", + /** WebApplication - Linkage kind */ + WebApplication = "WebApplication", + /** Database - Linkage kind */ + Database = "Database", +} + +/** + * Linkage kind \ + * {@link KnownLinkageKind} can be used interchangeably with LinkageKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Linkage kind \ + * **Machine**: Machine - Linkage kind \ + * **Server**: Server - Linkage kind \ + * **Instance**: Instance - Linkage kind \ + * **WebServer**: WebServer - Linkage kind \ + * **WebApplication**: WebApplication - Linkage kind \ + * **Database**: Database - Linkage kind + */ +export type LinkageKind = string; + +export function avsRecommendationsMigrationIssuesMigrationSuitabilitySkusArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return avsRecommendationsMigrationIssuesMigrationSuitabilitySkusDeserializer(item); + }); +} + +/** AVS-specific recommendations details. */ +export interface AvsRecommendationsMigrationIssuesMigrationSuitabilitySkus { + /** The configuration data. */ + readonly configuration?: Configuration; + /** The recommended details. */ + readonly recommendedFor?: RecommendedFor; + /** The migration Platform. */ + readonly migrationPlatform?: MigrationPlatform; + /** The confidence score. */ + readonly confidenceScore?: number; + /** The migration suitability. */ + readonly migrationSuitability?: MigrationSuitability; + /** The security suitability. */ + readonly securitySuitability?: SecuritySuitability; + /** The total cost details. */ + readonly totalCost?: CostDetailsCommon[]; + /** The total cost details. */ + readonly totalSavings?: SavingsDetailsCommon[]; + /** The migration issues list. */ + readonly migrationIssues?: MigrationIssues[]; + /** The Skus list. */ + readonly skus?: SkusMigrationSuitability[]; + /** Gets or sets the machine assessment ARM ID for VM fallback. */ + fallbackMachineAssessmentArmId?: string; +} + +export function avsRecommendationsMigrationIssuesMigrationSuitabilitySkusDeserializer( + item: any, +): AvsRecommendationsMigrationIssuesMigrationSuitabilitySkus { + return { + configuration: !item["configuration"] + ? item["configuration"] + : configurationDeserializer(item["configuration"]), + recommendedFor: !item["recommendedFor"] + ? item["recommendedFor"] + : recommendedForDeserializer(item["recommendedFor"]), + migrationPlatform: item["migrationPlatform"], + confidenceScore: item["confidenceScore"], + migrationSuitability: !item["migrationSuitability"] + ? item["migrationSuitability"] + : migrationSuitabilityDeserializer(item["migrationSuitability"]), + securitySuitability: !item["securitySuitability"] + ? item["securitySuitability"] + : securitySuitabilityDeserializer(item["securitySuitability"]), + totalCost: !item["totalCost"] + ? item["totalCost"] + : costDetailsCommonArrayDeserializer(item["totalCost"]), + totalSavings: !item["totalSavings"] + ? item["totalSavings"] + : savingsDetailsCommonArrayDeserializer(item["totalSavings"]), + migrationIssues: !item["migrationIssues"] + ? item["migrationIssues"] + : migrationIssuesArrayDeserializer(item["migrationIssues"]), + skus: !item["skus"] ? item["skus"] : skusMigrationSuitabilityArrayDeserializer(item["skus"]), + fallbackMachineAssessmentArmId: item["fallbackMachineAssessmentArmId"], + }; +} + +/** Configuration details. */ +export interface Configuration { + /** The azure target. */ + readonly azureTarget?: AzureTarget; + /** The azure target. */ + readonly sizingCriterion?: AssessmentSizingCriterion; +} + +export function configurationDeserializer(item: any): Configuration { + return { + azureTarget: item["azureTarget"], + sizingCriterion: item["sizingCriterion"], + }; +} + +/** Azure Target */ +export enum KnownAzureTarget { + /** Unknown - Azure Target */ + Unknown = "Unknown", + /** SqlDatabase - Azure Target */ + SqlDatabase = "SqlDatabase", + /** SqlMI - Azure Target */ + SqlMI = "SqlMI", + /** FlexServerPG - Azure Target */ + FlexServerPG = "FlexServerPG", + /** OracleIaasVM - Azure Target */ + OracleIaasVM = "OracleIaasVM", + /** AzureSpringApps - Azure Target */ + AzureSpringApps = "AzureSpringApps", + /** SAPAzureInstance - Azure Target */ + SAPAzureInstance = "SAPAzureInstance", + /** AKS - Azure Target */ + AKS = "AKS", + /** MySQLAzureFlexServer - Azure Target */ + MySQLAzureFlexServer = "MySQLAzureFlexServer", + /** AzureSQLVM - Azure Target */ + AzureSqlvm = "AzureSQLVM", + /** AzureVM - Azure Target */ + AzureVM = "AzureVM", + /** AzureAppService - Azure Target */ + AzureAppService = "AzureAppService", + /** AzureAppServiceContainer - Azure Target */ + AzureAppServiceContainer = "AzureAppServiceContainer", + /** Avs - Azure Target */ + Avs = "Avs", +} + +/** + * Azure Target \ + * {@link KnownAzureTarget} can be used interchangeably with AzureTarget, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Azure Target \ + * **SqlDatabase**: SqlDatabase - Azure Target \ + * **SqlMI**: SqlMI - Azure Target \ + * **FlexServerPG**: FlexServerPG - Azure Target \ + * **OracleIaasVM**: OracleIaasVM - Azure Target \ + * **AzureSpringApps**: AzureSpringApps - Azure Target \ + * **SAPAzureInstance**: SAPAzureInstance - Azure Target \ + * **AKS**: AKS - Azure Target \ + * **MySQLAzureFlexServer**: MySQLAzureFlexServer - Azure Target \ + * **AzureSQLVM**: AzureSQLVM - Azure Target \ + * **AzureVM**: AzureVM - Azure Target \ + * **AzureAppService**: AzureAppService - Azure Target \ + * **AzureAppServiceContainer**: AzureAppServiceContainer - Azure Target \ + * **Avs**: Avs - Azure Target + */ +export type AzureTarget = string; + +/** The recommended details. */ +export interface RecommendedFor { + /** The list of strategy type. */ + readonly strategies?: StrategyType[]; +} + +export function recommendedForDeserializer(item: any): RecommendedFor { + return { + strategies: !item["strategies"] + ? item["strategies"] + : item["strategies"].map((p: any) => { + return p; + }), + }; +} + +/** Strategy type */ +export enum KnownStrategyType { + /** PaaSPreferred - Strategy type */ + PaaSPreferred = "PaaSPreferred", + /** CostOptimized - Strategy type */ + CostOptimized = "CostOptimized", + /** EffortOptimized - Strategy type */ + EffortOptimized = "EffortOptimized", +} + +/** + * Strategy type \ + * {@link KnownStrategyType} can be used interchangeably with StrategyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PaaSPreferred**: PaaSPreferred - Strategy type \ + * **CostOptimized**: CostOptimized - Strategy type \ + * **EffortOptimized**: EffortOptimized - Strategy type + */ +export type StrategyType = string; + +/** Migration Platform */ +export enum KnownMigrationPlatform { + /** Unknown - Migration Platform */ + Unknown = "Unknown", + /** PaaS - Migration Platform */ + PaaS = "PaaS", + /** IaaS - Migration Platform */ + IaaS = "IaaS", + /** SaaS - Migration Platform */ + SaaS = "SaaS", +} + +/** + * Migration Platform \ + * {@link KnownMigrationPlatform} can be used interchangeably with MigrationPlatform, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Migration Platform \ + * **PaaS**: PaaS - Migration Platform \ + * **IaaS**: IaaS - Migration Platform \ + * **SaaS**: SaaS - Migration Platform + */ +export type MigrationPlatform = string; + +/** The migration suitability. */ +export interface MigrationSuitability { + /** The migration suitability. */ + readonly readiness?: CloudSuitabilityCommon; +} + +export function migrationSuitabilityDeserializer(item: any): MigrationSuitability { + return { + readiness: item["readiness"], + }; +} + +/** Cloud Suitability Common */ +export enum KnownCloudSuitabilityCommon { + /** Unknown - Cloud Suitability Common */ + Unknown = "Unknown", + /** NotSuitable - Cloud Suitability Common */ + NotSuitable = "NotSuitable", + /** Suitable - Cloud Suitability Common */ + Suitable = "Suitable", + /** ConditionallySuitable - Cloud Suitability Common */ + ConditionallySuitable = "ConditionallySuitable", + /** ReadinessUnknown - Cloud Suitability Common */ + ReadinessUnknown = "ReadinessUnknown", + /** SuitableWithWarnings - Cloud Suitability Common */ + SuitableWithWarnings = "SuitableWithWarnings", +} + +/** + * Cloud Suitability Common \ + * {@link KnownCloudSuitabilityCommon} can be used interchangeably with CloudSuitabilityCommon, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Cloud Suitability Common \ + * **NotSuitable**: NotSuitable - Cloud Suitability Common \ + * **Suitable**: Suitable - Cloud Suitability Common \ + * **ConditionallySuitable**: ConditionallySuitable - Cloud Suitability Common \ + * **ReadinessUnknown**: ReadinessUnknown - Cloud Suitability Common \ + * **SuitableWithWarnings**: SuitableWithWarnings - Cloud Suitability Common + */ +export type CloudSuitabilityCommon = string; + +/** The security suitability. */ +export interface SecuritySuitability { + /** The security suitability. */ + readonly readiness?: CloudSuitabilityCommon; +} + +export function securitySuitabilityDeserializer(item: any): SecuritySuitability { + return { + readiness: item["readiness"], + }; +} + +export function costDetailsCommonArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return costDetailsCommonDeserializer(item); + }); +} + +/** The cost details. */ +export interface CostDetailsCommon { + /** The savings options. */ + readonly savingOptions?: SavingsOptions; + /** The sku cost details per azure offer type. */ + readonly costDetail?: NameValuePairCostType[]; +} + +export function costDetailsCommonDeserializer(item: any): CostDetailsCommon { + return { + savingOptions: item["savingOptions"], + costDetail: !item["costDetail"] + ? item["costDetail"] + : nameValuePairCostTypeArrayDeserializer(item["costDetail"]), + }; +} + +export function nameValuePairCostTypeArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return nameValuePairCostTypeDeserializer(item); + }); +} + +/** The generic name value pair. */ +export interface NameValuePairCostType { + /** The name. */ + readonly name?: CostType; + /** The value. */ + readonly value?: number; +} + +export function nameValuePairCostTypeDeserializer(item: any): NameValuePairCostType { + return { + name: item["name"], + value: item["value"], + }; +} + +/** Cost type */ +export enum KnownCostType { + /** MonthlyStorageCost - Cost type */ + MonthlyStorageCost = "MonthlyStorageCost", + /** MonthlyComputeCost - Cost type */ + MonthlyComputeCost = "MonthlyComputeCost", + /** MonthlyLicensingCost - Cost type */ + MonthlyLicensingCost = "MonthlyLicensingCost", + /** MonthlySecurityCost - Cost type */ + MonthlySecurityCost = "MonthlySecurityCost", + /** MonthlyManagementCost - Cost type */ + MonthlyManagementCost = "MonthlyManagementCost", + /** MonitoringService - Cost type */ + MonitoringService = "MonitoringService", + /** DataProtectionService - Cost type */ + DataProtectionService = "DataProtectionService", + /** PatchingService - Cost type */ + PatchingService = "PatchingService", + /** MonthlyAzureHybridCost - Cost type */ + MonthlyAzureHybridCost = "MonthlyAzureHybridCost", + /** MonthlyPremiumV2StorageCost - Cost type */ + MonthlyPremiumV2StorageCost = "MonthlyPremiumV2StorageCost", + /** MonthlyLinuxAzureHybridCost - Cost type */ + MonthlyLinuxAzureHybridCost = "MonthlyLinuxAzureHybridCost", + /** MonthlyUltraStorageCost - Cost type */ + MonthlyUltraStorageCost = "MonthlyUltraStorageCost", + /** MonthlyStandardSsdStorageCost - Cost type */ + MonthlyStandardSsdStorageCost = "MonthlyStandardSsdStorageCost", + /** MonthlyBandwidthCost - Cost type */ + MonthlyBandwidthCost = "MonthlyBandwidthCost", + /** MonthlyPremiumStorageCost - Cost type */ + MonthlyPremiumStorageCost = "MonthlyPremiumStorageCost", + /** MonthlyUltraDiskCost - Cost type */ + MonthlyUltraDiskCost = "MonthlyUltraDiskCost", + /** MonthlyStandardHddStorageCost - Cost type */ + MonthlyStandardHddStorageCost = "MonthlyStandardHddStorageCost", + /** MonthlyAvsExternalStorageCost - Cost type */ + MonthlyAvsExternalStorageCost = "MonthlyAvsExternalStorageCost", + /** MonthlyAvsNetworkCost - Cost type */ + MonthlyAvsNetworkCost = "MonthlyAvsNetworkCost", + /** MonthlyAvsNodeCost - Cost type */ + MonthlyAvsNodeCost = "MonthlyAvsNodeCost", + /** TotalMonthlyCost - Cost type */ + TotalMonthlyCost = "TotalMonthlyCost", +} + +/** + * Cost type \ + * {@link KnownCostType} can be used interchangeably with CostType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MonthlyStorageCost**: MonthlyStorageCost - Cost type \ + * **MonthlyComputeCost**: MonthlyComputeCost - Cost type \ + * **MonthlyLicensingCost**: MonthlyLicensingCost - Cost type \ + * **MonthlySecurityCost**: MonthlySecurityCost - Cost type \ + * **MonthlyManagementCost**: MonthlyManagementCost - Cost type \ + * **MonitoringService**: MonitoringService - Cost type \ + * **DataProtectionService**: DataProtectionService - Cost type \ + * **PatchingService**: PatchingService - Cost type \ + * **MonthlyAzureHybridCost**: MonthlyAzureHybridCost - Cost type \ + * **MonthlyPremiumV2StorageCost**: MonthlyPremiumV2StorageCost - Cost type \ + * **MonthlyLinuxAzureHybridCost**: MonthlyLinuxAzureHybridCost - Cost type \ + * **MonthlyUltraStorageCost**: MonthlyUltraStorageCost - Cost type \ + * **MonthlyStandardSsdStorageCost**: MonthlyStandardSsdStorageCost - Cost type \ + * **MonthlyBandwidthCost**: MonthlyBandwidthCost - Cost type \ + * **MonthlyPremiumStorageCost**: MonthlyPremiumStorageCost - Cost type \ + * **MonthlyUltraDiskCost**: MonthlyUltraDiskCost - Cost type \ + * **MonthlyStandardHddStorageCost**: MonthlyStandardHddStorageCost - Cost type \ + * **MonthlyAvsExternalStorageCost**: MonthlyAvsExternalStorageCost - Cost type \ + * **MonthlyAvsNetworkCost**: MonthlyAvsNetworkCost - Cost type \ + * **MonthlyAvsNodeCost**: MonthlyAvsNodeCost - Cost type \ + * **TotalMonthlyCost**: TotalMonthlyCost - Cost type + */ +export type CostType = string; + +export function savingsDetailsCommonArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return savingsDetailsCommonDeserializer(item); + }); +} + +/** The savings details. */ +export interface SavingsDetailsCommon { + /** The savings options. */ + readonly savingOptions?: SavingsOptions; + /** The sku cost details per azure offer type. */ + readonly savingsDetail?: NameValuePairSavingsType[]; +} + +export function savingsDetailsCommonDeserializer(item: any): SavingsDetailsCommon { + return { + savingOptions: item["savingOptions"], + savingsDetail: !item["savingsDetail"] + ? item["savingsDetail"] + : nameValuePairSavingsTypeArrayDeserializer(item["savingsDetail"]), + }; +} + +export function nameValuePairSavingsTypeArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return nameValuePairSavingsTypeDeserializer(item); + }); +} + +/** The generic name value pair. */ +export interface NameValuePairSavingsType { + /** The name. */ + readonly name?: SavingsType; + /** The value. */ + readonly value?: number; +} + +export function nameValuePairSavingsTypeDeserializer(item: any): NameValuePairSavingsType { + return { + name: item["name"], + value: item["value"], + }; +} + +/** Savings type */ +export enum KnownSavingsType { + /** MonthlyAzureHybridCostSavings - Savings type */ + MonthlyAzureHybridCostSavings = "MonthlyAzureHybridCostSavings", + /** MonthlyLinuxAzureHybridCostSavings - Savings type */ + MonthlyLinuxAzureHybridCostSavings = "MonthlyLinuxAzureHybridCostSavings", + /** MonthlyAhubSqlCostSavings - Savings type */ + MonthlyAhubSqlCostSavings = "MonthlyAhubSqlCostSavings", + /** MonthlyVcfByolCostDifference - Savings type */ + MonthlyVcfByolCostDifference = "MonthlyVcfByolCostDifference", +} + +/** + * Savings type \ + * {@link KnownSavingsType} can be used interchangeably with SavingsType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MonthlyAzureHybridCostSavings**: MonthlyAzureHybridCostSavings - Savings type \ + * **MonthlyLinuxAzureHybridCostSavings**: MonthlyLinuxAzureHybridCostSavings - Savings type \ + * **MonthlyAhubSqlCostSavings**: MonthlyAhubSqlCostSavings - Savings type \ + * **MonthlyVcfByolCostDifference**: MonthlyVcfByolCostDifference - Savings type + */ +export type SavingsType = string; + +export function migrationIssuesArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return migrationIssuesDeserializer(item); + }); +} + +/** Migration issues. */ +export interface MigrationIssues { + /** The issue id. */ + readonly issueCode?: string; + /** The issue category. */ + readonly issueCategory?: MigrationIssuesCategory; + /** The issue description. */ + readonly issueDescription?: string; + /** The possible causes. */ + readonly possibleCause?: string; + /** The recommended action. */ + readonly recommendedActions?: string[]; + /** The more information list. */ + readonly moreInformation?: MoreInformation[]; +} + +export function migrationIssuesDeserializer(item: any): MigrationIssues { + return { + issueCode: item["issueCode"], + issueCategory: item["issueCategory"], + issueDescription: item["issueDescription"], + possibleCause: item["possibleCause"], + recommendedActions: !item["recommendedActions"] + ? item["recommendedActions"] + : item["recommendedActions"].map((p: any) => { + return p; + }), + moreInformation: !item["moreInformation"] + ? item["moreInformation"] + : moreInformationArrayDeserializer(item["moreInformation"]), + }; +} + +/** Migration Issues Category */ +export enum KnownMigrationIssuesCategory { + /** Issue - Migration Issues Category */ + Issue = "Issue", + /** Warning - Migration Issues Category */ + Warning = "Warning", + /** Internal - Migration Issues Category */ + Internal = "Internal", +} + +/** + * Migration Issues Category \ + * {@link KnownMigrationIssuesCategory} can be used interchangeably with MigrationIssuesCategory, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Issue**: Issue - Migration Issues Category \ + * **Warning**: Warning - Migration Issues Category \ + * **Internal**: Internal - Migration Issues Category + */ +export type MigrationIssuesCategory = string; + +export function moreInformationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return moreInformationDeserializer(item); + }); +} + +/** More information details. */ +export interface MoreInformation { + /** The title of the information. */ + readonly title: string; + /** The URL of the information. */ + readonly url: string; +} + +export function moreInformationDeserializer(item: any): MoreInformation { + return { + title: item["title"], + url: item["url"], + }; +} + +export function skusMigrationSuitabilityArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return skusMigrationSuitabilityDeserializer(item); + }); +} + +/** Skus details. */ +export interface SkusMigrationSuitability { + /** The Sku kind. */ + readonly kind?: SkuKind; + /** The resource uri. */ + readonly resourceUri?: string; + /** The sku name. */ + readonly displayName?: string; + /** The sku id. */ + readonly id?: string; + /** The sku type. */ + readonly type?: SkuType; + /** The source name. */ + readonly sources?: SourceRecommendationMigrationSuitability[]; + /** The sku details. */ + readonly details?: SkuDetails; +} + +export function skusMigrationSuitabilityDeserializer(item: any): SkusMigrationSuitability { + return { + kind: item["kind"], + resourceUri: item["resourceUri"], + displayName: item["displayName"], + id: item["id"], + type: item["type"], + sources: !item["sources"] + ? item["sources"] + : sourceRecommendationMigrationSuitabilityArrayDeserializer(item["sources"]), + details: !item["details"] ? item["details"] : skuDetailsDeserializer(item["details"]), + }; +} + +/** Sku Kind */ +export enum KnownSkuKind { + /** Endpoint - Sku Kind */ + Endpoint = "Endpoint", + /** Details - Sku Kind */ + Details = "Details", +} + +/** + * Sku Kind \ + * {@link KnownSkuKind} can be used interchangeably with SkuKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Endpoint**: Endpoint - Sku Kind \ + * **Details**: Details - Sku Kind + */ +export type SkuKind = string; + +/** Sku type */ +export enum KnownSkuType { + /** Unknown - Sku type */ + Unknown = "Unknown", + /** Compute - Sku type */ + Compute = "Compute", + /** Storage - Sku type */ + Storage = "Storage", + /** Network - Sku type */ + Network = "Network", + /** AppServicePlan - Sku type */ + AppServicePlan = "AppServicePlan", + /** AzureSpringApps - Sku type */ + AzureSpringApps = "AzureSpringApps", +} + +/** + * Sku type \ + * {@link KnownSkuType} can be used interchangeably with SkuType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Sku type \ + * **Compute**: Compute - Sku type \ + * **Storage**: Storage - Sku type \ + * **Network**: Network - Sku type \ + * **AppServicePlan**: AppServicePlan - Sku type \ + * **AzureSpringApps**: AzureSpringApps - Sku type + */ +export type SkuType = string; + +export function sourceRecommendationMigrationSuitabilityArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return sourceRecommendationMigrationSuitabilityDeserializer(item); + }); +} + +/** Source recommendation details. */ +export interface SourceRecommendationMigrationSuitability { + /** The sku name. */ + readonly name?: string; + /** The sku type. */ + readonly migrationSuitability?: MigrationSuitability; +} + +export function sourceRecommendationMigrationSuitabilityDeserializer( + item: any, +): SourceRecommendationMigrationSuitability { + return { + name: item["name"], + migrationSuitability: !item["migrationSuitability"] + ? item["migrationSuitability"] + : migrationSuitabilityDeserializer(item["migrationSuitability"]), + }; +} + +/** Sku details. */ +export interface SkuDetails { + /** The sku type. */ + readonly skuType?: SkuType; + /** The sku name. */ + readonly skuName?: string; + /** The capabilities. */ + readonly capabilities?: NameValuePair[]; + /** The sku cost details. */ + readonly totalCost?: CostDetailsCommon[]; + /** The sku savings details. */ + readonly totalSavings?: SavingsDetailsCommon[]; +} + +export function skuDetailsDeserializer(item: any): SkuDetails { + return { + skuType: item["skuType"], + skuName: item["skuName"], + capabilities: !item["capabilities"] + ? item["capabilities"] + : nameValuePairArrayDeserializer(item["capabilities"]), + totalCost: !item["totalCost"] + ? item["totalCost"] + : costDetailsCommonArrayDeserializer(item["totalCost"]), + totalSavings: !item["totalSavings"] + ? item["totalSavings"] + : savingsDetailsCommonArrayDeserializer(item["totalSavings"]), + }; +} + +export function nameValuePairArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return nameValuePairDeserializer(item); + }); +} + +/** The generic name value pair. */ +export interface NameValuePair { + /** The name. */ + readonly name?: string; + /** The value. */ + readonly value?: string; +} + +export function nameValuePairDeserializer(item: any): NameValuePair { + return { + name: item["name"], + value: item["value"], + }; +} + +/** The avs assessed machine extended details. */ +export interface AvsAssessedMachineExtendedDetails { + /** List of errors for this machine. */ + readonly errors?: ErrorModel[]; + /** List of Disks that were assessed as part of this machine's assessment. */ + readonly disks?: AvsAssessedDiskV2[]; + /** + * List of Network Adapters that were assessed as part of this machine's + * assessment. + */ + readonly networkAdapters?: AvsAssessedNetworkAdapter[]; + /** Gets the storage in use. */ + readonly storageInUseGB?: number; + /** Boot type of machine discovered in private data center. */ + readonly bootType?: MachineBootType; + /** Operating system as reported by datacenter management solution. */ + readonly operatingSystemType?: string; + /** Operating system as reported by datacenter management solution. */ + readonly operatingSystemName?: string; + /** Operating system version as reported by datacenter management solution. */ + readonly operatingSystemVersion?: string; + /** Operating system architecture as reported by datacenter management solution. */ + readonly operatingSystemArchitecture?: GuestOperatingSystemArchitecture; + /** Display Name of the Machine. */ + readonly displayName?: string; + /** Description for the machine. */ + readonly description?: string; + /** Data center management server name. */ + readonly datacenterManagementServerName?: string; + /** Megabytes of memory found allocated for the machine in private data center. */ + readonly megabytesOfMemory?: number; + /** Number of CPU cores found on the machine. */ + readonly numberOfCores?: number; + /** + * Percentile of Percentage of Cores Utilized noted during time period T. + * + * Here N and T are settings on Assessment. + */ + readonly percentageCoresUtilization?: number; + /** + * Percentile of Percentage of Memory Utilized noted during time period T. + * + * Here N and T are settings on Assessment. + */ + readonly percentageMemoryUtilization?: number; + /** Gets the Avs Target Type for Machine. */ + readonly avsTargetNode?: AzureAvsNodeType; +} + +export function avsAssessedMachineExtendedDetailsDeserializer( + item: any, +): AvsAssessedMachineExtendedDetails { + return { + errors: !item["errors"] ? item["errors"] : errorArrayDeserializer(item["errors"]), + disks: !item["disks"] ? item["disks"] : avsAssessedDiskV2ArrayDeserializer(item["disks"]), + networkAdapters: !item["networkAdapters"] + ? item["networkAdapters"] + : avsAssessedNetworkAdapterArrayDeserializer(item["networkAdapters"]), + storageInUseGB: item["storageInUseGB"], + bootType: item["bootType"], + operatingSystemType: item["operatingSystemType"], + operatingSystemName: item["operatingSystemName"], + operatingSystemVersion: item["operatingSystemVersion"], + operatingSystemArchitecture: item["operatingSystemArchitecture"], + displayName: item["displayName"], + description: item["description"], + datacenterManagementServerName: item["datacenterManagementServerName"], + megabytesOfMemory: item["megabytesOfMemory"], + numberOfCores: item["numberOfCores"], + percentageCoresUtilization: item["percentageCoresUtilization"], + percentageMemoryUtilization: item["percentageMemoryUtilization"], + avsTargetNode: item["avsTargetNode"], + }; +} + +export function errorArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorDeserializer(item); + }); +} + +/** Error web model class. */ +export interface ErrorModel { + /** Gets the error ID. */ + readonly id?: number; + /** Gets the error code. */ + readonly code?: string; + /** Gets the Run as account ID. */ + readonly runAsAccountId?: string; + /** Gets the Appliance name. */ + readonly applianceName?: string; + /** Gets the error message. */ + readonly message?: string; + /** Gets the error summary message. */ + readonly summaryMessage?: string; + /** Gets the agent scenario where this error occurred. */ + readonly agentScenario?: string; + /** Gets the error possible causes. */ + readonly possibleCauses?: string; + /** Gets the recommended action for the error. */ + readonly recommendedAction?: string; + /** Gets the error severity. */ + readonly severity?: string; + /** Gets the error message parameters. */ + readonly messageParameters?: NameValuePair[]; + /** Gets the time stamp when the error was updated. */ + readonly updatedTimeStamp?: Date; + /** Gets the type of assessment impacted by this error. */ + readonly impactedAssessmentType?: string; +} + +export function errorDeserializer(item: any): ErrorModel { + return { + id: item["id"], + code: item["code"], + runAsAccountId: item["runAsAccountId"], + applianceName: item["applianceName"], + message: item["message"], + summaryMessage: item["summaryMessage"], + agentScenario: item["agentScenario"], + possibleCauses: item["possibleCauses"], + recommendedAction: item["recommendedAction"], + severity: item["severity"], + messageParameters: !item["messageParameters"] + ? item["messageParameters"] + : nameValuePairArrayDeserializer(item["messageParameters"]), + updatedTimeStamp: !item["updatedTimeStamp"] + ? item["updatedTimeStamp"] + : new Date(item["updatedTimeStamp"]), + impactedAssessmentType: item["impactedAssessmentType"], + }; +} + +export function avsAssessedDiskV2ArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return avsAssessedDiskV2Deserializer(item); + }); +} + +/** AVS assessed disk web model class. */ +export interface AvsAssessedDiskV2 { + /** Gets the ID of the disk. */ + readonly name?: string; + /** Gets the display name of the disk. */ + readonly displayName?: string; + /** Gigabytes Provisioned for a disk in private data center. */ + readonly gigabytesProvisioned?: number; + /** Disk Read Throughput in MB/s. */ + readonly megabytesPerSecondOfRead?: number; + /** Disk Write Throughput in MB/s. */ + readonly megabytesPerSecondOfWrite?: number; + /** Read Operations per second. */ + readonly numberOfReadOperationsPerSecond?: number; + /** Write Operations per second. */ + readonly numberOfWriteOperationsPerSecond?: number; + /** Associated storage Type recommended for Disk. */ + readonly assessedExternalStorageType?: ExternalStorageType; + /** Estimated Disk Size in GB. */ + readonly estimatedDiskSizeInGB?: number; +} + +export function avsAssessedDiskV2Deserializer(item: any): AvsAssessedDiskV2 { + return { + name: item["name"], + displayName: item["displayName"], + gigabytesProvisioned: item["gigabytesProvisioned"], + megabytesPerSecondOfRead: item["megabytesPerSecondOfRead"], + megabytesPerSecondOfWrite: item["megabytesPerSecondOfWrite"], + numberOfReadOperationsPerSecond: item["numberOfReadOperationsPerSecond"], + numberOfWriteOperationsPerSecond: item["numberOfWriteOperationsPerSecond"], + assessedExternalStorageType: item["assessedExternalStorageType"], + estimatedDiskSizeInGB: item["estimatedDiskSizeInGB"], + }; +} + +export function avsAssessedNetworkAdapterArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return avsAssessedNetworkAdapterDeserializer(item); + }); +} + +/** Second level object returned as part of AVS AssessedMachine REST resource. */ +export interface AvsAssessedNetworkAdapter { + /** Mac address of the NIC. */ + readonly macAddress?: string; + /** IP V4 addresses for the machine. */ + readonly ipAddresses?: string[]; + /** Gets the display name of the network adapter. */ + readonly displayName?: string; + /** Gets the name of the network adapter. */ + readonly name?: string; + /** + * Gets the Recieved data for Network Adapter in MB/s. + * This value is + * the percentile of historical data based on options selected in Assessment. + */ + readonly megabytesPerSecondRecieved?: number; + /** + * Gets the Transmitted data for Network Adapter in MB/s. + * This value + * is the percentile of historical data based on options selected in Assessment. + */ + readonly megabytesPerSecondTransmitted?: number; +} + +export function avsAssessedNetworkAdapterDeserializer(item: any): AvsAssessedNetworkAdapter { + return { + macAddress: item["macAddress"], + ipAddresses: !item["ipAddresses"] + ? item["ipAddresses"] + : item["ipAddresses"].map((p: any) => { + return p; + }), + displayName: item["displayName"], + name: item["name"], + megabytesPerSecondRecieved: item["megabytesPerSecondRecieved"], + megabytesPerSecondTransmitted: item["megabytesPerSecondTransmitted"], + }; +} + +/** Machine Boot Type */ +export enum KnownMachineBootType { + /** Unknown - Machine Boot Type */ + Unknown = "Unknown", + /** EFI - Machine Boot Type */ + EFI = "EFI", + /** BIOS - Machine Boot Type */ + Bios = "BIOS", + /** NotSpecified - Machine Boot Type */ + NotSpecified = "NotSpecified", +} + +/** + * Machine Boot Type \ + * {@link KnownMachineBootType} can be used interchangeably with MachineBootType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Machine Boot Type \ + * **EFI**: EFI - Machine Boot Type \ + * **BIOS**: BIOS - Machine Boot Type \ + * **NotSpecified**: NotSpecified - Machine Boot Type + */ +export type MachineBootType = string; + +/** Guest operating system architecture */ +export enum KnownGuestOperatingSystemArchitecture { + /** Unknown - Guest operating system architecture */ + Unknown = "Unknown", + /** X86 - Guest operating system architecture */ + X86 = "X86", + /** X64 - Guest operating system architecture */ + X64 = "X64", +} + +/** + * Guest operating system architecture \ + * {@link KnownGuestOperatingSystemArchitecture} can be used interchangeably with GuestOperatingSystemArchitecture, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Guest operating system architecture \ + * **X86**: X86 - Guest operating system architecture \ + * **X64**: X64 - Guest operating system architecture + */ +export type GuestOperatingSystemArchitecture = string; + +/** Assessed machine type */ +export enum KnownAssessedMachineType { + /** Unknown - Assessed machine type */ + Unknown = "Unknown", + /** AssessedMachine - Assessed machine type */ + AssessedMachine = "AssessedMachine", + /** AvsAssessedMachine - Assessed machine type */ + AvsAssessedMachine = "AvsAssessedMachine", + /** SqlAssessedMachine - Assessed machine type */ + SqlAssessedMachine = "SqlAssessedMachine", +} + +/** + * Assessed machine type \ + * {@link KnownAssessedMachineType} can be used interchangeably with AssessedMachineType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Assessed machine type \ + * **AssessedMachine**: AssessedMachine - Assessed machine type \ + * **AvsAssessedMachine**: AvsAssessedMachine - Assessed machine type \ + * **SqlAssessedMachine**: SqlAssessedMachine - Assessed machine type + */ +export type AssessedMachineType = string; + +/** The response of a AvsAssessedMachineV2 list operation. */ +export interface _AvsAssessedMachineV2ListResult { + /** The AvsAssessedMachineV2 items on this page */ + value: AvsAssessedMachineV2[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _avsAssessedMachineV2ListResultDeserializer( + item: any, +): _AvsAssessedMachineV2ListResult { + return { + value: avsAssessedMachineV2ArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function avsAssessedMachineV2ArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return avsAssessedMachineV2Deserializer(item); + }); +} + +/** AVS Assessment Summary REST resource. */ +export interface AvsAssessmentV2Summary extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: AvsAssessmentSummaryPropertiesV2; +} + +export function avsAssessmentV2SummaryDeserializer(item: any): AvsAssessmentV2Summary { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : avsAssessmentSummaryPropertiesV2Deserializer(item["properties"]), + }; +} + +/** Properties of the Machine Assessment V2 Summary. */ +export interface AvsAssessmentSummaryPropertiesV2 { + /** The summary type */ + readonly summaryType?: SummaryType; + /** The summary name */ + readonly summaryName?: string; + /** The source details list. */ + readonly sources?: SourceDetails[]; + /** The target details list. */ + readonly targets?: TargetDetails[]; + /** The target source mapping. */ + readonly targetSourceMapping?: TargetSourcePair[]; + /** The cost components. */ + readonly costComponents?: CostDetailsCommon[]; + /** The cost components. */ + readonly savingsComponents?: SavingsDetailsCommon[]; + /** Gets or sets the Assessment cloud suitability. */ + readonly suitability?: CloudSuitability; + /** Gets or sets the Assessment suitability explanation. */ + readonly suitabilityExplanation?: AzureAvsSuitabilityExplanation; + /** Recommended number of nodes. */ + readonly numberOfNodes?: number; + /** Predicted CPU utilization. */ + readonly cpuUtilization?: number; + /** Predicted RAM utilization. */ + readonly ramUtilization?: number; + /** Predicted storage utilization. */ + readonly storageUtilization?: number; + /** Predicted total CPU cores used. */ + readonly totalCpuCores?: number; + /** Predicted total RAM used in GB. */ + readonly totalRamInGB?: number; + /** Predicted total Storage used in GB. */ + readonly totalStorageInGB?: number; + /** Estimated AVS SKU for Assessment. */ + readonly avsEstimatedNodes?: AvsEstimatedNode[]; + /** Estimated External Storage for Assessment. */ + readonly avsEstimatedExternalStorages?: AvsEstimatedExternalStorage[]; + /** Estimated External Storage for Assessment. */ + readonly avsEstimatedNetworks?: AvsEstimatedNetwork[]; + /** Limiting factor. */ + readonly limitingFactor?: string; +} + +export function avsAssessmentSummaryPropertiesV2Deserializer( + item: any, +): AvsAssessmentSummaryPropertiesV2 { + return { + summaryType: item["summaryType"], + summaryName: item["summaryName"], + sources: !item["sources"] ? item["sources"] : sourceDetailsArrayDeserializer(item["sources"]), + targets: !item["targets"] ? item["targets"] : targetDetailsArrayDeserializer(item["targets"]), + targetSourceMapping: !item["targetSourceMapping"] + ? item["targetSourceMapping"] + : targetSourcePairArrayDeserializer(item["targetSourceMapping"]), + costComponents: !item["costComponents"] + ? item["costComponents"] + : costDetailsCommonArrayDeserializer(item["costComponents"]), + savingsComponents: !item["savingsComponents"] + ? item["savingsComponents"] + : savingsDetailsCommonArrayDeserializer(item["savingsComponents"]), + suitability: item["suitability"], + suitabilityExplanation: item["suitabilityExplanation"], + numberOfNodes: item["numberOfNodes"], + cpuUtilization: item["cpuUtilization"], + ramUtilization: item["ramUtilization"], + storageUtilization: item["storageUtilization"], + totalCpuCores: item["totalCpuCores"], + totalRamInGB: item["totalRamInGB"], + totalStorageInGB: item["totalStorageInGB"], + avsEstimatedNodes: !item["avsEstimatedNodes"] + ? item["avsEstimatedNodes"] + : avsEstimatedNodeArrayDeserializer(item["avsEstimatedNodes"]), + avsEstimatedExternalStorages: !item["avsEstimatedExternalStorages"] + ? item["avsEstimatedExternalStorages"] + : avsEstimatedExternalStorageArrayDeserializer(item["avsEstimatedExternalStorages"]), + avsEstimatedNetworks: !item["avsEstimatedNetworks"] + ? item["avsEstimatedNetworks"] + : avsEstimatedNetworkArrayDeserializer(item["avsEstimatedNetworks"]), + limitingFactor: item["limitingFactor"], + }; +} + +/** Summary Type */ +export enum KnownSummaryType { + /** Unknown - Summary Type */ + Unknown = "Unknown", + /** Strategy - Summary Type */ + Strategy = "Strategy", + /** Target - Summary Type */ + Target = "Target", +} + +/** + * Summary Type \ + * {@link KnownSummaryType} can be used interchangeably with SummaryType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Summary Type \ + * **Strategy**: Strategy - Summary Type \ + * **Target**: Target - Summary Type + */ +export type SummaryType = string; + +export function sourceDetailsArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return sourceDetailsDeserializer(item); + }); +} + +/** Source details */ +export interface SourceDetails { + /** The source name. */ + readonly sourceName?: AssessmentSource; + /** The source type. */ + readonly sourceType?: MigrateWorkloadType; + /** The migration platform. */ + readonly platform?: MigrationPlatform; + /** The count of a type of source. */ + readonly count?: number; +} + +export function sourceDetailsDeserializer(item: any): SourceDetails { + return { + sourceName: item["sourceName"], + sourceType: item["sourceType"], + platform: item["platform"], + count: item["count"], + }; +} + +/** Assessment Source */ +export enum KnownAssessmentSource { + /** Unknown - Assessment Source */ + Unknown = "Unknown", + /** Machine - Assessment Source */ + Machine = "Machine", + /** IIS - Assessment Source */ + IIS = "IIS", + /** TomCat - Assessment Source */ + TomCat = "TomCat", + /** OracleServer - Assessment Source */ + OracleServer = "OracleServer", + /** OracleDatabase - Assessment Source */ + OracleDatabase = "OracleDatabase", + /** SAPInstance - Assessment Source */ + SAPInstance = "SAPInstance", + /** SpringbootApplication - Assessment Source */ + SpringbootApplication = "SpringbootApplication", + /** MySQLServer - Assessment Source */ + MySQLServer = "MySQLServer", + /** SqlInstance - Assessment Source */ + SqlInstance = "SqlInstance", + /** SqlDatabase - Assessment Source */ + SqlDatabase = "SqlDatabase", + /** WebApps - Assessment Source */ + WebApps = "WebApps", +} + +/** + * Assessment Source \ + * {@link KnownAssessmentSource} can be used interchangeably with AssessmentSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Assessment Source \ + * **Machine**: Machine - Assessment Source \ + * **IIS**: IIS - Assessment Source \ + * **TomCat**: TomCat - Assessment Source \ + * **OracleServer**: OracleServer - Assessment Source \ + * **OracleDatabase**: OracleDatabase - Assessment Source \ + * **SAPInstance**: SAPInstance - Assessment Source \ + * **SpringbootApplication**: SpringbootApplication - Assessment Source \ + * **MySQLServer**: MySQLServer - Assessment Source \ + * **SqlInstance**: SqlInstance - Assessment Source \ + * **SqlDatabase**: SqlDatabase - Assessment Source \ + * **WebApps**: WebApps - Assessment Source + */ +export type AssessmentSource = string; + +export function targetDetailsArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return targetDetailsDeserializer(item); + }); +} + +/** Target details */ +export interface TargetDetails { + /** The target name. */ + readonly targetName?: AzureTarget; + /** The target type. */ + readonly targetType?: MigrateWorkloadType; + /** The migration platform. */ + readonly platform?: MigrationPlatform; + /** The count of a type of source. */ + readonly count?: number; +} + +export function targetDetailsDeserializer(item: any): TargetDetails { + return { + targetName: item["targetName"], + targetType: item["targetType"], + platform: item["platform"], + count: item["count"], + }; +} + +export function targetSourcePairArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return targetSourcePairDeserializer(item); + }); +} + +/** Target source pair */ +export interface TargetSourcePair { + /** The source name. */ + readonly sourceRef?: AssessmentSource; + /** The target name. */ + readonly targetRef?: AzureTarget; + /** The count of a type of source. */ + readonly sourceCount?: number; + /** The count of a type of target. */ + readonly targetCount?: number; + /** The migration details. */ + readonly migrationDetails?: MigrationDetails; + /** The management details. */ + readonly managementDetails?: ManagementDetails[]; + /** The cost details. */ + readonly costDetails?: CostDetailsCommon[]; + /** The savings details. */ + readonly savingsDetails?: SavingsDetailsCommon[]; + /** The confidence score. */ + readonly confidenceScore?: number; +} + +export function targetSourcePairDeserializer(item: any): TargetSourcePair { + return { + sourceRef: item["sourceRef"], + targetRef: item["targetRef"], + sourceCount: item["sourceCount"], + targetCount: item["targetCount"], + migrationDetails: !item["migrationDetails"] + ? item["migrationDetails"] + : migrationDetailsDeserializer(item["migrationDetails"]), + managementDetails: !item["managementDetails"] + ? item["managementDetails"] + : managementDetailsArrayDeserializer(item["managementDetails"]), + costDetails: !item["costDetails"] + ? item["costDetails"] + : costDetailsCommonArrayDeserializer(item["costDetails"]), + savingsDetails: !item["savingsDetails"] + ? item["savingsDetails"] + : savingsDetailsCommonArrayDeserializer(item["savingsDetails"]), + confidenceScore: item["confidenceScore"], + }; +} + +/** Migration details. */ +export interface MigrationDetails { + /** The readiness summary. */ + readonly readinessSummary?: NameValuePairCloudSuitabilityCommon[]; + /** The migration type */ + readonly migrationType?: MigrationType; +} + +export function migrationDetailsDeserializer(item: any): MigrationDetails { + return { + readinessSummary: !item["readinessSummary"] + ? item["readinessSummary"] + : nameValuePairCloudSuitabilityCommonArrayDeserializer(item["readinessSummary"]), + migrationType: item["migrationType"], + }; +} + +export function nameValuePairCloudSuitabilityCommonArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return nameValuePairCloudSuitabilityCommonDeserializer(item); + }); +} + +/** The generic name value pair. */ +export interface NameValuePairCloudSuitabilityCommon { + /** The name. */ + readonly name?: CloudSuitabilityCommon; + /** The value. */ + readonly value?: number; +} + +export function nameValuePairCloudSuitabilityCommonDeserializer( + item: any, +): NameValuePairCloudSuitabilityCommon { + return { + name: item["name"], + value: item["value"], + }; +} + +/** Migration Type */ +export enum KnownMigrationType { + /** Unknown - Migration Type */ + Unknown = "Unknown", + /** Replatform - Migration Type */ + Replatform = "Replatform", + /** Rehost - Migration Type */ + Rehost = "Rehost", + /** Retain - Migration Type */ + Retain = "Retain", + /** Rearchitect - Migration Type */ + Rearchitect = "Rearchitect", +} + +/** + * Migration Type \ + * {@link KnownMigrationType} can be used interchangeably with MigrationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown - Migration Type \ + * **Replatform**: Replatform - Migration Type \ + * **Rehost**: Rehost - Migration Type \ + * **Retain**: Retain - Migration Type \ + * **Rearchitect**: Rearchitect - Migration Type + */ +export type MigrationType = string; + +export function managementDetailsArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return managementDetailsDeserializer(item); + }); +} + +/** Management details. */ +export interface ManagementDetails { + /** The management summary name. */ + readonly name?: AzureManagementOfferingType; + /** The management suitability summary. */ + readonly readinessSummary?: NameValuePairCloudSuitabilityCommon[]; +} + +export function managementDetailsDeserializer(item: any): ManagementDetails { + return { + name: item["name"], + readinessSummary: !item["readinessSummary"] + ? item["readinessSummary"] + : nameValuePairCloudSuitabilityCommonArrayDeserializer(item["readinessSummary"]), + }; +} + +/** Azure management Offering type */ +export enum KnownAzureManagementOfferingType { + /** No - Azure management Offering type */ + No = "No", + /** SCOMMI - Azure management Offering type */ + Scommi = "SCOMMI", + /** AzMon - Azure management Offering type */ + AzMon = "AzMon", + /** AUM - Azure management Offering type */ + AUM = "AUM", + /** AzureBackup - Azure management Offering type */ + AzureBackup = "AzureBackup", +} + +/** + * Azure management Offering type \ + * {@link KnownAzureManagementOfferingType} can be used interchangeably with AzureManagementOfferingType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **No**: No - Azure management Offering type \ + * **SCOMMI**: SCOMMI - Azure management Offering type \ + * **AzMon**: AzMon - Azure management Offering type \ + * **AUM**: AUM - Azure management Offering type \ + * **AzureBackup**: AzureBackup - Azure management Offering type + */ +export type AzureManagementOfferingType = string; + +/** Cloud Suitability for Azure. */ +export enum KnownCloudSuitability { + /** Unknown. Indicates missing data. */ + Unknown = "Unknown", + /** Not Suitable for Azure. */ + NotSuitable = "NotSuitable", + /** Suitable for Azure. */ + Suitable = "Suitable", + /** Conditionally Suitable for Azure. */ + ConditionallySuitable = "ConditionallySuitable", + /** Unknown Readiness for Azure. */ + ReadinessUnknown = "ReadinessUnknown", +} + +/** + * Cloud Suitability for Azure. \ + * {@link KnownCloudSuitability} can be used interchangeably with CloudSuitability, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown. Indicates missing data. \ + * **NotSuitable**: Not Suitable for Azure. \ + * **Suitable**: Suitable for Azure. \ + * **ConditionallySuitable**: Conditionally Suitable for Azure. \ + * **ReadinessUnknown**: Unknown Readiness for Azure. + */ +export type CloudSuitability = string; + +/** Azure AVS Suitability Detail */ +export enum KnownAzureAvsSuitabilityExplanation { + /** Suitability Unknown */ + Unknown = "Unknown", + /** Suitability Not applicable */ + NotApplicable = "NotApplicable", + /** Unsupported location for selected node */ + UnsupportedLocationForSelectedNode = "UnsupportedLocationForSelectedNode", + /** Internal error in recommendation */ + InternalErrorInRecommendation = "InternalErrorInRecommendation", + /** Unsupported location for selected external storage types */ + UnsupportedLocationForSelectedExternalStorageTypes = "UnsupportedLocationForSelectedExternalStorageTypes", +} + +/** + * Azure AVS Suitability Detail \ + * {@link KnownAzureAvsSuitabilityExplanation} can be used interchangeably with AzureAvsSuitabilityExplanation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Suitability Unknown \ + * **NotApplicable**: Suitability Not applicable \ + * **UnsupportedLocationForSelectedNode**: Unsupported location for selected node \ + * **InternalErrorInRecommendation**: Internal error in recommendation \ + * **UnsupportedLocationForSelectedExternalStorageTypes**: Unsupported location for selected external storage types + */ +export type AzureAvsSuitabilityExplanation = string; + +export function avsEstimatedNodeArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return avsEstimatedNodeDeserializer(item); + }); +} + +/** Details on the Estimated nodes for AVS Assessment. */ +export interface AvsEstimatedNode { + /** Total monthly cost for type and number of nodes. */ + monthlyPrice?: number; + /** Recommended SKU. */ + nodeType?: AzureAvsNodeType; + /** Number of nodes that will be needed. */ + nodeNumber?: number; + /** Predicted CPU utilization. */ + cpuUtilization?: number; + /** Predicted RAM utilization. */ + ramUtilization?: number; + /** Predicted storage utilization. */ + storageUtilization?: number; + /** Predicted total CPU cores across the set of nodes. */ + totalCpu?: number; + /** Predicted total RAM used in GB. */ + totalRam?: number; + /** Predicted total Storage used in GB. */ + totalStorage?: number; + /** Pricing model indicates what hour multiplier to use while estimating the Nodes cost. */ + pricingModel?: AzureReservedInstance; + /** FttRaidLevel recommended for Node. */ + fttRaidLevel?: FttAndRaidLevel; +} + +export function avsEstimatedNodeDeserializer(item: any): AvsEstimatedNode { + return { + monthlyPrice: item["monthlyPrice"], + nodeType: item["nodeType"], + nodeNumber: item["nodeNumber"], + cpuUtilization: item["cpuUtilization"], + ramUtilization: item["ramUtilization"], + storageUtilization: item["storageUtilization"], + totalCpu: item["totalCpu"], + totalRam: item["totalRam"], + totalStorage: item["totalStorage"], + pricingModel: item["pricingModel"], + fttRaidLevel: item["fttRaidLevel"], + }; +} + +/** Azure reserved Instance */ +export enum KnownAzureReservedInstance { + /** None Azure reserved Instance */ + None = "None", + /** RI1Year Azure reserved Instance */ + RI1Year = "RI1Year", + /** RI3Year Azure reserved Instance */ + RI3Year = "RI3Year", +} + +/** + * Azure reserved Instance \ + * {@link KnownAzureReservedInstance} can be used interchangeably with AzureReservedInstance, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: None Azure reserved Instance \ + * **RI1Year**: RI1Year Azure reserved Instance \ + * **RI3Year**: RI3Year Azure reserved Instance + */ +export type AzureReservedInstance = string; + +export function avsEstimatedExternalStorageArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return avsEstimatedExternalStorageDeserializer(item); + }); +} + +/** Details on the Estimated External Storage for AVS Assessment. */ +export interface AvsEstimatedExternalStorage { + /** Total monthly cost for type of storage. */ + monthlyPrice?: number; + /** Recommended External Storage. */ + storageType?: ExternalStorageType; + /** Predicted total Storage used in GB. */ + totalStorageInGB?: number; + /** Predicted storage utilization. */ + storageUtilization?: number; +} + +export function avsEstimatedExternalStorageDeserializer(item: any): AvsEstimatedExternalStorage { + return { + monthlyPrice: item["monthlyPrice"], + storageType: item["storageType"], + totalStorageInGB: item["totalStorageInGB"], + storageUtilization: item["storageUtilization"], + }; +} + +export function avsEstimatedNetworkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return avsEstimatedNetworkDeserializer(item); + }); +} + +/** Details on the Estimated Network Costs for AVS Assessment. */ +export interface AvsEstimatedNetwork { + /** Monthly cost for network type. */ + monthlyPrice?: number; + /** Recommended Network Sku. */ + networkType?: NetworkSkuType; +} + +export function avsEstimatedNetworkDeserializer(item: any): AvsEstimatedNetwork { + return { + monthlyPrice: item["monthlyPrice"], + networkType: item["networkType"], + }; +} + +/** Different network skus. */ +export enum KnownNetworkSkuType { + /** Indicates un-supported network SKU. */ + Unknown = "Unknown", + /** Indicates No network SKU. */ + None = "None", + /** Express Route network type with Ultra SKU. */ + ExpressRouteUltra = "ExpressRouteUltra", +} + +/** + * Different network skus. \ + * {@link KnownNetworkSkuType} can be used interchangeably with NetworkSkuType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Indicates un-supported network SKU. \ + * **None**: Indicates No network SKU. \ + * **ExpressRouteUltra**: Express Route network type with Ultra SKU. + */ +export type NetworkSkuType = string; + +/** The response of a AvsAssessmentV2Summary list operation. */ +export interface _AvsAssessmentV2SummaryListResult { + /** The AvsAssessmentV2Summary items on this page */ + value: AvsAssessmentV2Summary[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _avsAssessmentV2SummaryListResultDeserializer( + item: any, +): _AvsAssessmentV2SummaryListResult { + return { + value: avsAssessmentV2SummaryArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function avsAssessmentV2SummaryArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return avsAssessmentV2SummaryDeserializer(item); + }); +} + +/** AVS Assessment Summary REST resource. */ +export interface AvsGraphAssessmentOptions extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: AvsGraphAssessmentOptionsProperties; +} + +export function avsGraphAssessmentOptionsDeserializer(item: any): AvsGraphAssessmentOptions { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : avsGraphAssessmentOptionsPropertiesDeserializer(item["properties"]), + }; +} + +/** The properties of the assessment options. */ +export interface AvsGraphAssessmentOptionsProperties { + /** Gets or sets the edges. */ + edges: Record; +} + +export function avsGraphAssessmentOptionsPropertiesDeserializer( + item: any, +): AvsGraphAssessmentOptionsProperties { + return { + edges: avsAssessmentOptionsOutboundEdgeGroupRecordDeserializer(item["edges"]), + }; +} + +export function avsAssessmentOptionsOutboundEdgeGroupRecordDeserializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] + ? item[key] + : avsAssessmentOptionsOutboundEdgeGroupDeserializer(item[key]); + }); + return result; +} + +/** A class that represents the outbound edges from a given node. */ +export interface AvsAssessmentOptionsOutboundEdgeGroup { + /** Gets or sets the Azure Locations. */ + targetLocations: AzureLocation[]; + /** Gets or sets the Azure Currency. */ + currencies: AzureCurrency[]; + /** Gets or sets the Assessment Savings Options. */ + savingsOptions: SavingsOptions[]; + /** Gets or sets the Licensing Program. */ + licensingProgram: LicensingProgram[]; + /** Gets or sets the Avs External Storage Type. */ + avsExternalStorageTypes: ExternalStorageType[]; + /** Gets or sets the Azure Avs Node Type. */ + avsNodes: AzureAvsNodeType[]; + /** Gets or sets the Azure SQL service tiers. */ + failuresToTolerateAndRaidLevelValues: FttAndRaidLevel[]; +} + +export function avsAssessmentOptionsOutboundEdgeGroupDeserializer( + item: any, +): AvsAssessmentOptionsOutboundEdgeGroup { + return { + targetLocations: item["targetLocations"].map((p: any) => { + return p; + }), + currencies: item["currencies"].map((p: any) => { + return p; + }), + savingsOptions: item["savingsOptions"].map((p: any) => { + return p; + }), + licensingProgram: item["licensingProgram"].map((p: any) => { + return p; + }), + avsExternalStorageTypes: item["avsExternalStorageTypes"].map((p: any) => { + return p; + }), + avsNodes: item["avsNodes"].map((p: any) => { + return p; + }), + failuresToTolerateAndRaidLevelValues: item["failuresToTolerateAndRaidLevelValues"].map( + (p: any) => { + return p; + }, + ), + }; +} + +/** Location for Azure. */ +export enum KnownAzureLocation { + /** Unknown Location for Azure */ + Unknown = "Unknown", + /** EastAsia Location for Azure */ + EastAsia = "EastAsia", + /** SoutheastAsia Location for Azure */ + SoutheastAsia = "SoutheastAsia", + /** AustraliaEast Location for Azure */ + AustraliaEast = "AustraliaEast", + /** AustraliaSoutheast Location for Azure */ + AustraliaSoutheast = "AustraliaSoutheast", + /** BrazilSouth Location for Azure */ + BrazilSouth = "BrazilSouth", + /** CanadaCentral Location for Azure */ + CanadaCentral = "CanadaCentral", + /** CanadaEast Location for Azure */ + CanadaEast = "CanadaEast", + /** WestEurope Location for Azure */ + WestEurope = "WestEurope", + /** NorthEurope Location for Azure */ + NorthEurope = "NorthEurope", + /** CentralIndia Location for Azure */ + CentralIndia = "CentralIndia", + /** SouthIndia Location for Azure */ + SouthIndia = "SouthIndia", + /** WestIndia Location for Azure */ + WestIndia = "WestIndia", + /** JapanEast Location for Azure */ + JapanEast = "JapanEast", + /** JapanWest Location for Azure */ + JapanWest = "JapanWest", + /** KoreaCentral Location for Azure */ + KoreaCentral = "KoreaCentral", + /** KoreaSouth Location for Azure */ + KoreaSouth = "KoreaSouth", + /** UkWest Location for Azure */ + UkWest = "UkWest", + /** UkSouth Location for Azure */ + UkSouth = "UkSouth", + /** NorthCentralUs Location for Azure */ + NorthCentralUs = "NorthCentralUs", + /** EastUs Location for Azure */ + EastUs = "EastUs", + /** WestUs2 Location for Azure */ + WestUs2 = "WestUs2", + /** SouthCentralUs Location for Azure */ + SouthCentralUs = "SouthCentralUs", + /** CentralUs Location for Azure */ + CentralUs = "CentralUs", + /** EastUs2 Location for Azure */ + EastUs2 = "EastUs2", + /** WestUs Location for Azure */ + WestUs = "WestUs", + /** WestCentralUs Location for Azure */ + WestCentralUs = "WestCentralUs", + /** GermanyCentral Location for Azure */ + GermanyCentral = "GermanyCentral", + /** GermanyNortheast Location for Azure */ + GermanyNortheast = "GermanyNortheast", + /** ChinaNorth Location for Azure */ + ChinaNorth = "ChinaNorth", + /** ChinaEast Location for Azure */ + ChinaEast = "ChinaEast", + /** USGovArizona Location for Azure */ + USGovArizona = "USGovArizona", + /** USGovTexas Location for Azure */ + USGovTexas = "USGovTexas", + /** USGovIowa Location for Azure */ + USGovIowa = "USGovIowa", + /** USGovVirginia Location for Azure */ + USGovVirginia = "USGovVirginia", + /** USDoDCentral Location for Azure */ + USDoDCentral = "USDoDCentral", + /** USDoDEast Location for Azure */ + USDoDEast = "USDoDEast", + /** FranceCentral Location for Azure */ + FranceCentral = "FranceCentral", + /** AustraliaCentral Location for Azure */ + AustraliaCentral = "AustraliaCentral", + /** SouthAfricaNorth Location for Azure */ + SouthAfricaNorth = "SouthAfricaNorth", + /** FranceSouth Location for Azure */ + FranceSouth = "FranceSouth", + /** AustraliaCentral2 Location for Azure */ + AustraliaCentral2 = "AustraliaCentral2", + /** SouthAfricaWest Location for Azure */ + SouthAfricaWest = "SouthAfricaWest", + /** GermanyNorth Location for Azure */ + GermanyNorth = "GermanyNorth", + /** GermanyWestCentral Location for Azure */ + GermanyWestCentral = "GermanyWestCentral", + /** NorwayEast Location for Azure */ + NorwayEast = "NorwayEast", + /** NorwayWest Location for Azure */ + NorwayWest = "NorwayWest", + /** ChinaEast2 Location for Azure */ + ChinaEast2 = "ChinaEast2", + /** ChinaNorth2 Location for Azure */ + ChinaNorth2 = "ChinaNorth2", + /** SwitzerlandNorth Location for Azure */ + SwitzerlandNorth = "SwitzerlandNorth", + /** SwitzerlandWest Location for Azure */ + SwitzerlandWest = "SwitzerlandWest", + /** UAENorth Location for Azure */ + UAENorth = "UAENorth", + /** UAECentral Location for Azure */ + UAECentral = "UAECentral", + /** UsNatEast Location for Azure */ + UsNatEast = "UsNatEast", + /** UsNatWest Location for Azure */ + UsNatWest = "UsNatWest", + /** UsSecEast Location for Azure */ + UsSecEast = "UsSecEast", + /** UsSecCentral Location for Azure */ + UsSecCentral = "UsSecCentral", + /** UsSecWest Location for Azure */ + UsSecWest = "UsSecWest", + /** SwedenCentral Location for Azure */ + SwedenCentral = "SwedenCentral", + /** QatarCentral Location for Azure */ + QatarCentral = "QatarCentral", + /** JioIndiaWest Location for Azure */ + JioIndiaWest = "JioIndiaWest", + /** ItalyNorth Location for Azure */ + ItalyNorth = "ItalyNorth", + /** PolandCentral Location for Azure */ + PolandCentral = "PolandCentral", + /** IsraelCentral Location for Azure */ + IsraelCentral = "IsraelCentral", + /** MexicoCentral Location for Azure */ + MexicoCentral = "MexicoCentral", + /** NewZealandNorth Location for Azure */ + NewZealandNorth = "NewZealandNorth", + /** SpainCentral Location for Azure */ + SpainCentral = "SpainCentral", +} + +/** + * Location for Azure. \ + * {@link KnownAzureLocation} can be used interchangeably with AzureLocation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown Location for Azure \ + * **EastAsia**: EastAsia Location for Azure \ + * **SoutheastAsia**: SoutheastAsia Location for Azure \ + * **AustraliaEast**: AustraliaEast Location for Azure \ + * **AustraliaSoutheast**: AustraliaSoutheast Location for Azure \ + * **BrazilSouth**: BrazilSouth Location for Azure \ + * **CanadaCentral**: CanadaCentral Location for Azure \ + * **CanadaEast**: CanadaEast Location for Azure \ + * **WestEurope**: WestEurope Location for Azure \ + * **NorthEurope**: NorthEurope Location for Azure \ + * **CentralIndia**: CentralIndia Location for Azure \ + * **SouthIndia**: SouthIndia Location for Azure \ + * **WestIndia**: WestIndia Location for Azure \ + * **JapanEast**: JapanEast Location for Azure \ + * **JapanWest**: JapanWest Location for Azure \ + * **KoreaCentral**: KoreaCentral Location for Azure \ + * **KoreaSouth**: KoreaSouth Location for Azure \ + * **UkWest**: UkWest Location for Azure \ + * **UkSouth**: UkSouth Location for Azure \ + * **NorthCentralUs**: NorthCentralUs Location for Azure \ + * **EastUs**: EastUs Location for Azure \ + * **WestUs2**: WestUs2 Location for Azure \ + * **SouthCentralUs**: SouthCentralUs Location for Azure \ + * **CentralUs**: CentralUs Location for Azure \ + * **EastUs2**: EastUs2 Location for Azure \ + * **WestUs**: WestUs Location for Azure \ + * **WestCentralUs**: WestCentralUs Location for Azure \ + * **GermanyCentral**: GermanyCentral Location for Azure \ + * **GermanyNortheast**: GermanyNortheast Location for Azure \ + * **ChinaNorth**: ChinaNorth Location for Azure \ + * **ChinaEast**: ChinaEast Location for Azure \ + * **USGovArizona**: USGovArizona Location for Azure \ + * **USGovTexas**: USGovTexas Location for Azure \ + * **USGovIowa**: USGovIowa Location for Azure \ + * **USGovVirginia**: USGovVirginia Location for Azure \ + * **USDoDCentral**: USDoDCentral Location for Azure \ + * **USDoDEast**: USDoDEast Location for Azure \ + * **FranceCentral**: FranceCentral Location for Azure \ + * **AustraliaCentral**: AustraliaCentral Location for Azure \ + * **SouthAfricaNorth**: SouthAfricaNorth Location for Azure \ + * **FranceSouth**: FranceSouth Location for Azure \ + * **AustraliaCentral2**: AustraliaCentral2 Location for Azure \ + * **SouthAfricaWest**: SouthAfricaWest Location for Azure \ + * **GermanyNorth**: GermanyNorth Location for Azure \ + * **GermanyWestCentral**: GermanyWestCentral Location for Azure \ + * **NorwayEast**: NorwayEast Location for Azure \ + * **NorwayWest**: NorwayWest Location for Azure \ + * **ChinaEast2**: ChinaEast2 Location for Azure \ + * **ChinaNorth2**: ChinaNorth2 Location for Azure \ + * **SwitzerlandNorth**: SwitzerlandNorth Location for Azure \ + * **SwitzerlandWest**: SwitzerlandWest Location for Azure \ + * **UAENorth**: UAENorth Location for Azure \ + * **UAECentral**: UAECentral Location for Azure \ + * **UsNatEast**: UsNatEast Location for Azure \ + * **UsNatWest**: UsNatWest Location for Azure \ + * **UsSecEast**: UsSecEast Location for Azure \ + * **UsSecCentral**: UsSecCentral Location for Azure \ + * **UsSecWest**: UsSecWest Location for Azure \ + * **SwedenCentral**: SwedenCentral Location for Azure \ + * **QatarCentral**: QatarCentral Location for Azure \ + * **JioIndiaWest**: JioIndiaWest Location for Azure \ + * **ItalyNorth**: ItalyNorth Location for Azure \ + * **PolandCentral**: PolandCentral Location for Azure \ + * **IsraelCentral**: IsraelCentral Location for Azure \ + * **MexicoCentral**: MexicoCentral Location for Azure \ + * **NewZealandNorth**: NewZealandNorth Location for Azure \ + * **SpainCentral**: SpainCentral Location for Azure + */ +export type AzureLocation = string; + +/** The response of a AvsGraphAssessmentOptions list operation. */ +export interface _AvsGraphAssessmentOptionsListResult { + /** The AvsGraphAssessmentOptions items on this page */ + value: AvsGraphAssessmentOptions[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _avsGraphAssessmentOptionsListResultDeserializer( + item: any, +): _AvsGraphAssessmentOptionsListResult { + return { + value: avsGraphAssessmentOptionsArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function avsGraphAssessmentOptionsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return avsGraphAssessmentOptionsDeserializer(item); + }); +} + +/** API Versions for Avs Assessment Resource. */ +export enum KnownAvsApiVersions { + /** 2024-03-03-preview API Version. */ + V20240303Preview = "2024-03-03-preview", +} diff --git a/sdk/migrate/arm-migrate/src/models/parameters.ts b/sdk/migrate/arm-migrate/src/models/parameters.ts deleted file mode 100644 index e0d84c00381a..000000000000 --- a/sdk/migrate/arm-migrate/src/models/parameters.ts +++ /dev/null @@ -1,283 +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 { - OperationParameter, - OperationURLParameter, - OperationQueryParameter -} from "@azure/core-client"; -import { - Project as ProjectMapper, - Group as GroupMapper, - UpdateGroupBody as UpdateGroupBodyMapper, - Assessment as AssessmentMapper, - HyperVCollector as HyperVCollectorMapper, - ServerCollector as ServerCollectorMapper, - VMwareCollector as VMwareCollectorMapper, - ImportCollector as ImportCollectorMapper, - PrivateEndpointConnection as PrivateEndpointConnectionMapper -} from "../models/mappers.js"; - -export const accept: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String" - } - } -}; - -export const $host: OperationURLParameter = { - parameterPath: "$host", - mapper: { - serializedName: "$host", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - serializedName: "subscriptionId", - required: true, - type: { - name: "String" - } - } -}; - -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2019-10-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - serializedName: "resourceGroupName", - required: true, - type: { - name: "String" - } - } -}; - -export const projectName: OperationURLParameter = { - parameterPath: "projectName", - mapper: { - serializedName: "projectName", - required: true, - type: { - name: "String" - } - } -}; - -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String" - } - } -}; - -export const project: OperationParameter = { - parameterPath: ["options", "project"], - mapper: ProjectMapper -}; - -export const assessmentOptionsName: OperationURLParameter = { - parameterPath: "assessmentOptionsName", - mapper: { - serializedName: "assessmentOptionsName", - required: true, - type: { - name: "String" - } - } -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - -export const machineName: OperationURLParameter = { - parameterPath: "machineName", - mapper: { - serializedName: "machineName", - required: true, - type: { - name: "String" - } - } -}; - -export const groupName: OperationURLParameter = { - parameterPath: "groupName", - mapper: { - serializedName: "groupName", - required: true, - type: { - name: "String" - } - } -}; - -export const group: OperationParameter = { - parameterPath: ["options", "group"], - mapper: GroupMapper -}; - -export const groupUpdateProperties: OperationParameter = { - parameterPath: ["options", "groupUpdateProperties"], - mapper: UpdateGroupBodyMapper -}; - -export const assessmentName: OperationURLParameter = { - parameterPath: "assessmentName", - mapper: { - serializedName: "assessmentName", - required: true, - type: { - name: "String" - } - } -}; - -export const assessment: OperationParameter = { - parameterPath: ["options", "assessment"], - mapper: AssessmentMapper -}; - -export const assessedMachineName: OperationURLParameter = { - parameterPath: "assessedMachineName", - mapper: { - serializedName: "assessedMachineName", - required: true, - type: { - name: "String" - } - } -}; - -export const hyperVCollectorName: OperationURLParameter = { - parameterPath: "hyperVCollectorName", - mapper: { - serializedName: "hyperVCollectorName", - required: true, - type: { - name: "String" - } - } -}; - -export const collectorBody: OperationParameter = { - parameterPath: ["options", "collectorBody"], - mapper: HyperVCollectorMapper -}; - -export const serverCollectorName: OperationURLParameter = { - parameterPath: "serverCollectorName", - mapper: { - serializedName: "serverCollectorName", - required: true, - type: { - name: "String" - } - } -}; - -export const collectorBody1: OperationParameter = { - parameterPath: ["options", "collectorBody"], - mapper: ServerCollectorMapper -}; - -export const vmWareCollectorName: OperationURLParameter = { - parameterPath: "vmWareCollectorName", - mapper: { - serializedName: "vmWareCollectorName", - required: true, - type: { - name: "String" - } - } -}; - -export const collectorBody2: OperationParameter = { - parameterPath: ["options", "collectorBody"], - mapper: VMwareCollectorMapper -}; - -export const importCollectorName: OperationURLParameter = { - parameterPath: "importCollectorName", - mapper: { - serializedName: "importCollectorName", - required: true, - type: { - name: "String" - } - } -}; - -export const collectorBody3: OperationParameter = { - parameterPath: ["options", "collectorBody"], - mapper: ImportCollectorMapper -}; - -export const privateEndpointConnectionName: OperationURLParameter = { - parameterPath: "privateEndpointConnectionName", - mapper: { - serializedName: "privateEndpointConnectionName", - required: true, - type: { - name: "String" - } - } -}; - -export const privateEndpointConnectionBody: OperationParameter = { - parameterPath: ["options", "privateEndpointConnectionBody"], - mapper: PrivateEndpointConnectionMapper -}; - -export const privateLinkResourceName: OperationURLParameter = { - parameterPath: "privateLinkResourceName", - mapper: { - serializedName: "privateLinkResourceName", - required: true, - type: { - name: "String" - } - } -}; diff --git a/sdk/migrate/arm-migrate/src/operations/assessedMachines.ts b/sdk/migrate/arm-migrate/src/operations/assessedMachines.ts deleted file mode 100644 index 2c62acef6546..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/assessedMachines.ts +++ /dev/null @@ -1,314 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { AssessedMachines } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - AssessedMachine, - AssessedMachinesListByAssessmentNextOptionalParams, - AssessedMachinesListByAssessmentOptionalParams, - AssessedMachinesListByAssessmentResponse, - AssessedMachinesGetOptionalParams, - AssessedMachinesGetResponse, - AssessedMachinesListByAssessmentNextResponse -} from "../models/index.js"; - -/// -/** Class containing AssessedMachines operations. */ -export class AssessedMachinesImpl implements AssessedMachines { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class AssessedMachines class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get list of machines that assessed as part of the specified assessment. Returns a json array of - * objects of type 'assessedMachine' as specified in the Models section. - * - * Whenever an assessment is created or updated, it goes under computation. During this phase, the - * 'status' field of Assessment object reports 'Computing'. - * During the period when the assessment is under computation, the list of assessed machines is empty - * and no assessed machines are returned by this call. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param options The options parameters. - */ - public listByAssessment( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessedMachinesListByAssessmentOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByAssessmentPagingAll( - resourceGroupName, - projectName, - groupName, - assessmentName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByAssessmentPagingPage( - resourceGroupName, - projectName, - groupName, - assessmentName, - options, - settings - ); - } - }; - } - - private async *listByAssessmentPagingPage( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessedMachinesListByAssessmentOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AssessedMachinesListByAssessmentResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByAssessment( - resourceGroupName, - projectName, - groupName, - assessmentName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByAssessmentNext( - resourceGroupName, - projectName, - groupName, - assessmentName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByAssessmentPagingAll( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessedMachinesListByAssessmentOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByAssessmentPagingPage( - resourceGroupName, - projectName, - groupName, - assessmentName, - options - )) { - yield* page; - } - } - - /** - * Get list of machines that assessed as part of the specified assessment. Returns a json array of - * objects of type 'assessedMachine' as specified in the Models section. - * - * Whenever an assessment is created or updated, it goes under computation. During this phase, the - * 'status' field of Assessment object reports 'Computing'. - * During the period when the assessment is under computation, the list of assessed machines is empty - * and no assessed machines are returned by this call. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param options The options parameters. - */ - private _listByAssessment( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessedMachinesListByAssessmentOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, groupName, assessmentName, options }, - listByAssessmentOperationSpec - ); - } - - /** - * Get an assessed machine with its size & cost estimate that was evaluated in the specified - * assessment. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param assessedMachineName Unique name of an assessed machine evaluated as part of an assessment. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - assessedMachineName: string, - options?: AssessedMachinesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - projectName, - groupName, - assessmentName, - assessedMachineName, - options - }, - getOperationSpec - ); - } - - /** - * ListByAssessmentNext - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param nextLink The nextLink from the previous successful call to the ListByAssessment method. - * @param options The options parameters. - */ - private _listByAssessmentNext( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - nextLink: string, - options?: AssessedMachinesListByAssessmentNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - projectName, - groupName, - assessmentName, - nextLink, - options - }, - listByAssessmentNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByAssessmentOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}/assessments/{assessmentName}/assessedMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssessedMachineResultList, - headersMapper: Mappers.AssessedMachinesListByAssessmentHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.groupName, - Parameters.assessmentName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}/assessments/{assessmentName}/assessedMachines/{assessedMachineName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssessedMachine, - headersMapper: Mappers.AssessedMachinesGetHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.groupName, - Parameters.assessmentName, - Parameters.assessedMachineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByAssessmentNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssessedMachineResultList, - headersMapper: Mappers.AssessedMachinesListByAssessmentNextHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.nextLink, - Parameters.groupName, - Parameters.assessmentName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operations/assessments.ts b/sdk/migrate/arm-migrate/src/operations/assessments.ts deleted file mode 100644 index 6b995f1c3fdd..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/assessments.ts +++ /dev/null @@ -1,485 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Assessments } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - Assessment, - AssessmentsListByGroupOptionalParams, - AssessmentsListByGroupResponse, - AssessmentsListByProjectOptionalParams, - AssessmentsListByProjectResponse, - AssessmentsGetOptionalParams, - AssessmentsGetResponse, - AssessmentsCreateOptionalParams, - AssessmentsCreateResponse, - AssessmentsDeleteOptionalParams, - AssessmentsDeleteResponse, - AssessmentsGetReportDownloadUrlOptionalParams, - AssessmentsGetReportDownloadUrlResponse -} from "../models/index.js"; - -/// -/** Class containing Assessments operations. */ -export class AssessmentsImpl implements Assessments { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class Assessments class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get all assessments created for the specified group. - * - * Returns a json array of objects of type 'assessment' as specified in Models section. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param options The options parameters. - */ - public listByGroup( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: AssessmentsListByGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByGroupPagingAll( - resourceGroupName, - projectName, - groupName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByGroupPagingPage( - resourceGroupName, - projectName, - groupName, - options, - settings - ); - } - }; - } - - private async *listByGroupPagingPage( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: AssessmentsListByGroupOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: AssessmentsListByGroupResponse; - result = await this._listByGroup( - resourceGroupName, - projectName, - groupName, - options - ); - yield result.value || []; - } - - private async *listByGroupPagingAll( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: AssessmentsListByGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByGroupPagingPage( - resourceGroupName, - projectName, - groupName, - options - )) { - yield* page; - } - } - - /** - * Get all assessments created in the project. - * - * Returns a json array of objects of type 'assessment' as specified in Models section. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - public listByProject( - resourceGroupName: string, - projectName: string, - options?: AssessmentsListByProjectOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProjectPagingAll( - resourceGroupName, - projectName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProjectPagingPage( - resourceGroupName, - projectName, - options, - settings - ); - } - }; - } - - private async *listByProjectPagingPage( - resourceGroupName: string, - projectName: string, - options?: AssessmentsListByProjectOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: AssessmentsListByProjectResponse; - result = await this._listByProject(resourceGroupName, projectName, options); - yield result.value || []; - } - - private async *listByProjectPagingAll( - resourceGroupName: string, - projectName: string, - options?: AssessmentsListByProjectOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProjectPagingPage( - resourceGroupName, - projectName, - options - )) { - yield* page; - } - } - - /** - * Get all assessments created for the specified group. - * - * Returns a json array of objects of type 'assessment' as specified in Models section. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param options The options parameters. - */ - private _listByGroup( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: AssessmentsListByGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, groupName, options }, - listByGroupOperationSpec - ); - } - - /** - * Get all assessments created in the project. - * - * Returns a json array of objects of type 'assessment' as specified in Models section. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - private _listByProject( - resourceGroupName: string, - projectName: string, - options?: AssessmentsListByProjectOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - listByProjectOperationSpec - ); - } - - /** - * Get an existing assessment with the specified name. Returns a json object of type 'assessment' as - * specified in Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessmentsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, groupName, assessmentName, options }, - getOperationSpec - ); - } - - /** - * Create a new assessment with the given name and the specified settings. Since name of an assessment - * in a project is a unique identifier, if an assessment with the name provided already exists, then - * the existing assessment is updated. - * - * Any PUT operation, resulting in either create or update on an assessment, will cause the assessment - * to go in a "InProgress" state. This will be indicated by the field 'computationState' on the - * Assessment object. During this time no other PUT operation will be allowed on that assessment - * object, nor will a Delete operation. Once the computation for the assessment is complete, the field - * 'computationState' will be updated to 'Ready', and then other PUT or DELETE operations can happen on - * the assessment. - * - * When assessment is under computation, any PUT will lead to a 400 - Bad Request error. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessmentsCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, groupName, assessmentName, options }, - createOperationSpec - ); - } - - /** - * Delete an assessment from the project. The machines remain in the assessment. Deleting a - * non-existent assessment results in a no-operation. - * - * When an assessment is under computation, as indicated by the 'computationState' field, it cannot be - * deleted. Any such attempt will return a 400 - Bad Request. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessmentsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, groupName, assessmentName, options }, - deleteOperationSpec - ); - } - - /** - * Get the URL for downloading the assessment in a report format. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param options The options parameters. - */ - getReportDownloadUrl( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessmentsGetReportDownloadUrlOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, groupName, assessmentName, options }, - getReportDownloadUrlOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}/assessments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssessmentResultList, - headersMapper: Mappers.AssessmentsListByGroupHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.groupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByProjectOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/assessments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssessmentResultList, - headersMapper: Mappers.AssessmentsListByProjectHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}/assessments/{assessmentName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Assessment, - headersMapper: Mappers.AssessmentsGetHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.groupName, - Parameters.assessmentName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}/assessments/{assessmentName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Assessment, - headersMapper: Mappers.AssessmentsCreateHeaders - }, - 201: { - bodyMapper: Mappers.Assessment, - headersMapper: Mappers.AssessmentsCreateHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.assessment, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.groupName, - Parameters.assessmentName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}/assessments/{assessmentName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.AssessmentsDeleteHeaders - }, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.groupName, - Parameters.assessmentName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getReportDownloadUrlOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}/assessments/{assessmentName}/downloadUrl", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.DownloadUrl, - headersMapper: Mappers.AssessmentsGetReportDownloadUrlHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.groupName, - Parameters.assessmentName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operations/groups.ts b/sdk/migrate/arm-migrate/src/operations/groups.ts deleted file mode 100644 index 749e539f31ba..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/groups.ts +++ /dev/null @@ -1,338 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Groups } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - Group, - GroupsListByProjectOptionalParams, - GroupsListByProjectResponse, - GroupsGetOptionalParams, - GroupsGetResponse, - GroupsCreateOptionalParams, - GroupsCreateResponse, - GroupsDeleteOptionalParams, - GroupsDeleteResponse, - GroupsUpdateMachinesOptionalParams, - GroupsUpdateMachinesResponse -} from "../models/index.js"; - -/// -/** Class containing Groups operations. */ -export class GroupsImpl implements Groups { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class Groups class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get all groups created in the project. Returns a json array of objects of type 'group' as specified - * in the Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - public listByProject( - resourceGroupName: string, - projectName: string, - options?: GroupsListByProjectOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProjectPagingAll( - resourceGroupName, - projectName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProjectPagingPage( - resourceGroupName, - projectName, - options, - settings - ); - } - }; - } - - private async *listByProjectPagingPage( - resourceGroupName: string, - projectName: string, - options?: GroupsListByProjectOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: GroupsListByProjectResponse; - result = await this._listByProject(resourceGroupName, projectName, options); - yield result.value || []; - } - - private async *listByProjectPagingAll( - resourceGroupName: string, - projectName: string, - options?: GroupsListByProjectOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProjectPagingPage( - resourceGroupName, - projectName, - options - )) { - yield* page; - } - } - - /** - * Get all groups created in the project. Returns a json array of objects of type 'group' as specified - * in the Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - private _listByProject( - resourceGroupName: string, - projectName: string, - options?: GroupsListByProjectOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - listByProjectOperationSpec - ); - } - - /** - * Get information related to a specific group in the project. Returns a json object of type 'group' as - * specified in the models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: GroupsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, groupName, options }, - getOperationSpec - ); - } - - /** - * Create a new group by sending a json object of type 'group' as given in Models section as part of - * the Request Body. The group name in a project is unique. - * - * This operation is Idempotent. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: GroupsCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, groupName, options }, - createOperationSpec - ); - } - - /** - * Delete the group from the project. The machines remain in the project. Deleting a non-existent group - * results in a no-operation. - * - * A group is an aggregation mechanism for machines in a project. Therefore, deleting group does not - * delete machines in it. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: GroupsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, groupName, options }, - deleteOperationSpec - ); - } - - /** - * Update machines in group by adding or removing machines. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param options The options parameters. - */ - updateMachines( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: GroupsUpdateMachinesOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, groupName, options }, - updateMachinesOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProjectOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupResultList, - headersMapper: Mappers.GroupsListByProjectHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Group, - headersMapper: Mappers.GroupsGetHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.groupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Group, - headersMapper: Mappers.GroupsCreateHeaders - }, - 201: { - bodyMapper: Mappers.Group, - headersMapper: Mappers.GroupsCreateHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.group, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.groupName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.GroupsDeleteHeaders - }, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.groupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateMachinesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/groups/{groupName}/updateMachines", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.Group, - headersMapper: Mappers.GroupsUpdateMachinesHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.groupUpdateProperties, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.groupName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operations/hyperVCollectors.ts b/sdk/migrate/arm-migrate/src/operations/hyperVCollectors.ts deleted file mode 100644 index a521bff21d35..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/hyperVCollectors.ts +++ /dev/null @@ -1,279 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { HyperVCollectors } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - HyperVCollector, - HyperVCollectorsListByProjectOptionalParams, - HyperVCollectorsListByProjectResponse, - HyperVCollectorsGetOptionalParams, - HyperVCollectorsGetResponse, - HyperVCollectorsCreateOptionalParams, - HyperVCollectorsCreateResponse, - HyperVCollectorsDeleteOptionalParams, - HyperVCollectorsDeleteResponse -} from "../models/index.js"; - -/// -/** Class containing HyperVCollectors operations. */ -export class HyperVCollectorsImpl implements HyperVCollectors { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class HyperVCollectors class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get a list of Hyper-V collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - public listByProject( - resourceGroupName: string, - projectName: string, - options?: HyperVCollectorsListByProjectOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProjectPagingAll( - resourceGroupName, - projectName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProjectPagingPage( - resourceGroupName, - projectName, - options, - settings - ); - } - }; - } - - private async *listByProjectPagingPage( - resourceGroupName: string, - projectName: string, - options?: HyperVCollectorsListByProjectOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: HyperVCollectorsListByProjectResponse; - result = await this._listByProject(resourceGroupName, projectName, options); - yield result.value || []; - } - - private async *listByProjectPagingAll( - resourceGroupName: string, - projectName: string, - options?: HyperVCollectorsListByProjectOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProjectPagingPage( - resourceGroupName, - projectName, - options - )) { - yield* page; - } - } - - /** - * Get a list of Hyper-V collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - private _listByProject( - resourceGroupName: string, - projectName: string, - options?: HyperVCollectorsListByProjectOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - listByProjectOperationSpec - ); - } - - /** - * Get a Hyper-V collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param hyperVCollectorName Unique name of a Hyper-V collector within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - hyperVCollectorName: string, - options?: HyperVCollectorsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, hyperVCollectorName, options }, - getOperationSpec - ); - } - - /** - * Create or Update Hyper-V collector - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param hyperVCollectorName Unique name of a Hyper-V collector within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - hyperVCollectorName: string, - options?: HyperVCollectorsCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, hyperVCollectorName, options }, - createOperationSpec - ); - } - - /** - * Delete a Hyper-V collector from the project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param hyperVCollectorName Unique name of a Hyper-V collector within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - hyperVCollectorName: string, - options?: HyperVCollectorsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, hyperVCollectorName, options }, - deleteOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProjectOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/hypervcollectors", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HyperVCollectorList, - headersMapper: Mappers.HyperVCollectorsListByProjectHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/hypervcollectors/{hyperVCollectorName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HyperVCollector, - headersMapper: Mappers.HyperVCollectorsGetHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.hyperVCollectorName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/hypervcollectors/{hyperVCollectorName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.HyperVCollector, - headersMapper: Mappers.HyperVCollectorsCreateHeaders - }, - 201: { - bodyMapper: Mappers.HyperVCollector, - headersMapper: Mappers.HyperVCollectorsCreateHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.collectorBody, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.hyperVCollectorName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/hypervcollectors/{hyperVCollectorName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.HyperVCollectorsDeleteHeaders - }, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.hyperVCollectorName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operations/importCollectors.ts b/sdk/migrate/arm-migrate/src/operations/importCollectors.ts deleted file mode 100644 index e0ed6db44002..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/importCollectors.ts +++ /dev/null @@ -1,279 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { ImportCollectors } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - ImportCollector, - ImportCollectorsListByProjectOptionalParams, - ImportCollectorsListByProjectResponse, - ImportCollectorsGetOptionalParams, - ImportCollectorsGetResponse, - ImportCollectorsCreateOptionalParams, - ImportCollectorsCreateResponse, - ImportCollectorsDeleteOptionalParams, - ImportCollectorsDeleteResponse -} from "../models/index.js"; - -/// -/** Class containing ImportCollectors operations. */ -export class ImportCollectorsImpl implements ImportCollectors { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class ImportCollectors class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get a list of Import collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - public listByProject( - resourceGroupName: string, - projectName: string, - options?: ImportCollectorsListByProjectOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProjectPagingAll( - resourceGroupName, - projectName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProjectPagingPage( - resourceGroupName, - projectName, - options, - settings - ); - } - }; - } - - private async *listByProjectPagingPage( - resourceGroupName: string, - projectName: string, - options?: ImportCollectorsListByProjectOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ImportCollectorsListByProjectResponse; - result = await this._listByProject(resourceGroupName, projectName, options); - yield result.value || []; - } - - private async *listByProjectPagingAll( - resourceGroupName: string, - projectName: string, - options?: ImportCollectorsListByProjectOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProjectPagingPage( - resourceGroupName, - projectName, - options - )) { - yield* page; - } - } - - /** - * Get a list of Import collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - private _listByProject( - resourceGroupName: string, - projectName: string, - options?: ImportCollectorsListByProjectOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - listByProjectOperationSpec - ); - } - - /** - * Get a Import collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param importCollectorName Unique name of a Import collector within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - importCollectorName: string, - options?: ImportCollectorsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, importCollectorName, options }, - getOperationSpec - ); - } - - /** - * Create or Update Import collector - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param importCollectorName Unique name of a Import collector within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - importCollectorName: string, - options?: ImportCollectorsCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, importCollectorName, options }, - createOperationSpec - ); - } - - /** - * Delete a Import collector from the project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param importCollectorName Unique name of a Import collector within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - importCollectorName: string, - options?: ImportCollectorsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, importCollectorName, options }, - deleteOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProjectOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/importcollectors", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ImportCollectorList, - headersMapper: Mappers.ImportCollectorsListByProjectHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/importcollectors/{importCollectorName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ImportCollector, - headersMapper: Mappers.ImportCollectorsGetHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.importCollectorName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/importcollectors/{importCollectorName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ImportCollector, - headersMapper: Mappers.ImportCollectorsCreateHeaders - }, - 201: { - bodyMapper: Mappers.ImportCollector, - headersMapper: Mappers.ImportCollectorsCreateHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.collectorBody3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.importCollectorName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/importcollectors/{importCollectorName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.ImportCollectorsDeleteHeaders - }, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.importCollectorName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operations/index.ts b/sdk/migrate/arm-migrate/src/operations/index.ts deleted file mode 100644 index b38b4d4c15e0..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/index.ts +++ /dev/null @@ -1,20 +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 * from "./projects.js"; -export * from "./machines.js"; -export * from "./groups.js"; -export * from "./assessments.js"; -export * from "./assessedMachines.js"; -export * from "./hyperVCollectors.js"; -export * from "./serverCollectors.js"; -export * from "./vMwareCollectors.js"; -export * from "./importCollectors.js"; -export * from "./privateEndpointConnectionOperations.js"; -export * from "./privateLinkResourceOperations.js"; -export * from "./operations.js"; diff --git a/sdk/migrate/arm-migrate/src/operations/machines.ts b/sdk/migrate/arm-migrate/src/operations/machines.ts deleted file mode 100644 index ee2eb4339dfe..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/machines.ts +++ /dev/null @@ -1,252 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Machines } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - Machine, - MachinesListByProjectNextOptionalParams, - MachinesListByProjectOptionalParams, - MachinesListByProjectResponse, - MachinesGetOptionalParams, - MachinesGetResponse, - MachinesListByProjectNextResponse -} from "../models/index.js"; - -/// -/** Class containing Machines operations. */ -export class MachinesImpl implements Machines { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class Machines class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get data of all the machines available in the project. Returns a json array of objects of type - * 'machine' defined in Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - public listByProject( - resourceGroupName: string, - projectName: string, - options?: MachinesListByProjectOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProjectPagingAll( - resourceGroupName, - projectName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProjectPagingPage( - resourceGroupName, - projectName, - options, - settings - ); - } - }; - } - - private async *listByProjectPagingPage( - resourceGroupName: string, - projectName: string, - options?: MachinesListByProjectOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: MachinesListByProjectResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProject( - resourceGroupName, - projectName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProjectNext( - resourceGroupName, - projectName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProjectPagingAll( - resourceGroupName: string, - projectName: string, - options?: MachinesListByProjectOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProjectPagingPage( - resourceGroupName, - projectName, - options - )) { - yield* page; - } - } - - /** - * Get data of all the machines available in the project. Returns a json array of objects of type - * 'machine' defined in Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - private _listByProject( - resourceGroupName: string, - projectName: string, - options?: MachinesListByProjectOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - listByProjectOperationSpec - ); - } - - /** - * Get the machine with the specified name. Returns a json object of type 'machine' defined in Models - * section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param machineName Unique name of a machine in private datacenter. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - machineName: string, - options?: MachinesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, machineName, options }, - getOperationSpec - ); - } - - /** - * ListByProjectNext - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param nextLink The nextLink from the previous successful call to the ListByProject method. - * @param options The options parameters. - */ - private _listByProjectNext( - resourceGroupName: string, - projectName: string, - nextLink: string, - options?: MachinesListByProjectNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, nextLink, options }, - listByProjectNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProjectOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/machines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MachineResultList, - headersMapper: Mappers.MachinesListByProjectHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/machines/{machineName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Machine, - headersMapper: Mappers.MachinesGetHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.machineName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByProjectNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MachineResultList, - headersMapper: Mappers.MachinesListByProjectNextHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operations/operations.ts b/sdk/migrate/arm-migrate/src/operations/operations.ts deleted file mode 100644 index b033bb8a9521..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/operations.ts +++ /dev/null @@ -1,99 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Operations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - Operation, - OperationsListOptionalParams, - OperationsListResponse -} from "../models/index.js"; - -/// -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get a list of REST API supported by Microsoft.Migrate provider. - * @param options The options parameters. - */ - public list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: OperationsListOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: OperationsListResponse; - result = await this._list(options); - yield result.value || []; - } - - private async *listPagingAll( - options?: OperationsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of REST API supported by Microsoft.Migrate provider. - * @param options The options parameters. - */ - private _list( - options?: OperationsListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.Migrate/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationResultList - } - }, - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operations/privateEndpointConnectionOperations.ts b/sdk/migrate/arm-migrate/src/operations/privateEndpointConnectionOperations.ts deleted file mode 100644 index ad71cbb6fb44..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/privateEndpointConnectionOperations.ts +++ /dev/null @@ -1,233 +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 { PrivateEndpointConnectionOperations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - PrivateEndpointConnectionListByProjectOptionalParams, - PrivateEndpointConnectionListByProjectResponse, - PrivateEndpointConnectionGetOptionalParams, - PrivateEndpointConnectionGetResponse, - PrivateEndpointConnectionUpdateOptionalParams, - PrivateEndpointConnectionUpdateResponse, - PrivateEndpointConnectionDeleteOptionalParams, - PrivateEndpointConnectionDeleteResponse -} from "../models/index.js"; - -/** Class containing PrivateEndpointConnectionOperations operations. */ -export class PrivateEndpointConnectionOperationsImpl - implements PrivateEndpointConnectionOperations { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class PrivateEndpointConnectionOperations class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get all private endpoint connections in the project. Returns a json array of objects of type - * 'privateEndpointConnections' as specified in the Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listByProject( - resourceGroupName: string, - projectName: string, - options?: PrivateEndpointConnectionListByProjectOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - listByProjectOperationSpec - ); - } - - /** - * Get information related to a specific private endpoint connection in the project. Returns a json - * object of type 'privateEndpointConnections' as specified in the models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param privateEndpointConnectionName Unique name of a private endpoint connection within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - projectName, - privateEndpointConnectionName, - options - }, - getOperationSpec - ); - } - - /** - * Update a specific private endpoint connection in the project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param privateEndpointConnectionName Unique name of a private endpoint connection within a project. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - projectName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - projectName, - privateEndpointConnectionName, - options - }, - updateOperationSpec - ); - } - - /** - * Delete the private endpoint connection from the project. T. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param privateEndpointConnectionName Unique name of a private endpoint connection within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - projectName, - privateEndpointConnectionName, - options - }, - deleteOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProjectOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentprojects/{projectName}/privateEndpointConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnectionCollection, - headersMapper: Mappers.PrivateEndpointConnectionListByProjectHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentprojects/{projectName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection, - headersMapper: Mappers.PrivateEndpointConnectionGetHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentprojects/{projectName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection, - headersMapper: Mappers.PrivateEndpointConnectionUpdateHeaders - }, - 202: { - bodyMapper: Mappers.PrivateEndpointConnection, - headersMapper: Mappers.PrivateEndpointConnectionUpdateHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.privateEndpointConnectionBody, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentprojects/{projectName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.PrivateEndpointConnectionDeleteHeaders - }, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operations/privateLinkResourceOperations.ts b/sdk/migrate/arm-migrate/src/operations/privateLinkResourceOperations.ts deleted file mode 100644 index 15856576bce6..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/privateLinkResourceOperations.ts +++ /dev/null @@ -1,121 +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 { PrivateLinkResourceOperations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - PrivateLinkResourceGetOptionalParams, - PrivateLinkResourceGetResponse, - PrivateLinkResourceListByProjectOptionalParams, - PrivateLinkResourceListByProjectResponse -} from "../models/index.js"; - -/** Class containing PrivateLinkResourceOperations operations. */ -export class PrivateLinkResourceOperationsImpl - implements PrivateLinkResourceOperations { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class PrivateLinkResourceOperations class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get information related to a specific private Link Resource in the project. Returns a json object of - * type 'privateLinkResources' as specified in the models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param privateLinkResourceName Unique name of a private link resource within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - privateLinkResourceName: string, - options?: PrivateLinkResourceGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, privateLinkResourceName, options }, - getOperationSpec - ); - } - - /** - * Get all private link resources created in the project. Returns a json array of objects of type - * 'privateLinkResources' as specified in the Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listByProject( - resourceGroupName: string, - projectName: string, - options?: PrivateLinkResourceListByProjectOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - listByProjectOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentprojects/{projectName}/privateLinkResources/{privateLinkResourceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResource, - headersMapper: Mappers.PrivateLinkResourceGetHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.privateLinkResourceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByProjectOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentprojects/{projectName}/privateLinkResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResourceCollection, - headersMapper: Mappers.PrivateLinkResourceListByProjectHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operations/projects.ts b/sdk/migrate/arm-migrate/src/operations/projects.ts deleted file mode 100644 index f9722e0b7fad..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/projects.ts +++ /dev/null @@ -1,631 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Projects } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - Project, - ProjectsListBySubscriptionNextOptionalParams, - ProjectsListBySubscriptionOptionalParams, - ProjectsListBySubscriptionResponse, - ProjectsListNextOptionalParams, - ProjectsListOptionalParams, - ProjectsListResponse, - AssessmentOptions, - ProjectsAssessmentOptionsListOptionalParams, - ProjectsAssessmentOptionsListResponse, - ProjectsGetOptionalParams, - ProjectsGetResponse, - ProjectsCreateOptionalParams, - ProjectsCreateResponse, - ProjectsUpdateOptionalParams, - ProjectsUpdateResponse, - ProjectsDeleteOptionalParams, - ProjectsDeleteResponse, - ProjectsAssessmentOptionsOptionalParams, - ProjectsAssessmentOptionsResponse, - ProjectsListBySubscriptionNextResponse, - ProjectsListNextResponse -} from "../models/index.js"; - -/// -/** Class containing Projects operations. */ -export class ProjectsImpl implements Projects { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class Projects class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get all the projects in the subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: ProjectsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: ProjectsListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProjectsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: ProjectsListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get all the projects in the resource group. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: ProjectsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceGroupName, options, settings); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: ProjectsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ProjectsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: ProjectsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Gets list of all available options for the properties of an assessment on a project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - public listAssessmentOptionsList( - resourceGroupName: string, - projectName: string, - options?: ProjectsAssessmentOptionsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.assessmentOptionsListPagingAll( - resourceGroupName, - projectName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.assessmentOptionsListPagingPage( - resourceGroupName, - projectName, - options, - settings - ); - } - }; - } - - private async *assessmentOptionsListPagingPage( - resourceGroupName: string, - projectName: string, - options?: ProjectsAssessmentOptionsListOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ProjectsAssessmentOptionsListResponse; - result = await this._assessmentOptionsList( - resourceGroupName, - projectName, - options - ); - yield result.value || []; - } - - private async *assessmentOptionsListPagingAll( - resourceGroupName: string, - projectName: string, - options?: ProjectsAssessmentOptionsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.assessmentOptionsListPagingPage( - resourceGroupName, - projectName, - options - )) { - yield* page; - } - } - - /** - * Get all the projects in the subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: ProjectsListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * Get all the projects in the resource group. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: ProjectsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listOperationSpec - ); - } - - /** - * Get the project with the specified name. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - options?: ProjectsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - getOperationSpec - ); - } - - /** - * Create a project with specified name. If a project already exists, update it. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - options?: ProjectsCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - createOperationSpec - ); - } - - /** - * Update a project with specified name. Supports partial updates, for example only tags can be - * provided. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - projectName: string, - options?: ProjectsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - updateOperationSpec - ); - } - - /** - * Delete the project. Deleting non-existent project is a no-operation. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - options?: ProjectsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - deleteOperationSpec - ); - } - - /** - * Get all available options for the properties of an assessment on a project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param assessmentOptionsName Name of the assessment options. The only name accepted in default. - * @param options The options parameters. - */ - assessmentOptions( - resourceGroupName: string, - projectName: string, - assessmentOptionsName: string, - options?: ProjectsAssessmentOptionsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, assessmentOptionsName, options }, - assessmentOptionsOperationSpec - ); - } - - /** - * Gets list of all available options for the properties of an assessment on a project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - private _assessmentOptionsList( - resourceGroupName: string, - projectName: string, - options?: ProjectsAssessmentOptionsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - assessmentOptionsListOperationSpec - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: ProjectsListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } - - /** - * ListNext - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: ProjectsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Migrate/assessmentProjects", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProjectResultList, - headersMapper: Mappers.ProjectsListBySubscriptionHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProjectResultList, - headersMapper: Mappers.ProjectsListHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Project, - headersMapper: Mappers.ProjectsGetHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Project, - headersMapper: Mappers.ProjectsCreateHeaders - }, - 201: { - bodyMapper: Mappers.Project, - headersMapper: Mappers.ProjectsCreateHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.project, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Project, - headersMapper: Mappers.ProjectsUpdateHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.project, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.ProjectsDeleteHeaders - }, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; -const assessmentOptionsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/assessmentOptions/{assessmentOptionsName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssessmentOptions, - headersMapper: Mappers.ProjectsAssessmentOptionsHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.assessmentOptionsName - ], - headerParameters: [Parameters.accept], - serializer -}; -const assessmentOptionsListOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/assessmentOptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AssessmentOptionsResultList, - headersMapper: Mappers.ProjectsAssessmentOptionsListHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProjectResultList, - headersMapper: Mappers.ProjectsListBySubscriptionNextHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProjectResultList, - headersMapper: Mappers.ProjectsListNextHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operations/serverCollectors.ts b/sdk/migrate/arm-migrate/src/operations/serverCollectors.ts deleted file mode 100644 index cd3e8fb19a45..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/serverCollectors.ts +++ /dev/null @@ -1,279 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { ServerCollectors } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - ServerCollector, - ServerCollectorsListByProjectOptionalParams, - ServerCollectorsListByProjectResponse, - ServerCollectorsGetOptionalParams, - ServerCollectorsGetResponse, - ServerCollectorsCreateOptionalParams, - ServerCollectorsCreateResponse, - ServerCollectorsDeleteOptionalParams, - ServerCollectorsDeleteResponse -} from "../models/index.js"; - -/// -/** Class containing ServerCollectors operations. */ -export class ServerCollectorsImpl implements ServerCollectors { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class ServerCollectors class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get a list of Server collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - public listByProject( - resourceGroupName: string, - projectName: string, - options?: ServerCollectorsListByProjectOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProjectPagingAll( - resourceGroupName, - projectName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProjectPagingPage( - resourceGroupName, - projectName, - options, - settings - ); - } - }; - } - - private async *listByProjectPagingPage( - resourceGroupName: string, - projectName: string, - options?: ServerCollectorsListByProjectOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ServerCollectorsListByProjectResponse; - result = await this._listByProject(resourceGroupName, projectName, options); - yield result.value || []; - } - - private async *listByProjectPagingAll( - resourceGroupName: string, - projectName: string, - options?: ServerCollectorsListByProjectOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProjectPagingPage( - resourceGroupName, - projectName, - options - )) { - yield* page; - } - } - - /** - * Get a list of Server collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - private _listByProject( - resourceGroupName: string, - projectName: string, - options?: ServerCollectorsListByProjectOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - listByProjectOperationSpec - ); - } - - /** - * Get a Server collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param serverCollectorName Unique name of a Server collector within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - serverCollectorName: string, - options?: ServerCollectorsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, serverCollectorName, options }, - getOperationSpec - ); - } - - /** - * Create or Update Server collector - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param serverCollectorName Unique name of a Server collector within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - serverCollectorName: string, - options?: ServerCollectorsCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, serverCollectorName, options }, - createOperationSpec - ); - } - - /** - * Delete a Server collector from the project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param serverCollectorName Unique name of a Server collector within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - serverCollectorName: string, - options?: ServerCollectorsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, serverCollectorName, options }, - deleteOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProjectOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/servercollectors", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServerCollectorList, - headersMapper: Mappers.ServerCollectorsListByProjectHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/servercollectors/{serverCollectorName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServerCollector, - headersMapper: Mappers.ServerCollectorsGetHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.serverCollectorName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/servercollectors/{serverCollectorName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ServerCollector, - headersMapper: Mappers.ServerCollectorsCreateHeaders - }, - 201: { - bodyMapper: Mappers.ServerCollector, - headersMapper: Mappers.ServerCollectorsCreateHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.collectorBody1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.serverCollectorName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/servercollectors/{serverCollectorName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.ServerCollectorsDeleteHeaders - }, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.serverCollectorName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operations/vMwareCollectors.ts b/sdk/migrate/arm-migrate/src/operations/vMwareCollectors.ts deleted file mode 100644 index 8db51a1d5ae3..000000000000 --- a/sdk/migrate/arm-migrate/src/operations/vMwareCollectors.ts +++ /dev/null @@ -1,279 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { VMwareCollectors } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureMigrateV2 } from "../azureMigrateV2.js"; -import { - VMwareCollector, - VMwareCollectorsListByProjectOptionalParams, - VMwareCollectorsListByProjectResponse, - VMwareCollectorsGetOptionalParams, - VMwareCollectorsGetResponse, - VMwareCollectorsCreateOptionalParams, - VMwareCollectorsCreateResponse, - VMwareCollectorsDeleteOptionalParams, - VMwareCollectorsDeleteResponse -} from "../models/index.js"; - -/// -/** Class containing VMwareCollectors operations. */ -export class VMwareCollectorsImpl implements VMwareCollectors { - private readonly client: AzureMigrateV2; - - /** - * Initialize a new instance of the class VMwareCollectors class. - * @param client Reference to the service client - */ - constructor(client: AzureMigrateV2) { - this.client = client; - } - - /** - * Get a list of VMware collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - public listByProject( - resourceGroupName: string, - projectName: string, - options?: VMwareCollectorsListByProjectOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByProjectPagingAll( - resourceGroupName, - projectName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProjectPagingPage( - resourceGroupName, - projectName, - options, - settings - ); - } - }; - } - - private async *listByProjectPagingPage( - resourceGroupName: string, - projectName: string, - options?: VMwareCollectorsListByProjectOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: VMwareCollectorsListByProjectResponse; - result = await this._listByProject(resourceGroupName, projectName, options); - yield result.value || []; - } - - private async *listByProjectPagingAll( - resourceGroupName: string, - projectName: string, - options?: VMwareCollectorsListByProjectOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByProjectPagingPage( - resourceGroupName, - projectName, - options - )) { - yield* page; - } - } - - /** - * Get a list of VMware collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - private _listByProject( - resourceGroupName: string, - projectName: string, - options?: VMwareCollectorsListByProjectOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, options }, - listByProjectOperationSpec - ); - } - - /** - * Get a VMware collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param vmWareCollectorName Unique name of a VMware collector within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - vmWareCollectorName: string, - options?: VMwareCollectorsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, vmWareCollectorName, options }, - getOperationSpec - ); - } - - /** - * Create or Update VMware collector - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param vmWareCollectorName Unique name of a VMware collector within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - vmWareCollectorName: string, - options?: VMwareCollectorsCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, vmWareCollectorName, options }, - createOperationSpec - ); - } - - /** - * Delete a VMware collector from the project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param vmWareCollectorName Unique name of a VMware collector within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - vmWareCollectorName: string, - options?: VMwareCollectorsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, projectName, vmWareCollectorName, options }, - deleteOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProjectOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VMwareCollectorList, - headersMapper: Mappers.VMwareCollectorsListByProjectHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors/{vmWareCollectorName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VMwareCollector, - headersMapper: Mappers.VMwareCollectorsGetHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.vmWareCollectorName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors/{vmWareCollectorName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VMwareCollector, - headersMapper: Mappers.VMwareCollectorsCreateHeaders - }, - 201: { - bodyMapper: Mappers.VMwareCollector, - headersMapper: Mappers.VMwareCollectorsCreateHeaders - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.collectorBody2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.vmWareCollectorName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors/{vmWareCollectorName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.VMwareCollectorsDeleteHeaders - }, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.projectName, - Parameters.vmWareCollectorName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/assessedMachines.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/assessedMachines.ts deleted file mode 100644 index c37b3528cfc8..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/assessedMachines.ts +++ /dev/null @@ -1,60 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AssessedMachine, - AssessedMachinesListByAssessmentOptionalParams, - AssessedMachinesGetOptionalParams, - AssessedMachinesGetResponse -} from "../models/index.js"; - -/// -/** Interface representing a AssessedMachines. */ -export interface AssessedMachines { - /** - * Get list of machines that assessed as part of the specified assessment. Returns a json array of - * objects of type 'assessedMachine' as specified in the Models section. - * - * Whenever an assessment is created or updated, it goes under computation. During this phase, the - * 'status' field of Assessment object reports 'Computing'. - * During the period when the assessment is under computation, the list of assessed machines is empty - * and no assessed machines are returned by this call. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param options The options parameters. - */ - listByAssessment( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessedMachinesListByAssessmentOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get an assessed machine with its size & cost estimate that was evaluated in the specified - * assessment. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param assessedMachineName Unique name of an assessed machine evaluated as part of an assessment. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - assessedMachineName: string, - options?: AssessedMachinesGetOptionalParams - ): Promise; -} diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/assessments.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/assessments.ts deleted file mode 100644 index 43ad17d921db..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/assessments.ts +++ /dev/null @@ -1,135 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - Assessment, - AssessmentsListByGroupOptionalParams, - AssessmentsListByProjectOptionalParams, - AssessmentsGetOptionalParams, - AssessmentsGetResponse, - AssessmentsCreateOptionalParams, - AssessmentsCreateResponse, - AssessmentsDeleteOptionalParams, - AssessmentsDeleteResponse, - AssessmentsGetReportDownloadUrlOptionalParams, - AssessmentsGetReportDownloadUrlResponse -} from "../models/index.js"; - -/// -/** Interface representing a Assessments. */ -export interface Assessments { - /** - * Get all assessments created for the specified group. - * - * Returns a json array of objects of type 'assessment' as specified in Models section. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param options The options parameters. - */ - listByGroup( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: AssessmentsListByGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get all assessments created in the project. - * - * Returns a json array of objects of type 'assessment' as specified in Models section. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listByProject( - resourceGroupName: string, - projectName: string, - options?: AssessmentsListByProjectOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get an existing assessment with the specified name. Returns a json object of type 'assessment' as - * specified in Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessmentsGetOptionalParams - ): Promise; - /** - * Create a new assessment with the given name and the specified settings. Since name of an assessment - * in a project is a unique identifier, if an assessment with the name provided already exists, then - * the existing assessment is updated. - * - * Any PUT operation, resulting in either create or update on an assessment, will cause the assessment - * to go in a "InProgress" state. This will be indicated by the field 'computationState' on the - * Assessment object. During this time no other PUT operation will be allowed on that assessment - * object, nor will a Delete operation. Once the computation for the assessment is complete, the field - * 'computationState' will be updated to 'Ready', and then other PUT or DELETE operations can happen on - * the assessment. - * - * When assessment is under computation, any PUT will lead to a 400 - Bad Request error. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessmentsCreateOptionalParams - ): Promise; - /** - * Delete an assessment from the project. The machines remain in the assessment. Deleting a - * non-existent assessment results in a no-operation. - * - * When an assessment is under computation, as indicated by the 'computationState' field, it cannot be - * deleted. Any such attempt will return a 400 - Bad Request. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessmentsDeleteOptionalParams - ): Promise; - /** - * Get the URL for downloading the assessment in a report format. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param assessmentName Unique name of an assessment within a project. - * @param options The options parameters. - */ - getReportDownloadUrl( - resourceGroupName: string, - projectName: string, - groupName: string, - assessmentName: string, - options?: AssessmentsGetReportDownloadUrlOptionalParams - ): Promise; -} diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/groups.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/groups.ts deleted file mode 100644 index b3b1ec781a48..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/groups.ts +++ /dev/null @@ -1,100 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - Group, - GroupsListByProjectOptionalParams, - GroupsGetOptionalParams, - GroupsGetResponse, - GroupsCreateOptionalParams, - GroupsCreateResponse, - GroupsDeleteOptionalParams, - GroupsDeleteResponse, - GroupsUpdateMachinesOptionalParams, - GroupsUpdateMachinesResponse -} from "../models/index.js"; - -/// -/** Interface representing a Groups. */ -export interface Groups { - /** - * Get all groups created in the project. Returns a json array of objects of type 'group' as specified - * in the Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listByProject( - resourceGroupName: string, - projectName: string, - options?: GroupsListByProjectOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get information related to a specific group in the project. Returns a json object of type 'group' as - * specified in the models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: GroupsGetOptionalParams - ): Promise; - /** - * Create a new group by sending a json object of type 'group' as given in Models section as part of - * the Request Body. The group name in a project is unique. - * - * This operation is Idempotent. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: GroupsCreateOptionalParams - ): Promise; - /** - * Delete the group from the project. The machines remain in the project. Deleting a non-existent group - * results in a no-operation. - * - * A group is an aggregation mechanism for machines in a project. Therefore, deleting group does not - * delete machines in it. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: GroupsDeleteOptionalParams - ): Promise; - /** - * Update machines in group by adding or removing machines. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param groupName Unique name of a group within a project. - * @param options The options parameters. - */ - updateMachines( - resourceGroupName: string, - projectName: string, - groupName: string, - options?: GroupsUpdateMachinesOptionalParams - ): Promise; -} diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/hyperVCollectors.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/hyperVCollectors.ts deleted file mode 100644 index b7e23371fe1e..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/hyperVCollectors.ts +++ /dev/null @@ -1,74 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - HyperVCollector, - HyperVCollectorsListByProjectOptionalParams, - HyperVCollectorsGetOptionalParams, - HyperVCollectorsGetResponse, - HyperVCollectorsCreateOptionalParams, - HyperVCollectorsCreateResponse, - HyperVCollectorsDeleteOptionalParams, - HyperVCollectorsDeleteResponse -} from "../models/index.js"; - -/// -/** Interface representing a HyperVCollectors. */ -export interface HyperVCollectors { - /** - * Get a list of Hyper-V collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listByProject( - resourceGroupName: string, - projectName: string, - options?: HyperVCollectorsListByProjectOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get a Hyper-V collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param hyperVCollectorName Unique name of a Hyper-V collector within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - hyperVCollectorName: string, - options?: HyperVCollectorsGetOptionalParams - ): Promise; - /** - * Create or Update Hyper-V collector - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param hyperVCollectorName Unique name of a Hyper-V collector within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - hyperVCollectorName: string, - options?: HyperVCollectorsCreateOptionalParams - ): Promise; - /** - * Delete a Hyper-V collector from the project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param hyperVCollectorName Unique name of a Hyper-V collector within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - hyperVCollectorName: string, - options?: HyperVCollectorsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/importCollectors.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/importCollectors.ts deleted file mode 100644 index f0ec7fb95f45..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/importCollectors.ts +++ /dev/null @@ -1,74 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ImportCollector, - ImportCollectorsListByProjectOptionalParams, - ImportCollectorsGetOptionalParams, - ImportCollectorsGetResponse, - ImportCollectorsCreateOptionalParams, - ImportCollectorsCreateResponse, - ImportCollectorsDeleteOptionalParams, - ImportCollectorsDeleteResponse -} from "../models/index.js"; - -/// -/** Interface representing a ImportCollectors. */ -export interface ImportCollectors { - /** - * Get a list of Import collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listByProject( - resourceGroupName: string, - projectName: string, - options?: ImportCollectorsListByProjectOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get a Import collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param importCollectorName Unique name of a Import collector within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - importCollectorName: string, - options?: ImportCollectorsGetOptionalParams - ): Promise; - /** - * Create or Update Import collector - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param importCollectorName Unique name of a Import collector within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - importCollectorName: string, - options?: ImportCollectorsCreateOptionalParams - ): Promise; - /** - * Delete a Import collector from the project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param importCollectorName Unique name of a Import collector within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - importCollectorName: string, - options?: ImportCollectorsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/index.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/index.ts deleted file mode 100644 index b38b4d4c15e0..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/index.ts +++ /dev/null @@ -1,20 +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 * from "./projects.js"; -export * from "./machines.js"; -export * from "./groups.js"; -export * from "./assessments.js"; -export * from "./assessedMachines.js"; -export * from "./hyperVCollectors.js"; -export * from "./serverCollectors.js"; -export * from "./vMwareCollectors.js"; -export * from "./importCollectors.js"; -export * from "./privateEndpointConnectionOperations.js"; -export * from "./privateLinkResourceOperations.js"; -export * from "./operations.js"; diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/machines.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/machines.ts deleted file mode 100644 index 4087b5a50c7e..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/machines.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. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - Machine, - MachinesListByProjectOptionalParams, - MachinesGetOptionalParams, - MachinesGetResponse -} from "../models/index.js"; - -/// -/** Interface representing a Machines. */ -export interface Machines { - /** - * Get data of all the machines available in the project. Returns a json array of objects of type - * 'machine' defined in Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listByProject( - resourceGroupName: string, - projectName: string, - options?: MachinesListByProjectOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get the machine with the specified name. Returns a json object of type 'machine' defined in Models - * section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param machineName Unique name of a machine in private datacenter. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - machineName: string, - options?: MachinesGetOptionalParams - ): Promise; -} diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/operations.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/operations.ts deleted file mode 100644 index 20e53607a031..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/operations.ts +++ /dev/null @@ -1,22 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a Operations. */ -export interface Operations { - /** - * Get a list of REST API supported by Microsoft.Migrate provider. - * @param options The options parameters. - */ - list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/privateEndpointConnectionOperations.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/privateEndpointConnectionOperations.ts deleted file mode 100644 index 4531555313ca..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/privateEndpointConnectionOperations.ts +++ /dev/null @@ -1,75 +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 { - PrivateEndpointConnectionListByProjectOptionalParams, - PrivateEndpointConnectionListByProjectResponse, - PrivateEndpointConnectionGetOptionalParams, - PrivateEndpointConnectionGetResponse, - PrivateEndpointConnectionUpdateOptionalParams, - PrivateEndpointConnectionUpdateResponse, - PrivateEndpointConnectionDeleteOptionalParams, - PrivateEndpointConnectionDeleteResponse -} from "../models/index.js"; - -/** Interface representing a PrivateEndpointConnectionOperations. */ -export interface PrivateEndpointConnectionOperations { - /** - * Get all private endpoint connections in the project. Returns a json array of objects of type - * 'privateEndpointConnections' as specified in the Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listByProject( - resourceGroupName: string, - projectName: string, - options?: PrivateEndpointConnectionListByProjectOptionalParams - ): Promise; - /** - * Get information related to a specific private endpoint connection in the project. Returns a json - * object of type 'privateEndpointConnections' as specified in the models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param privateEndpointConnectionName Unique name of a private endpoint connection within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionGetOptionalParams - ): Promise; - /** - * Update a specific private endpoint connection in the project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param privateEndpointConnectionName Unique name of a private endpoint connection within a project. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - projectName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionUpdateOptionalParams - ): Promise; - /** - * Delete the private endpoint connection from the project. T. - * - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param privateEndpointConnectionName Unique name of a private endpoint connection within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams - ): Promise; -} diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/privateLinkResourceOperations.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/privateLinkResourceOperations.ts deleted file mode 100644 index f791a5d8c2f8..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/privateLinkResourceOperations.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. - */ - -import { - PrivateLinkResourceGetOptionalParams, - PrivateLinkResourceGetResponse, - PrivateLinkResourceListByProjectOptionalParams, - PrivateLinkResourceListByProjectResponse -} from "../models/index.js"; - -/** Interface representing a PrivateLinkResourceOperations. */ -export interface PrivateLinkResourceOperations { - /** - * Get information related to a specific private Link Resource in the project. Returns a json object of - * type 'privateLinkResources' as specified in the models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param privateLinkResourceName Unique name of a private link resource within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - privateLinkResourceName: string, - options?: PrivateLinkResourceGetOptionalParams - ): Promise; - /** - * Get all private link resources created in the project. Returns a json array of objects of type - * 'privateLinkResources' as specified in the Models section. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listByProject( - resourceGroupName: string, - projectName: string, - options?: PrivateLinkResourceListByProjectOptionalParams - ): Promise; -} diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/projects.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/projects.ts deleted file mode 100644 index 007b2cf1834e..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/projects.ts +++ /dev/null @@ -1,116 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - Project, - ProjectsListBySubscriptionOptionalParams, - ProjectsListOptionalParams, - AssessmentOptions, - ProjectsAssessmentOptionsListOptionalParams, - ProjectsGetOptionalParams, - ProjectsGetResponse, - ProjectsCreateOptionalParams, - ProjectsCreateResponse, - ProjectsUpdateOptionalParams, - ProjectsUpdateResponse, - ProjectsDeleteOptionalParams, - ProjectsDeleteResponse, - ProjectsAssessmentOptionsOptionalParams, - ProjectsAssessmentOptionsResponse -} from "../models/index.js"; - -/// -/** Interface representing a Projects. */ -export interface Projects { - /** - * Get all the projects in the subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: ProjectsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get all the projects in the resource group. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: ProjectsListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets list of all available options for the properties of an assessment on a project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listAssessmentOptionsList( - resourceGroupName: string, - projectName: string, - options?: ProjectsAssessmentOptionsListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get the project with the specified name. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - options?: ProjectsGetOptionalParams - ): Promise; - /** - * Create a project with specified name. If a project already exists, update it. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - options?: ProjectsCreateOptionalParams - ): Promise; - /** - * Update a project with specified name. Supports partial updates, for example only tags can be - * provided. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - projectName: string, - options?: ProjectsUpdateOptionalParams - ): Promise; - /** - * Delete the project. Deleting non-existent project is a no-operation. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - options?: ProjectsDeleteOptionalParams - ): Promise; - /** - * Get all available options for the properties of an assessment on a project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param assessmentOptionsName Name of the assessment options. The only name accepted in default. - * @param options The options parameters. - */ - assessmentOptions( - resourceGroupName: string, - projectName: string, - assessmentOptionsName: string, - options?: ProjectsAssessmentOptionsOptionalParams - ): Promise; -} diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/serverCollectors.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/serverCollectors.ts deleted file mode 100644 index 7211bd3266b4..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/serverCollectors.ts +++ /dev/null @@ -1,74 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ServerCollector, - ServerCollectorsListByProjectOptionalParams, - ServerCollectorsGetOptionalParams, - ServerCollectorsGetResponse, - ServerCollectorsCreateOptionalParams, - ServerCollectorsCreateResponse, - ServerCollectorsDeleteOptionalParams, - ServerCollectorsDeleteResponse -} from "../models/index.js"; - -/// -/** Interface representing a ServerCollectors. */ -export interface ServerCollectors { - /** - * Get a list of Server collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listByProject( - resourceGroupName: string, - projectName: string, - options?: ServerCollectorsListByProjectOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get a Server collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param serverCollectorName Unique name of a Server collector within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - serverCollectorName: string, - options?: ServerCollectorsGetOptionalParams - ): Promise; - /** - * Create or Update Server collector - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param serverCollectorName Unique name of a Server collector within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - serverCollectorName: string, - options?: ServerCollectorsCreateOptionalParams - ): Promise; - /** - * Delete a Server collector from the project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param serverCollectorName Unique name of a Server collector within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - serverCollectorName: string, - options?: ServerCollectorsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/migrate/arm-migrate/src/operationsInterfaces/vMwareCollectors.ts b/sdk/migrate/arm-migrate/src/operationsInterfaces/vMwareCollectors.ts deleted file mode 100644 index a87718887c32..000000000000 --- a/sdk/migrate/arm-migrate/src/operationsInterfaces/vMwareCollectors.ts +++ /dev/null @@ -1,74 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - VMwareCollector, - VMwareCollectorsListByProjectOptionalParams, - VMwareCollectorsGetOptionalParams, - VMwareCollectorsGetResponse, - VMwareCollectorsCreateOptionalParams, - VMwareCollectorsCreateResponse, - VMwareCollectorsDeleteOptionalParams, - VMwareCollectorsDeleteResponse -} from "../models/index.js"; - -/// -/** Interface representing a VMwareCollectors. */ -export interface VMwareCollectors { - /** - * Get a list of VMware collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param options The options parameters. - */ - listByProject( - resourceGroupName: string, - projectName: string, - options?: VMwareCollectorsListByProjectOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get a VMware collector. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param vmWareCollectorName Unique name of a VMware collector within a project. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - projectName: string, - vmWareCollectorName: string, - options?: VMwareCollectorsGetOptionalParams - ): Promise; - /** - * Create or Update VMware collector - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param vmWareCollectorName Unique name of a VMware collector within a project. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - projectName: string, - vmWareCollectorName: string, - options?: VMwareCollectorsCreateOptionalParams - ): Promise; - /** - * Delete a VMware collector from the project. - * @param resourceGroupName Name of the Azure Resource Group that project is part of. - * @param projectName Name of the Azure Migrate project. - * @param vmWareCollectorName Unique name of a VMware collector within a project. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - projectName: string, - vmWareCollectorName: string, - options?: VMwareCollectorsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/migrate/arm-migrate/src/pagingHelper.ts b/sdk/migrate/arm-migrate/src/pagingHelper.ts deleted file mode 100644 index 269a2b9814b5..000000000000 --- a/sdk/migrate/arm-migrate/src/pagingHelper.ts +++ /dev/null @@ -1,39 +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 interface PageInfo { - continuationToken?: string; -} - -const pageMap = new WeakMap(); - -/** - * Given the last `.value` produced by the `byPage` iterator, - * returns a continuation token that can be used to begin paging from - * that point later. - * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. - * @returns The continuation token that can be passed into byPage() during future calls. - */ -export function getContinuationToken(page: unknown): string | undefined { - if (typeof page !== "object" || page === null) { - return undefined; - } - return pageMap.get(page)?.continuationToken; -} - -export function setContinuationToken( - page: unknown, - continuationToken: string | undefined -): void { - if (typeof page !== "object" || page === null || !continuationToken) { - return; - } - const pageInfo = pageMap.get(page) ?? {}; - pageInfo.continuationToken = continuationToken; - pageMap.set(page, pageInfo); -} diff --git a/sdk/migrate/arm-migrate/src/restorePollerHelpers.ts b/sdk/migrate/arm-migrate/src/restorePollerHelpers.ts new file mode 100644 index 000000000000..155485a94b84 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/restorePollerHelpers.ts @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { MigrateClient } from "./migrateClient.js"; +import { + _downloadUrlDeserialize, + _createDeserialize, +} from "./api/avsAssessmentsV2Operations/operations.js"; +import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; +import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; +import { + PollerLike, + OperationState, + deserializeState, + ResourceLocationConfig, +} from "@azure/core-lro"; + +export interface RestorePollerOptions< + TResult, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +> extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** Deserialization function for raw response body */ + processResponseBody?: (result: TResponse) => Promise; +} + +/** + * Creates a poller from the serialized state of another poller. This can be + * useful when you want to create pollers on a different host or a poller + * needs to be constructed after the original one is not in scope. + */ +export function restorePoller( + client: MigrateClient, + serializedState: string, + sourceOperation: (...args: any[]) => PollerLike, TResult>, + options?: RestorePollerOptions, +): PollerLike, TResult> { + const pollerConfig = deserializeState(serializedState).config; + const { initialRequestUrl, requestMethod, metadata } = pollerConfig; + if (!initialRequestUrl || !requestMethod) { + throw new Error( + `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`, + ); + } + const resourceLocationConfig = metadata?.["resourceLocationConfig"] as + | ResourceLocationConfig + | undefined; + const { deserializer, expectedStatuses = [] } = + getDeserializationHelper(initialRequestUrl, requestMethod) ?? {}; + const deserializeHelper = options?.processResponseBody ?? deserializer; + if (!deserializeHelper) { + throw new Error( + `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`, + ); + } + return getLongRunningPoller( + (client as any)["_client"] ?? client, + deserializeHelper as (result: TResponse) => Promise, + expectedStatuses, + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + resourceLocationConfig, + restoreFrom: serializedState, + initialRequestUrl, + }, + ); +} + +interface DeserializationHelper { + deserializer: Function; + expectedStatuses: string[]; +} + +const deserializeMap: Record = { + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessments/{assessmentName}/downloadUrl": + { deserializer: _downloadUrlDeserialize, expectedStatuses: ["202", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/avsAssessments/{assessmentName}": + { deserializer: _createDeserialize, expectedStatuses: ["200", "201"] }, +}; + +function getDeserializationHelper( + urlStr: string, + method: string, +): DeserializationHelper | undefined { + const path = new URL(urlStr).pathname; + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: DeserializationHelper | undefined; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(deserializeMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/migrate/arm-migrate/src/static-helpers/pagingHelpers.ts b/sdk/migrate/arm-migrate/src/static-helpers/pagingHelpers.ts new file mode 100644 index 000000000000..ce33af5f4178 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/static-helpers/pagingHelpers.ts @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { RestError } from "@azure/core-rest-pipeline"; + +/** + * Options for the byPage method + */ +export interface PageSettings { + /** + * A reference to a specific page to start iterating from. + */ + continuationToken?: string; +} + +/** + * An interface that describes a page of results. + */ +export type ContinuablePage = TPage & { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +}; + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; +} + +/** + * An interface that describes how to communicate with the service. + */ +export interface PagedResult< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * Link to the first page of results. + */ + firstPageLink?: string; + /** + * A method that returns a page of results. + */ + getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator>; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => TElement[]; +} + +/** + * Options for the paging helper + */ +export interface BuildPagedAsyncIteratorOptions { + itemName?: string; + nextLinkName?: string; +} + +/** + * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator + */ +export function buildPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +>( + client: Client, + getInitialResponse: () => PromiseLike, + processResponseBody: (result: TResponse) => PromiseLike, + expectedStatuses: string[], + options: BuildPagedAsyncIteratorOptions = {}, +): PagedAsyncIterableIterator { + const itemName = options.itemName ?? "value"; + const nextLinkName = options.nextLinkName ?? "nextLink"; + const pagedResult: PagedResult = { + getPage: async (pageLink?: string) => { + const result = + pageLink === undefined + ? await getInitialResponse() + : await client.pathUnchecked(pageLink).get(); + checkPagingRequest(result, expectedStatuses); + const results = await processResponseBody(result as TResponse); + const nextLink = getNextLink(results, nextLinkName); + const values = getElements(results, itemName) as TPage; + return { + page: values, + nextPageLink: nextLink, + }; + }, + byPage: (settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }, + }; + return getPagedAsyncIterator(pagedResult); +} + +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ + +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + ((settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + for await (const page of pages) { + yield* page as unknown as TElement[]; + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: string; + } = {}, +): AsyncIterableIterator> { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + let result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + } +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) { + throw new RestError( + `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`, + ); + } + + if (nextLink === null) { + return undefined; + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + if (!Array.isArray(value)) { + throw new RestError( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { + if (!expectedStatuses.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} diff --git a/sdk/migrate/arm-migrate/src/static-helpers/pollingHelpers.ts b/sdk/migrate/arm-migrate/src/static-helpers/pollingHelpers.ts new file mode 100644 index 000000000000..f01c41bab69d --- /dev/null +++ b/sdk/migrate/arm-migrate/src/static-helpers/pollingHelpers.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + PollerLike, + OperationState, + ResourceLocationConfig, + RunningOperation, + createHttpPoller, + OperationResponse, +} from "@azure/core-lro"; + +import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; + +export interface GetLongRunningPollerOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * The potential location of the result of the LRO if specified by the LRO extension in the swagger. + */ + resourceLocationConfig?: ResourceLocationConfig; + /** + * The original url of the LRO + * Should not be null when restoreFrom is set + */ + initialRequestUrl?: string; + /** + * A serialized poller which can be used to resume an existing paused Long-Running-Operation. + */ + restoreFrom?: string; + /** + * The function to get the initial response + */ + getInitialResponse?: () => PromiseLike; +} +export function getLongRunningPoller( + client: Client, + processResponseBody: (result: TResponse) => Promise, + expectedStatuses: string[], + options: GetLongRunningPollerOptions, +): PollerLike, TResult> { + const { restoreFrom, getInitialResponse } = options; + if (!restoreFrom && !getInitialResponse) { + throw new Error("Either restoreFrom or getInitialResponse must be specified"); + } + let initialResponse: TResponse | undefined = undefined; + const pollAbortController = new AbortController(); + const poller: RunningOperation = { + sendInitialRequest: async () => { + if (!getInitialResponse) { + throw new Error("getInitialResponse is required when initializing a new poller"); + } + initialResponse = await getInitialResponse(); + return getLroResponse(initialResponse, expectedStatuses); + }, + sendPollRequest: async ( + path: string, + pollOptions?: { + abortSignal?: AbortSignalLike; + }, + ) => { + // The poll request would both listen to the user provided abort signal and the poller's own abort signal + function abortListener(): void { + pollAbortController.abort(); + } + const abortSignal = pollAbortController.signal; + if (options.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (pollOptions?.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (!abortSignal.aborted) { + options.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + pollOptions?.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + response = await client.pathUnchecked(path).get({ abortSignal }); + } finally { + options.abortSignal?.removeEventListener("abort", abortListener); + pollOptions?.abortSignal?.removeEventListener("abort", abortListener); + } + + return getLroResponse(response as TResponse, expectedStatuses); + }, + }; + return createHttpPoller(poller, { + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: options?.resourceLocationConfig, + restoreFrom: options?.restoreFrom, + processResult: (result: unknown) => { + return processResponseBody(result as TResponse); + }, + }); +} +/** + * Converts a Rest Client response to a response that the LRO implementation understands + * @param response - a rest client http response + * @param deserializeFn - deserialize function to convert Rest response to modular output + * @returns - An LRO response that the LRO implementation understands + */ +function getLroResponse( + response: TResponse, + expectedStatuses: string[], +): OperationResponse { + if (!expectedStatuses.includes(response.status)) { + throw createRestError(response); + } + + return { + flatResponse: response, + rawResponse: { + ...response, + statusCode: Number.parseInt(response.status), + body: response.body, + }, + }; +} diff --git a/sdk/migrate/arm-migrate/src/static-helpers/urlTemplate.ts b/sdk/migrate/arm-migrate/src/static-helpers/urlTemplate.ts new file mode 100644 index 000000000000..cd03319fda35 --- /dev/null +++ b/sdk/migrate/arm-migrate/src/static-helpers/urlTemplate.ts @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +//--------------------- +// interfaces +//--------------------- +interface ValueOptions { + isFirst: boolean; // is first value in the expression + op?: string; // operator + varValue?: any; // variable value + varName?: string; // variable name + modifier?: string; // modifier e.g * + reserved?: boolean; // if true we'll keep reserved words with not encoding +} + +export interface UrlTemplateOptions { + // if set to true, reserved characters will not be encoded + allowReserved?: boolean; +} + +// --------------------- +// helpers +// --------------------- +function encodeComponent(val: string, reserved?: boolean, op?: string) { + return (reserved ?? op === "+") || op === "#" + ? encodeReservedComponent(val) + : encodeRFC3986URIComponent(val); +} + +function encodeReservedComponent(str: string) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map((part) => (!/%[0-9A-Fa-f]/.test(part) ? encodeURI(part) : part)) + .join(""); +} + +function encodeRFC3986URIComponent(str: string) { + return encodeURIComponent(str).replace( + /[!'()*]/g, + (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, + ); +} + +function isDefined(val: any) { + return val !== undefined && val !== null; +} + +function getNamedAndIfEmpty(op?: string): [boolean, string] { + return [!!op && [";", "?", "&"].includes(op), !!op && ["?", "&"].includes(op) ? "=" : ""]; +} + +function getFirstOrSep(op?: string, isFirst = false) { + if (isFirst) { + return !op || op === "+" ? "" : op; + } else if (!op || op === "+" || op === "#") { + return ","; + } else if (op === "?") { + return "&"; + } else { + return op; + } +} + +function getExpandedValue(option: ValueOptions) { + let isFirst = option.isFirst; + const { op, varName, varValue: value, reserved } = option; + const vals: string[] = []; + const [named, ifEmpty] = getNamedAndIfEmpty(op); + + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + // prepare the following parts: separator, varName, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (named && varName) { + vals.push(`${encodeURIComponent(varName)}`); + val === "" ? vals.push(ifEmpty) : vals.push("="); + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + const val = value[key]; + if (!isDefined(val)) { + continue; + } + // prepare the following parts: separator, key, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (key) { + vals.push(`${encodeURIComponent(key)}`); + named && val === "" ? vals.push(ifEmpty) : vals.push("="); + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } + return vals.join(""); +} + +function getNonExpandedValue(option: ValueOptions) { + const { op, varName, varValue: value, isFirst, reserved } = option; + const vals: string[] = []; + const first = getFirstOrSep(op, isFirst); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + if (named && varName) { + vals.push(encodeComponent(varName, reserved, op)); + if (value === "") { + if (!ifEmpty) { + vals.push(ifEmpty); + } + return !vals.join("") ? undefined : `${first}${vals.join("")}`; + } + vals.push("="); + } + + const items = []; + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + items.push(encodeComponent(val, reserved, op)); + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + if (!isDefined(value[key])) { + continue; + } + items.push(encodeRFC3986URIComponent(key)); + items.push(encodeComponent(value[key], reserved, op)); + } + } + vals.push(items.join(",")); + return !vals.join(",") ? undefined : `${first}${vals.join("")}`; +} + +function getVarValue(option: ValueOptions): string | undefined { + const { op, varName, modifier, isFirst, reserved, varValue: value } = option; + + if (!isDefined(value)) { + return undefined; + } else if (["string", "number", "boolean"].includes(typeof value)) { + let val = value.toString(); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + const vals: string[] = [getFirstOrSep(op, isFirst)]; + if (named && varName) { + // No need to encode varName considering it is already encoded + vals.push(varName); + val === "" ? vals.push(ifEmpty) : vals.push("="); + } + if (modifier && modifier !== "*") { + val = val.substring(0, parseInt(modifier, 10)); + } + vals.push(encodeComponent(val, reserved, op)); + return vals.join(""); + } else if (modifier === "*") { + return getExpandedValue(option); + } else { + return getNonExpandedValue(option); + } +} + +// --------------------------------------------------------------------------------------------------- +// This is an implementation of RFC 6570 URI Template: https://datatracker.ietf.org/doc/html/rfc6570. +// --------------------------------------------------------------------------------------------------- +export function expandUrlTemplate( + template: string, + context: Record, + option?: UrlTemplateOptions, +): string { + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, (_, expr, text) => { + if (!expr) { + return encodeReservedComponent(text); + } + let op; + if (["+", "#", ".", "/", ";", "?", "&"].includes(expr[0])) { + (op = expr[0]), (expr = expr.slice(1)); + } + const varList = expr.split(/,/g); + const result = []; + for (const varSpec of varList) { + const varMatch = /([^:\*]*)(?::(\d+)|(\*))?/.exec(varSpec); + if (!varMatch || !varMatch[1]) { + continue; + } + const varValue = getVarValue({ + isFirst: result.length === 0, + op, + varValue: context[varMatch[1]], + varName: varMatch[1], + modifier: varMatch[2] || varMatch[3], + reserved: option?.allowReserved, + }); + if (varValue) { + result.push(varValue); + } + } + return result.join(""); + }); +} diff --git a/sdk/migrate/arm-migrate/test/migrate.spec.ts b/sdk/migrate/arm-migrate/test/migrate.spec.ts deleted file mode 100644 index 517c44694f26..000000000000 --- a/sdk/migrate/arm-migrate/test/migrate.spec.ts +++ /dev/null @@ -1,43 +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 type { RecorderStartOptions } from "@azure-tools/test-recorder"; -import { Recorder } from "@azure-tools/test-recorder"; -import { describe, it, assert, beforeEach, afterEach } from "vitest"; - -const replaceableVariables: Record = { - 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", -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], -}; - -describe("My test", () => { - let recorder: Recorder; - - beforeEach(async (ctx) => { - recorder = new Recorder(ctx); - await recorder.start(recorderOptions); - }); - - afterEach(async () => { - await recorder.stop(); - }); - - it("sample test", async () => { - assert(true); - }); -}); diff --git a/sdk/migrate/arm-migrate/test/public/sampleTest.spec.ts b/sdk/migrate/arm-migrate/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..e4591bbad342 --- /dev/null +++ b/sdk/migrate/arm-migrate/test/public/sampleTest.spec.ts @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async () => { + // recorder = await createRecorder(this); + }); + + afterEach(async () => { + // await recorder.stop(); + }); + + it("sample test", async function () { + assert.equal(1, 1); + }); +}); diff --git a/sdk/migrate/arm-migrate/test/public/utils/recordedClient.ts b/sdk/migrate/arm-migrate/test/public/utils/recordedClient.ts new file mode 100644 index 000000000000..14dcd9fa397c --- /dev/null +++ b/sdk/migrate/arm-migrate/test/public/utils/recordedClient.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Recorder, RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; + +const replaceableVariables: Record = { + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderEnvSetup: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +/** + * creates the recorder and reads the environment variables from the `.env` file. + * Should be called first in the test suite to make sure environment variables are + * read before they are being used. + */ +export async function createRecorder(context: VitestTestContext): Promise { + const recorder = new Recorder(context); + await recorder.start(recorderEnvSetup); + return recorder; +} diff --git a/sdk/migrate/arm-migrate/test/snippets.spec.ts b/sdk/migrate/arm-migrate/test/snippets.spec.ts index 0a5e7815d871..1f406f72c899 100644 --- a/sdk/migrate/arm-migrate/test/snippets.spec.ts +++ b/sdk/migrate/arm-migrate/test/snippets.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { AzureMigrateV2 } from "../src/index.js"; +import { MigrateClient } from "../src/index.js"; import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; import { setLogLevel } from "@azure/logger"; import { describe, it } from "vitest"; @@ -9,7 +9,7 @@ import { describe, it } from "vitest"; describe("snippets", () => { it("ReadmeSampleCreateClient_Node", async () => { const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new AzureMigrateV2(new DefaultAzureCredential(), subscriptionId); + const client = new MigrateClient(new DefaultAzureCredential(), subscriptionId); }); it("ReadmeSampleCreateClient_Browser", async () => { @@ -18,7 +18,7 @@ describe("snippets", () => { tenantId: "", clientId: "", }); - const client = new AzureMigrateV2(credential, subscriptionId); + const client = new MigrateClient(credential, subscriptionId); }); it("SetLogLevel", async () => { diff --git a/sdk/migrate/arm-migrate/tsp-location.yaml b/sdk/migrate/arm-migrate/tsp-location.yaml new file mode 100644 index 000000000000..e13880954705 --- /dev/null +++ b/sdk/migrate/arm-migrate/tsp-location.yaml @@ -0,0 +1,5 @@ +directory: specification/migrate/AssessmentProjects.Management/AvsAssessments.Management +commit: 5ab69662eff4ee3c2bc93c2a4959470ab9867c99 +repo: Azure/azure-rest-api-specs +additionalDirectories: +- specification/migrate/AssessmentProjects.Management/Common diff --git a/sdk/migrate/arm-migrate/vitest.browser.config.ts b/sdk/migrate/arm-migrate/vitest.browser.config.ts index 10e70dbfa8ee..182729ab5ce9 100644 --- a/sdk/migrate/arm-migrate/vitest.browser.config.ts +++ b/sdk/migrate/arm-migrate/vitest.browser.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -8,7 +9,7 @@ export default mergeConfig( viteConfig, defineConfig({ test: { - include: ["dist-test/browser/test/**/*.spec.js"], + include: ["dist-test/browser/test/**/*.spec.js",], testTimeout: 1200000, hookTimeout: 1200000, }, diff --git a/sdk/migrate/arm-migrate/vitest.config.ts b/sdk/migrate/arm-migrate/vitest.config.ts index 86a71911ccc2..40e031385dd8 100644 --- a/sdk/migrate/arm-migrate/vitest.config.ts +++ b/sdk/migrate/arm-migrate/vitest.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. diff --git a/sdk/migrate/arm-migrate/vitest.esm.config.ts b/sdk/migrate/arm-migrate/vitest.esm.config.ts index 5e9735e9b144..a70127279fc9 100644 --- a/sdk/migrate/arm-migrate/vitest.esm.config.ts +++ b/sdk/migrate/arm-migrate/vitest.esm.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -5,4 +6,7 @@ import { mergeConfig } from "vitest/config"; import vitestConfig from "./vitest.config.ts"; import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; -export default mergeConfig(vitestConfig, vitestEsmConfig); +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/migrate/ci.mgmt.yml b/sdk/migrate/ci.mgmt.yml index e7639fc06aed..657cfbcb0d0b 100644 --- a/sdk/migrate/ci.mgmt.yml +++ b/sdk/migrate/ci.mgmt.yml @@ -1,11 +1,13 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: - main - release/* - hotfix/* + exclude: + - feature/v4 paths: include: - sdk/migrate/ci.mgmt.yml