diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e614708fb32d..391bd0a01016 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -686,6 +686,9 @@ dependencies: '@rush-temp/arm-templatespecs': specifier: file:./projects/arm-templatespecs.tgz version: file:projects/arm-templatespecs.tgz + '@rush-temp/arm-testbase': + specifier: file:./projects/arm-testbase.tgz + version: file:projects/arm-testbase.tgz '@rush-temp/arm-timeseriesinsights': specifier: file:./projects/arm-timeseriesinsights.tgz version: file:projects/arm-timeseriesinsights.tgz @@ -4495,7 +4498,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.4.0-dev.20231107 + typescript: 5.4.0-dev.20231108 dev: false /eastasianwidth@0.2.0: @@ -9272,8 +9275,8 @@ packages: hasBin: true dev: false - /typescript@5.4.0-dev.20231107: - resolution: {integrity: sha512-4bQlfsyFjzZMo1bSLEkFJEcvuQ64pgE0S/BpdWu16lYsQOfJZtntZIyWdED3h+e96IMtVgrC6sxzfPZhj4J/dw==} + /typescript@5.4.0-dev.20231108: + resolution: {integrity: sha512-/DNtrqpbir9XaRxE6qwjhB94pCZzw/9R/PhB8309frJBEBGZ5qSDqstl7YYbhWbqs+zWpCCbwBjWDGlz8wn8GA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -15835,6 +15838,33 @@ packages: - supports-color dev: false + file:projects/arm-testbase.tgz: + resolution: {integrity: sha512-1NlH2GkGtc4B9XjM4jIijCehdah/mj59+x0U5LzE4orOrxuC57/uq/jXrygVYKcHiHXovJKe42/7yPMW6/XAqQ==, tarball: file:projects/arm-testbase.tgz} + name: '@rush-temp/arm-testbase' + version: 0.0.0 + dependencies: + '@azure/identity': 3.3.2 + '@microsoft/api-extractor': 7.38.2(@types/node@18.18.8) + '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 + '@types/node': 18.18.8 + chai: 4.3.10 + cross-env: 7.0.3 + dotenv: 16.3.1 + esm: 3.2.25 + mkdirp: 2.1.6 + mocha: 10.2.0 + rimraf: 5.0.5 + ts-node: 10.9.1(@types/node@18.18.8)(typescript@5.2.2) + tslib: 2.6.2 + typescript: 5.2.2 + uglify-js: 3.17.4 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - supports-color + dev: false + file:projects/arm-timeseriesinsights.tgz: resolution: {integrity: sha512-GrAHoKF41ufFh7t43MGgMlRonxp1hAT72VMBANaXBDIDO9l05+wN+liUOCEP+QZPqYk9gcsMkfXUGfQVcfGsPw==, tarball: file:projects/arm-timeseriesinsights.tgz} name: '@rush-temp/arm-timeseriesinsights' diff --git a/rush.json b/rush.json index da234b0c2be2..e90d8ae1f63a 100644 --- a/rush.json +++ b/rush.json @@ -1,7 +1,7 @@ /** * This is the main configuration file for Rush. * For full documentation, please see https://rushjs.io - */ { + */{ "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", /** * (Required) This specifies the version of the Rush engine to be used in this repo. @@ -2145,6 +2145,11 @@ "packageName": "@azure/arm-playwrighttesting", "projectFolder": "sdk/playwrighttesting/arm-playwrighttesting", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-testbase", + "projectFolder": "sdk/testbase/arm-testbase", + "versionPolicyName": "management" } ] -} +} \ No newline at end of file diff --git a/sdk/testbase/arm-testbase/CHANGELOG.md b/sdk/testbase/arm-testbase/CHANGELOG.md new file mode 100644 index 000000000000..4225f46b0cc6 --- /dev/null +++ b/sdk/testbase/arm-testbase/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-11-08) + +The package of @azure/arm-testbase is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/testbase/arm-testbase/LICENSE b/sdk/testbase/arm-testbase/LICENSE new file mode 100644 index 000000000000..3a1d9b6f24f7 --- /dev/null +++ b/sdk/testbase/arm-testbase/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/testbase/arm-testbase/README.md b/sdk/testbase/arm-testbase/README.md new file mode 100644 index 000000000000..9f7cadf8aa94 --- /dev/null +++ b/sdk/testbase/arm-testbase/README.md @@ -0,0 +1,109 @@ +# Azure TestBase client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure TestBase client. + +Restful APIs for Test Base Action Requests. + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/testbase/arm-testbase) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-testbase) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-testbase?view=azure-node-preview) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- Latest versions of Safari, Chrome, Edge and Firefox. + +See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-testbase` package + +Install the Azure TestBase client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-testbase +``` + +### Create and authenticate a `TestBase` + +To create a client object to access the Azure TestBase API, you will need the `endpoint` of your Azure TestBase resource and a `credential`. The Azure TestBase client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure TestBase resource in the [Azure Portal][azure_portal]. + +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azure TestBase** 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`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { TestBase } = require("@azure/arm-testbase"); +const { DefaultAzureCredential } = require("@azure/identity"); +// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. + +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new TestBase(new DefaultAzureCredential(), subscriptionId); + +// For client-side applications running in the browser, use this code instead: +// const credential = new InteractiveBrowserCredential({ +// tenantId: "", +// clientId: "" +// }); +// const client = new TestBase(credential, subscriptionId); +``` + + +### 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 + +### TestBase + +`TestBase` is the primary interface for developers using the Azure TestBase client library. Explore the methods on this client object to understand the different features of the Azure TestBase service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +## Related projects + +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Ftestbase%2Farm-testbase%2FREADME.png) + +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/testbase/arm-testbase/_meta.json b/sdk/testbase/arm-testbase/_meta.json new file mode 100644 index 000000000000..f7f82b1606ac --- /dev/null +++ b/sdk/testbase/arm-testbase/_meta.json @@ -0,0 +1,8 @@ +{ + "commit": "8de2080f4c646dfb11187827141a0af19d2034c6", + "readme": "specification/testbase/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/testbase/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@^6.0.12" +} \ No newline at end of file diff --git a/sdk/testbase/arm-testbase/api-extractor.json b/sdk/testbase/arm-testbase/api-extractor.json new file mode 100644 index 000000000000..72c592a4c194 --- /dev/null +++ b/sdk/testbase/arm-testbase/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-testbase.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/testbase/arm-testbase/package.json b/sdk/testbase/arm-testbase/package.json new file mode 100644 index 000000000000..7bbe122f7aaa --- /dev/null +++ b/sdk/testbase/arm-testbase/package.json @@ -0,0 +1,111 @@ +{ + "name": "@azure/arm-testbase", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for TestBase.", + "version": "1.0.0-beta.1", + "engines": { + "node": ">=18.0.0" + }, + "dependencies": { + "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.12.0", + "tslib": "^2.2.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-testbase.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "^7.31.1", + "mkdirp": "^2.1.2", + "typescript": "~5.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^5.0.0", + "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/identity": "^3.3.0", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.0.0", + "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "LICENSE", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" + }, + "sideEffects": false, + "//metadata": { + "constantPaths": [ + { + "path": "src/testBase.ts", + "prefix": "packageDetails" + } + ] + }, + "autoPublish": true, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/testbase/arm-testbase" +} \ No newline at end of file diff --git a/sdk/testbase/arm-testbase/review/arm-testbase.api.md b/sdk/testbase/arm-testbase/review/arm-testbase.api.md new file mode 100644 index 000000000000..747844aa7690 --- /dev/null +++ b/sdk/testbase/arm-testbase/review/arm-testbase.api.md @@ -0,0 +1,3082 @@ +## API Report File for "@azure/arm-testbase" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export type Action = string; + +// @public (undocumented) +export interface ActionRequest extends ProxyResource { + readonly creationDate?: Date; + // (undocumented) + preReleaseAccessRequestSpec?: PreReleaseAccessRequestSpec; + readonly provisioningState?: ProvisioningState; + // (undocumented) + requestType?: RequestTypes; + readonly status?: RequestStatus; +} + +// @public (undocumented) +export interface ActionRequests { + readonly nextLink?: string; + // (undocumented) + value?: ActionRequest[]; +} + +// @public +export interface ActionRequestsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ActionRequestsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ActionRequestsGetResponse = ActionRequest; + +// @public +export interface ActionRequestsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ActionRequestsListNextResponse = ActionRequests; + +// @public +export interface ActionRequestsListOptionalParams extends coreClient.OperationOptions { + // (undocumented) + requestType?: string; + top?: number; +} + +// @public +export type ActionRequestsListResponse = ActionRequests; + +// @public +export interface ActionRequestsOperations { + delete(resourceGroupName: string, testBaseAccountName: string, actionRequestName: string, options?: ActionRequestsDeleteOptionalParams): Promise; + get(resourceGroupName: string, testBaseAccountName: string, actionRequestName: string, options?: ActionRequestsGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, options?: ActionRequestsListOptionalParams): PagedAsyncIterableIterator; + put(resourceGroupName: string, testBaseAccountName: string, actionRequestName: string, options?: ActionRequestsPutOptionalParams): Promise; +} + +// @public +export interface ActionRequestsPutOptionalParams extends coreClient.OperationOptions { + // (undocumented) + actionRequest?: ActionRequest; +} + +// @public +export type ActionRequestsPutResponse = ActionRequest; + +// @public +export type ActionType = string; + +// @public +export interface AnalysisResultListResult { + readonly nextLink?: string; + value?: AnalysisResultSingletonResource[]; +} + +// @public +export type AnalysisResultName = string; + +// @public +export interface AnalysisResults { + get(resourceGroupName: string, testBaseAccountName: string, packageName: string, testResultName: string, analysisResultName: AnalysisResultName, options?: AnalysisResultsGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, packageName: string, testResultName: string, analysisResultType: AnalysisResultType, options?: AnalysisResultsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AnalysisResultsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AnalysisResultsGetResponse = AnalysisResultSingletonResource; + +// @public +export interface AnalysisResultSingletonResource extends ProxyResource { + analysisResultType?: AnalysisResultType; + grade?: Grade; +} + +// @public +export interface AnalysisResultSingletonResourceProperties { + analysisResultType: "ScriptExecution" | "Reliability" | "CPUUtilization" | "MemoryUtilization" | "CPURegression" | "MemoryRegression" | "TestAnalysis"; + grade?: Grade; +} + +// @public (undocumented) +export type AnalysisResultSingletonResourcePropertiesUnion = AnalysisResultSingletonResourceProperties | ScriptExecutionResultSingletonResourceProperties | ReliabilityResultSingletonResourceProperties | CPUUtilizationResultSingletonResourceProperties | MemoryUtilizationResultSingletonResourceProperties | CPURegressionResultSingletonResourceProperties | MemoryRegressionResultSingletonResourceProperties | TestAnalysisResultSingletonResourceProperties; + +// @public +export interface AnalysisResultsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AnalysisResultsListResponse = AnalysisResultListResult; + +// @public +export type AnalysisResultType = string; + +// @public +export type AnalysisStatus = string; + +// @public +export interface AnswerCitation { + chunkIndex?: number; + title?: string; + url?: string; +} + +// @public +export type ApplicationType = string; + +// @public +export type Architecture = string; + +// @public +export interface AvailableInplaceUpgradeOS { + get(resourceGroupName: string, testBaseAccountName: string, availableInplaceUpgradeOSResourceName: string, options?: AvailableInplaceUpgradeOSGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, osUpdateType: OsUpdateType, options?: AvailableInplaceUpgradeOSListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AvailableInplaceUpgradeOSGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableInplaceUpgradeOSGetResponse = AvailableInplaceUpgradeOSResource; + +// @public +export interface AvailableInplaceUpgradeOSListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableInplaceUpgradeOSListNextResponse = AvailableInplaceUpgradeOSListResult; + +// @public +export interface AvailableInplaceUpgradeOSListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableInplaceUpgradeOSListResponse = AvailableInplaceUpgradeOSListResult; + +// @public +export interface AvailableInplaceUpgradeOSListResult { + readonly nextLink?: string; + value?: AvailableInplaceUpgradeOSResource[]; +} + +// @public +export interface AvailableInplaceUpgradeOSResource extends ProxyResource { + readonly provisioningState?: ProvisioningState; + sourceOsName?: string; + sourceOsReleases?: ReleaseProperties[]; + supportedTargetOsNameList?: string[]; +} + +// @public +export interface AvailableOS { + get(resourceGroupName: string, testBaseAccountName: string, availableOSResourceName: string, options?: AvailableOSGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, osUpdateType: OsUpdateType, options?: AvailableOSListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AvailableOSGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableOSGetResponse = AvailableOSResource; + +// @public +export interface AvailableOSListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableOSListNextResponse = AvailableOSListResult; + +// @public +export interface AvailableOSListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableOSListResponse = AvailableOSListResult; + +// @public +export interface AvailableOSListResult { + readonly nextLink?: string; + value?: AvailableOSResource[]; +} + +// @public +export interface AvailableOSResource extends ProxyResource { + insiderChannel?: string; + osId?: string; + osName?: string; + osPlatform?: string; + osUpdateType?: string; + osVersion?: string; +} + +// @public (undocumented) +export interface BillingHubExecutionUsageDetail { + // (undocumented) + applicationName?: string; + // (undocumented) + applicationVersion?: string; + // (undocumented) + billedCharges?: number; + // (undocumented) + endTimeStamp?: Date; + // (undocumented) + executionRequestId?: string; + // (undocumented) + meterId?: string; + // (undocumented) + osBuild?: string; + // (undocumented) + release?: string; + // (undocumented) + sku?: string; + // (undocumented) + startTimeStamp?: Date; + // (undocumented) + testType?: string; + // (undocumented) + updateType?: string; + // (undocumented) + usedBillableHours?: number; + // (undocumented) + usedFreeHours?: number; +} + +// @public (undocumented) +export interface BillingHubFreeHourIncrementEntry { + // (undocumented) + createTimeStamp?: Date; + // (undocumented) + expirationTimeStamp?: Date; + // (undocumented) + freeHourStatus?: FreeHourStatus; + // (undocumented) + freeHourType?: FreeHourType; + // (undocumented) + incrementalFreeHours?: number; + // (undocumented) + remainingFreeHours?: number; +} + +// @public (undocumented) +export interface BillingHubGetFreeHourBalanceResponse { + // (undocumented) + incrementEntries?: BillingHubFreeHourIncrementEntry[]; + // (undocumented) + totalRemainingFreeHours?: number; +} + +// @public (undocumented) +export interface BillingHubGetUsageRequest { + // (undocumented) + endTimeStamp: Date; + // (undocumented) + pageIndex?: number; + // (undocumented) + pageSize?: number; + // (undocumented) + startTimeStamp: Date; +} + +// @public (undocumented) +export interface BillingHubGetUsageResponse { + // (undocumented) + nextRequest?: BillingHubGetUsageRequest; + // (undocumented) + packageUsageEntries?: BillingHubPackageUsage[]; + // (undocumented) + totalCharges?: number; + // (undocumented) + totalUsedBillableHours?: number; + // (undocumented) + totalUsedFreeHours?: number; +} + +// @public (undocumented) +export interface BillingHubPackageUsage { + // (undocumented) + applicationName?: string; + // (undocumented) + applicationVersion?: string; + // (undocumented) + azureResourceUri?: string; + // (undocumented) + totalCharges?: number; + // (undocumented) + totalUsedBillableHours?: number; + // (undocumented) + totalUsedFreeHours?: number; + // (undocumented) + usageEntriesGroupedByUpdateType?: BillingHubUsageGroupedByUpdateType[]; +} + +// @public +export interface BillingHubService { + // (undocumented) + getFreeHourBalance(resourceGroupName: string, testBaseAccountName: string, options?: BillingHubServiceGetFreeHourBalanceOptionalParams): Promise; + // (undocumented) + getUsage(resourceGroupName: string, testBaseAccountName: string, options?: BillingHubServiceGetUsageOptionalParams): Promise; +} + +// @public +export interface BillingHubServiceGetFreeHourBalanceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BillingHubServiceGetFreeHourBalanceResponse = BillingHubGetFreeHourBalanceResponse; + +// @public +export interface BillingHubServiceGetUsageOptionalParams extends coreClient.OperationOptions { + // (undocumented) + getUsageRequest?: BillingHubGetUsageRequest; +} + +// @public +export type BillingHubServiceGetUsageResponse = BillingHubGetUsageResponse; + +// @public (undocumented) +export interface BillingHubUsage { + // (undocumented) + applicationName?: string; + // (undocumented) + applicationVersion?: string; + // (undocumented) + azureResourceUri?: string; + // (undocumented) + totalCharges?: number; + // (undocumented) + totalUsedBillableHours?: number; + // (undocumented) + totalUsedFreeHours?: number; + // (undocumented) + usageGroups?: BillingHubUsageGroup[]; +} + +// @public (undocumented) +export interface BillingHubUsageGroup { + // (undocumented) + executionUsageDetails?: BillingHubExecutionUsageDetail[]; + // (undocumented) + osBuild?: string; + // (undocumented) + productFamily?: string; + // (undocumented) + release?: string; + // (undocumented) + releaseBuildDate?: Date; + // (undocumented) + releaseBuildNumber?: number; + // (undocumented) + releaseBuildRevision?: number; + // (undocumented) + testType?: string; + // (undocumented) + totalCharges?: number; + // (undocumented) + totalUsedBillableHours?: number; + // (undocumented) + totalUsedFreeHours?: number; +} + +// @public (undocumented) +export interface BillingHubUsageGroupedByUpdateType { + // (undocumented) + totalCharges?: number; + // (undocumented) + totalUsedBillableHours?: number; + // (undocumented) + totalUsedFreeHours?: number; + // (undocumented) + updateType?: string; + // (undocumented) + usageGroups?: BillingHubUsageGroup[]; +} + +// @public +export type Category = string; + +// @public +export interface ChatRequest { + question: string; +} + +// @public +export interface ChatResponse { + answer: string; + // (undocumented) + citations?: AnswerCitation[]; + readonly limit: number; + question: string; + readonly usage: number; +} + +// @public +export interface ChatSession { + beginChat(resourceGroupName: string, testBaseAccountName: string, chatSessionName: string, parameters: ChatRequest, options?: ChatSessionChatOptionalParams): Promise, ChatSessionChatResponse>>; + beginChatAndWait(resourceGroupName: string, testBaseAccountName: string, chatSessionName: string, parameters: ChatRequest, options?: ChatSessionChatOptionalParams): Promise; +} + +// @public +export interface ChatSessionChatHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface ChatSessionChatOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ChatSessionChatResponse = ChatResponse; + +// @public +export interface ChatSessionResource extends ProxyResource { + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface ChatSessionResourceListResult { + readonly nextLink?: string; + value?: ChatSessionResource[]; +} + +// @public +export interface ChatSessions { + get(resourceGroupName: string, testBaseAccountName: string, chatSessionName: string, options?: ChatSessionsGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, options?: ChatSessionsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ChatSessionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ChatSessionsGetResponse = ChatSessionResource; + +// @public +export interface ChatSessionsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ChatSessionsListNextResponse = ChatSessionResourceListResult; + +// @public +export interface ChatSessionsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ChatSessionsListResponse = ChatSessionResourceListResult; + +// @public +export interface CheckNameAvailabilityResult { + readonly message?: string; + nameAvailable?: boolean; + reason?: Reason; +} + +// @public +export interface Command { + action: Action; + alwaysRun?: boolean; + applyUpdateBefore?: boolean; + content: string; + contentType: ContentType; + enrollIntuneBefore?: boolean; + install1PAppBefore?: boolean; + maxRunTime?: number; + name: string; + postUpgrade?: boolean; + preUpgrade?: boolean; + restartAfter?: boolean; + runAsInteractive?: boolean; + runElevated?: boolean; +} + +// @public +export type ContentType = string; + +// @public +export interface CopyFromPackageOperationParameters { + packageId: string; +} + +// @public +export interface CPURegressionResultSingletonResourceProperties extends AnalysisResultSingletonResourceProperties { + analysisResultType: "CPURegression"; + cpuRegressionResults?: RegressionResult[]; +} + +// @public +export interface CPUUtilizationResultSingletonResourceProperties extends AnalysisResultSingletonResourceProperties { + analysisResultType: "CPUUtilization"; + cpuUtilizationResults?: UtilizationResult[]; +} + +// @public +export type CreatedByType = string; + +// @public +interface Credential_2 { + get(resourceGroupName: string, testBaseAccountName: string, credentialName: string, options?: CredentialGetOptionalParams): Promise; + listByTestBaseAccount(resourceGroupName: string, testBaseAccountName: string, options?: CredentialListByTestBaseAccountOptionalParams): PagedAsyncIterableIterator; +} +export { Credential_2 as Credential } + +// @public +export interface CredentialGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CredentialGetResponse = CredentialResource; + +// @public +export interface CredentialListByTestBaseAccountNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CredentialListByTestBaseAccountNextResponse = CredentialListResult; + +// @public +export interface CredentialListByTestBaseAccountOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CredentialListByTestBaseAccountResponse = CredentialListResult; + +// @public +export interface CredentialListResult { + readonly nextLink?: string; + value?: CredentialResource[]; +} + +// @public +export interface CredentialProperties { + credentialType: "IntuneAccount"; + displayName: string; +} + +// @public (undocumented) +export type CredentialPropertiesUnion = CredentialProperties | IntuneSingletonResourceProperties; + +// @public +export interface CredentialResource extends ProxyResource { + credentialType?: CredentialType; + displayName?: string; +} + +// @public +export interface Credentials { + create(resourceGroupName: string, testBaseAccountName: string, credentialName: string, parameters: CredentialResource, options?: CredentialsCreateOptionalParams): Promise; + delete(resourceGroupName: string, testBaseAccountName: string, credentialName: string, options?: CredentialsDeleteOptionalParams): Promise; + update(resourceGroupName: string, testBaseAccountName: string, credentialName: string, parameters: CredentialResource, options?: CredentialsUpdateOptionalParams): Promise; +} + +// @public +export interface CredentialsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CredentialsCreateResponse = CredentialResource; + +// @public +export interface CredentialsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface CredentialsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CredentialsUpdateResponse = CredentialResource; + +// @public +export type CredentialType = string; + +// @public +export interface CustomerEventListResult { + readonly nextLink?: string; + value?: CustomerEventResource[]; +} + +// @public +export interface CustomerEventResource extends ProxyResource { + eventName?: string; + receivers?: NotificationEventReceiver[]; +} + +// @public +export interface CustomerEvents { + beginCreate(resourceGroupName: string, testBaseAccountName: string, customerEventName: string, parameters: CustomerEventResource, options?: CustomerEventsCreateOptionalParams): Promise, CustomerEventsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, testBaseAccountName: string, customerEventName: string, parameters: CustomerEventResource, options?: CustomerEventsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, testBaseAccountName: string, customerEventName: string, options?: CustomerEventsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, testBaseAccountName: string, customerEventName: string, options?: CustomerEventsDeleteOptionalParams): Promise; + get(resourceGroupName: string, testBaseAccountName: string, customerEventName: string, options?: CustomerEventsGetOptionalParams): Promise; + listByTestBaseAccount(resourceGroupName: string, testBaseAccountName: string, options?: CustomerEventsListByTestBaseAccountOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CustomerEventsCreateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface CustomerEventsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CustomerEventsCreateResponse = CustomerEventResource; + +// @public +export interface CustomerEventsDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CustomerEventsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CustomerEventsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CustomerEventsGetResponse = CustomerEventResource; + +// @public +export interface CustomerEventsListByTestBaseAccountNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CustomerEventsListByTestBaseAccountNextResponse = CustomerEventListResult; + +// @public +export interface CustomerEventsListByTestBaseAccountOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CustomerEventsListByTestBaseAccountResponse = CustomerEventListResult; + +// @public +export interface CustomImageListResult { + readonly nextLink?: string; + value?: CustomImageResource[]; +} + +// @public +export interface CustomImageResource extends ProxyResource { + readonly creationTime?: Date; + definitionName?: string; + readonly osDiskImageSizeInGB?: number; + readonly product?: string; + readonly provisioningState?: ProvisioningState; + readonly release?: string; + readonly releaseVersionDate?: Date; + source?: ImageSource; + readonly status?: ImageStatus; + readonly validationResults?: ImageValidationResults; + versionName?: string; + readonly vhdFileName?: string; + vhdId?: string; +} + +// @public +export interface CustomImages { + beginCreate(resourceGroupName: string, testBaseAccountName: string, customImageName: string, parameters: CustomImageResource, options?: CustomImagesCreateOptionalParams): Promise, CustomImagesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, testBaseAccountName: string, customImageName: string, parameters: CustomImageResource, options?: CustomImagesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, testBaseAccountName: string, customImageName: string, options?: CustomImagesDeleteOptionalParams): Promise, CustomImagesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, testBaseAccountName: string, customImageName: string, options?: CustomImagesDeleteOptionalParams): Promise; + checkImageNameAvailability(resourceGroupName: string, testBaseAccountName: string, parameters: ImageNameCheckAvailabilityParameters, options?: CustomImagesCheckImageNameAvailabilityOptionalParams): Promise; + get(resourceGroupName: string, testBaseAccountName: string, customImageName: string, options?: CustomImagesGetOptionalParams): Promise; + listByTestBaseAccount(resourceGroupName: string, testBaseAccountName: string, options?: CustomImagesListByTestBaseAccountOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CustomImagesCheckImageNameAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CustomImagesCheckImageNameAvailabilityResponse = VerificationResult; + +// @public +export interface CustomImagesCreateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface CustomImagesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CustomImagesCreateResponse = CustomImageResource; + +// @public +export interface CustomImagesDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CustomImagesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CustomImagesDeleteResponse = CustomImagesDeleteHeaders; + +// @public +export interface CustomImagesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CustomImagesGetResponse = CustomImageResource; + +// @public +export interface CustomImagesListByTestBaseAccountNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CustomImagesListByTestBaseAccountNextResponse = CustomImageListResult; + +// @public +export interface CustomImagesListByTestBaseAccountOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CustomImagesListByTestBaseAccountResponse = CustomImageListResult; + +// @public +export interface DistributionGroupListReceiverValue { + distributionGroups?: string[]; +} + +// @public +export interface DownloadURLResponse { + readonly downloadUrl?: string; + readonly expirationTime?: Date; +} + +// @public +export interface DraftPackageGetPathResponse { + readonly baseUrl?: string; + readonly draftPackagePath?: string; + readonly expirationTime?: Date; + readonly sasToken?: string; + readonly workingPath?: string; +} + +// @public +export interface DraftPackageIntuneAppMetadata { + intuneApp?: DraftPackageIntuneAppMetadataItem; + intuneAppDependencies?: DraftPackageIntuneAppMetadataItem[]; +} + +// @public +export interface DraftPackageIntuneAppMetadataItem { + appId?: string; + appName?: string; + createDate?: Date; + dependencyIds?: string[]; + dependentAppCount?: number; + description?: string; + expectedExitCodes?: string[]; + installCommand?: string; + lastProcessed?: number; + minimumSupportedOS?: string; + owner?: string; + publisher?: string; + setupFile?: string; + status?: IntuneExtractStatus; + uninstallCommand?: string; + version?: string; +} + +// @public +export interface DraftPackageListResult { + readonly nextLink?: string; + value?: DraftPackageResource[]; +} + +// @public +export interface DraftPackageResource extends ProxyResource { + appFileName?: string; + applicationName?: string; + comments?: string; + readonly draftPackagePath?: string; + editPackage?: boolean; + executableLaunchCommand?: string; + firstPartyApps?: FirstPartyAppDefinition[]; + flightingRing?: string; + galleryApps?: GalleryAppDefinition[]; + highlightedFiles?: HighlightedFile[]; + inplaceUpgradeOSPair?: InplaceUpgradeOSInfo; + intuneEnrollmentMetadata?: IntuneEnrollmentMetadata; + intuneMetadata?: DraftPackageIntuneAppMetadata; + readonly lastModifiedTime?: Date; + packageId?: string; + packageTags?: { + [propertyName: string]: string; + }; + processName?: string; + readonly provisioningState?: ProvisioningState; + sourceType?: DraftPackageSourceType; + tabState?: TabState; + targetOSList?: TargetOSInfo[]; + tests?: Test[]; + testTypes?: TestType[]; + useAutofill?: boolean; + useSample?: boolean; + version?: string; + readonly workingPath?: string; +} + +// @public +export interface DraftPackages { + beginCopyFromPackage(resourceGroupName: string, testBaseAccountName: string, draftPackageName: string, parameters: CopyFromPackageOperationParameters, options?: DraftPackagesCopyFromPackageOptionalParams): Promise, DraftPackagesCopyFromPackageResponse>>; + beginCopyFromPackageAndWait(resourceGroupName: string, testBaseAccountName: string, draftPackageName: string, parameters: CopyFromPackageOperationParameters, options?: DraftPackagesCopyFromPackageOptionalParams): Promise; + beginExtractFile(resourceGroupName: string, testBaseAccountName: string, draftPackageName: string, parameters: ExtractFileOperationParameters, options?: DraftPackagesExtractFileOptionalParams): Promise, DraftPackagesExtractFileResponse>>; + beginExtractFileAndWait(resourceGroupName: string, testBaseAccountName: string, draftPackageName: string, parameters: ExtractFileOperationParameters, options?: DraftPackagesExtractFileOptionalParams): Promise; + beginGenerateFoldersAndScripts(resourceGroupName: string, testBaseAccountName: string, draftPackageName: string, parameters: GenerateOperationParameters, options?: DraftPackagesGenerateFoldersAndScriptsOptionalParams): Promise, DraftPackagesGenerateFoldersAndScriptsResponse>>; + beginGenerateFoldersAndScriptsAndWait(resourceGroupName: string, testBaseAccountName: string, draftPackageName: string, parameters: GenerateOperationParameters, options?: DraftPackagesGenerateFoldersAndScriptsOptionalParams): Promise; + create(resourceGroupName: string, testBaseAccountName: string, draftPackageName: string, parameters: DraftPackageResource, options?: DraftPackagesCreateOptionalParams): Promise; + delete(resourceGroupName: string, testBaseAccountName: string, draftPackageName: string, options?: DraftPackagesDeleteOptionalParams): Promise; + get(resourceGroupName: string, testBaseAccountName: string, draftPackageName: string, options?: DraftPackagesGetOptionalParams): Promise; + getPath(resourceGroupName: string, testBaseAccountName: string, draftPackageName: string, options?: DraftPackagesGetPathOptionalParams): Promise; + listByTestBaseAccount(resourceGroupName: string, testBaseAccountName: string, options?: DraftPackagesListByTestBaseAccountOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, testBaseAccountName: string, draftPackageName: string, parameters: DraftPackageUpdateParameters, options?: DraftPackagesUpdateOptionalParams): Promise; +} + +// @public +export interface DraftPackagesCopyFromPackageHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface DraftPackagesCopyFromPackageOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DraftPackagesCopyFromPackageResponse = DraftPackagesCopyFromPackageHeaders; + +// @public +export interface DraftPackagesCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DraftPackagesCreateResponse = DraftPackageResource; + +// @public +export interface DraftPackagesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface DraftPackagesExtractFileHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface DraftPackagesExtractFileOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DraftPackagesExtractFileResponse = DraftPackagesExtractFileHeaders; + +// @public +export interface DraftPackagesGenerateFoldersAndScriptsHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface DraftPackagesGenerateFoldersAndScriptsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DraftPackagesGenerateFoldersAndScriptsResponse = DraftPackagesGenerateFoldersAndScriptsHeaders; + +// @public +export interface DraftPackagesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface DraftPackagesGetPathOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DraftPackagesGetPathResponse = DraftPackageGetPathResponse; + +// @public +export type DraftPackagesGetResponse = DraftPackageResource; + +// @public +export interface DraftPackagesListByTestBaseAccountNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DraftPackagesListByTestBaseAccountNextResponse = DraftPackageListResult; + +// @public +export interface DraftPackagesListByTestBaseAccountOptionalParams extends coreClient.OperationOptions { + editPackage?: boolean; + packageName?: string; +} + +// @public +export type DraftPackagesListByTestBaseAccountResponse = DraftPackageListResult; + +// @public +export type DraftPackageSourceType = string; + +// @public +export interface DraftPackagesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DraftPackagesUpdateResponse = DraftPackageResource; + +// @public +export interface DraftPackageUpdateParameters { + appFileName?: string; + applicationName?: string; + comments?: string; + executableLaunchCommand?: string; + firstPartyApps?: FirstPartyAppDefinition[]; + flightingRing?: string; + galleryApps?: GalleryAppDefinition[]; + highlightedFiles?: HighlightedFile[]; + inplaceUpgradeOSPair?: InplaceUpgradeOSInfo; + intuneEnrollmentMetadata?: IntuneEnrollmentMetadata; + intuneMetadata?: DraftPackageIntuneAppMetadata; + packageId?: string; + packageTags?: { + [propertyName: string]: string; + }; + processName?: string; + sourceType?: DraftPackageSourceType; + tabState?: TabState; + targetOSList?: TargetOSInfo[]; + tests?: Test[]; + testTypes?: TestType[]; + useAutofill?: boolean; + useSample?: boolean; + version?: string; +} + +// @public +export interface EmailEventListResult { + readonly nextLink?: string; + value?: EmailEventResource[]; +} + +// @public +export interface EmailEventResource extends ProxyResource { + displayName?: string; + eventId?: string; + eventName?: string; +} + +// @public +export interface EmailEvents { + get(resourceGroupName: string, testBaseAccountName: string, emailEventResourceName: string, options?: EmailEventsGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, options?: EmailEventsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface EmailEventsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EmailEventsGetResponse = EmailEventResource; + +// @public +export interface EmailEventsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EmailEventsListNextResponse = EmailEventListResult; + +// @public +export interface EmailEventsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EmailEventsListResponse = EmailEventListResult; + +// @public +export type Engagements = string; + +// @public +export interface EnrolledIntuneApp { + appId: string; + appName: string; + expectedInstallationPath: 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 ErrorResponse { + error?: ErrorDetail; +} + +// @public +export type ExecutionStatus = string; + +// @public +export interface ExtractFileOperationParameters { + fileType?: ExtractFileType; + intuneAppId?: string; + sourceFile: string; +} + +// @public +export type ExtractFileType = string; + +// @public +export interface FavoriteProcesses { + create(resourceGroupName: string, testBaseAccountName: string, packageName: string, favoriteProcessResourceName: string, parameters: FavoriteProcessResource, options?: FavoriteProcessesCreateOptionalParams): Promise; + delete(resourceGroupName: string, testBaseAccountName: string, packageName: string, favoriteProcessResourceName: string, options?: FavoriteProcessesDeleteOptionalParams): Promise; + get(resourceGroupName: string, testBaseAccountName: string, packageName: string, favoriteProcessResourceName: string, options?: FavoriteProcessesGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, packageName: string, options?: FavoriteProcessesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FavoriteProcessesCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FavoriteProcessesCreateResponse = FavoriteProcessResource; + +// @public +export interface FavoriteProcessesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface FavoriteProcessesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FavoriteProcessesGetResponse = FavoriteProcessResource; + +// @public +export interface FavoriteProcessesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FavoriteProcessesListNextResponse = FavoriteProcessListResult; + +// @public +export interface FavoriteProcessesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FavoriteProcessesListResponse = FavoriteProcessListResult; + +// @public +export interface FavoriteProcessListResult { + readonly nextLink?: string; + value?: FavoriteProcessResource[]; +} + +// @public +export interface FavoriteProcessResource extends ProxyResource { + actualProcessName?: string; +} + +// @public +export interface FeatureUpdateSupportedOses { + list(resourceGroupName: string, testBaseAccountName: string, options?: FeatureUpdateSupportedOsesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FeatureUpdateSupportedOsesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FeatureUpdateSupportedOsesListNextResponse = FeatureUpdateSupportedOsesResult; + +// @public +export interface FeatureUpdateSupportedOsesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FeatureUpdateSupportedOsesListResponse = FeatureUpdateSupportedOsesResult; + +// @public +export interface FeatureUpdateSupportedOsesResource extends ProxyResource { + // (undocumented) + baselineProducts?: string[]; + // (undocumented) + displayText?: string; + // (undocumented) + insiderChannel?: string; + // (undocumented) + osId?: string; + // (undocumented) + osName?: string; + startTime?: Date; + state?: OsProductState; + // (undocumented) + version?: string; +} + +// @public +export interface FeatureUpdateSupportedOsesResult { + readonly nextLink?: string; + // (undocumented) + value?: FeatureUpdateSupportedOsesResource[]; +} + +// @public +export type FileUploadResourceType = string; + +// @public +export interface FileUploadURLResponse { + readonly blobPath?: string; + readonly uploadUrl?: string; +} + +// @public +export interface FirstPartyAppDefinition { + architecture?: Architecture; + channel?: string; + interopExecutionMode?: InteropExecutionMode; + name?: string; + ring?: string; +} + +// @public +export interface FirstPartyAppListResult { + readonly nextLink?: string; + value?: FirstPartyAppResource[]; +} + +// @public +export interface FirstPartyAppResource extends ProxyResource { + architecture?: Architecture; + channel?: string; + mediaType?: string; + readonly provisioningState?: ProvisioningState; + ring?: string; + supportedProducts?: string[]; +} + +// @public +export interface FirstPartyApps { + get(resourceGroupName: string, testBaseAccountName: string, firstPartyAppResourceName: string, options?: FirstPartyAppsGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, options?: FirstPartyAppsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FirstPartyAppsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirstPartyAppsGetResponse = FirstPartyAppResource; + +// @public +export interface FirstPartyAppsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirstPartyAppsListNextResponse = FirstPartyAppListResult; + +// @public +export interface FirstPartyAppsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FirstPartyAppsListResponse = FirstPartyAppListResult; + +// @public +export interface FlightingRingListResult { + readonly nextLink?: string; + value?: FlightingRingResource[]; +} + +// @public +export interface FlightingRingResource extends ProxyResource { + actualFlightingRingName?: string; +} + +// @public +export interface FlightingRings { + get(resourceGroupName: string, testBaseAccountName: string, flightingRingResourceName: string, options?: FlightingRingsGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, options?: FlightingRingsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FlightingRingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FlightingRingsGetResponse = FlightingRingResource; + +// @public +export interface FlightingRingsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FlightingRingsListNextResponse = FlightingRingListResult; + +// @public +export interface FlightingRingsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FlightingRingsListResponse = FlightingRingListResult; + +// @public +export type FreeHourBalanceName = string; + +// @public +export interface FreeHourBalanceResource extends ProxyResource { + // (undocumented) + incrementEntries?: BillingHubFreeHourIncrementEntry[]; + // (undocumented) + totalRemainingFreeHours?: number; +} + +// @public +export interface FreeHourBalances { + get(resourceGroupName: string, testBaseAccountName: string, freeHourBalanceName: FreeHourBalanceName, options?: FreeHourBalancesGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, options?: FreeHourBalancesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FreeHourBalancesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FreeHourBalancesGetResponse = FreeHourBalanceResource; + +// @public +export interface FreeHourBalancesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FreeHourBalancesListNextResponse = FreeHourBalancesListResult; + +// @public +export interface FreeHourBalancesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FreeHourBalancesListResponse = FreeHourBalancesListResult; + +// @public +export interface FreeHourBalancesListResult { + readonly nextLink?: string; + value?: FreeHourBalanceResource[]; +} + +// @public +export type FreeHourStatus = string; + +// @public +export type FreeHourType = string; + +// @public +export interface GalleryAppDefinition { + isConsented?: boolean; + skuId: string; +} + +// @public +export interface GalleryAppListResult { + readonly nextLink?: string; + value?: GalleryAppResource[]; +} + +// @public +export interface GalleryAppResource extends ProxyResource { + applicationId?: string; + applicationName?: string; + applicationType?: ApplicationType; + popularity?: number; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface GalleryApps { + get(resourceGroupName: string, testBaseAccountName: string, galleryAppName: string, options?: GalleryAppsGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, options?: GalleryAppsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GalleryAppsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryAppsGetResponse = GalleryAppResource; + +// @public +export interface GalleryAppSkuListResult { + readonly nextLink?: string; + value?: GalleryAppSkuResource[]; +} + +// @public +export interface GalleryAppSkuProperties { + applicationType: "Winget"; + readonly provisioningState?: ProvisioningState; +} + +// @public (undocumented) +export type GalleryAppSkuPropertiesUnion = GalleryAppSkuProperties | WingetAppSkuProperties; + +// @public +export interface GalleryAppSkuResource extends ProxyResource { + applicationType?: ApplicationType; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface GalleryAppSkus { + get(resourceGroupName: string, testBaseAccountName: string, galleryAppName: string, galleryAppSkuName: string, options?: GalleryAppSkusGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, galleryAppName: string, options?: GalleryAppSkusListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GalleryAppSkusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryAppSkusGetResponse = GalleryAppSkuResource; + +// @public +export interface GalleryAppSkusListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryAppSkusListNextResponse = GalleryAppSkuListResult; + +// @public +export interface GalleryAppSkusListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryAppSkusListResponse = GalleryAppSkuListResult; + +// @public +export interface GalleryAppsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryAppsListNextResponse = GalleryAppListResult; + +// @public +export interface GalleryAppsListOptionalParams extends coreClient.OperationOptions { + applicationType?: ApplicationType; + keyword?: string; + orderBy?: OrderBy; + top?: number; +} + +// @public +export type GalleryAppsListResponse = GalleryAppListResult; + +// @public +export interface GenerateOperationParameters { + forceGenerate?: boolean; +} + +// @public +export function getContinuationToken(page: unknown): string | undefined; + +// @public +export interface GetFileUploadURLParameters { + blobName?: string; + resourceType?: FileUploadResourceType; +} + +// @public +export interface GetImageDefinitionParameters { + definitionName?: string; +} + +// @public +export type Grade = string; + +// @public +export interface HighlightedFile { + path: string; + sections?: string[]; + visited?: boolean; +} + +// @public +export interface IdentifiedFailure { + category?: Category; + errorMessage?: string; + failureId?: string; + guidance?: string; +} + +// @public +export type ImageArchitecture = string; + +// @public +export interface ImageDefinitionListResult { + readonly nextLink?: string; + value?: ImageDefinitionResource[]; +} + +// @public +export interface ImageDefinitionResource extends ProxyResource { + architecture?: ImageArchitecture; + osState?: ImageOSState; + readonly provisioningState?: string; + securityType?: ImageSecurityType; +} + +// @public +export interface ImageDefinitions { + create(resourceGroupName: string, testBaseAccountName: string, imageDefinitionName: string, parameters: ImageDefinitionResource, options?: ImageDefinitionsCreateOptionalParams): Promise; + delete(resourceGroupName: string, testBaseAccountName: string, imageDefinitionName: string, options?: ImageDefinitionsDeleteOptionalParams): Promise; + get(resourceGroupName: string, testBaseAccountName: string, imageDefinitionName: string, options?: ImageDefinitionsGetOptionalParams): Promise; + listByTestBaseAccount(resourceGroupName: string, testBaseAccountName: string, options?: ImageDefinitionsListByTestBaseAccountOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ImageDefinitionsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ImageDefinitionsCreateResponse = ImageDefinitionResource; + +// @public +export interface ImageDefinitionsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ImageDefinitionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ImageDefinitionsGetResponse = ImageDefinitionResource; + +// @public +export interface ImageDefinitionsListByTestBaseAccountNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ImageDefinitionsListByTestBaseAccountNextResponse = ImageDefinitionsListResult; + +// @public +export interface ImageDefinitionsListByTestBaseAccountOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ImageDefinitionsListByTestBaseAccountResponse = ImageDefinitionsListResult; + +// @public +export interface ImageDefinitionsListResult { + readonly nextLink?: string; + value?: ImageDefinitionResource[]; +} + +// @public +export interface ImageNameCheckAvailabilityParameters { + definitionName: string; + versionName: string; +} + +// @public +export type ImageOSState = string; + +// @public +export type ImageSecurityType = string; + +// @public +export type ImageSource = string; + +// @public +export type ImageStatus = string; + +// @public +export interface ImageValidationResults { + results?: VerificationResult[]; +} + +// @public +export interface InplaceUpgradeOSInfo { + baselineOS?: OsProperties; + targetOS?: string; +} + +// @public +export interface InplaceUpgradeProperties { + baselineBuildNumber?: string; + baselineBuildRevision?: string; + baselineKbNumber?: string; + baselineOsName?: string; + baselineReleaseName?: string; + baselineReleaseVersionDate?: Date; + customImageDisplayName?: string; + customImageId?: string; + upgradeEndTime?: Date; + upgradeStartTime?: Date; +} + +// @public +export type InteropExecutionMode = string; + +// @public +export interface IntuneEnrollmentMetadata { + appList?: EnrolledIntuneApp[]; + credentialId?: string; + expectedDeploymentDurationInMinute?: number; +} + +// @public +export type IntuneExtractStatus = string; + +// @public +export interface IntuneSingletonResourceProperties extends CredentialProperties { + credentialType: "IntuneAccount"; + passwordKeyVaultSecretPath?: string; + userNameKeyVaultSecretPath?: string; +} + +// @public +export enum KnownAction { + Close = "Close", + Custom = "Custom", + FlowDrivenCustom = "FlowDrivenCustom", + Install = "Install", + Launch = "Launch", + Uninstall = "Uninstall" +} + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownAnalysisResultName { + CpuRegression = "cpuRegression", + CpuUtilization = "cpuUtilization", + MemoryRegression = "memoryRegression", + MemoryUtilization = "memoryUtilization", + Reliability = "reliability", + ScriptExecution = "scriptExecution", + TestAnalysis = "testAnalysis" +} + +// @public +export enum KnownAnalysisResultType { + CPURegression = "CPURegression", + CPUUtilization = "CPUUtilization", + MemoryRegression = "MemoryRegression", + MemoryUtilization = "MemoryUtilization", + Reliability = "Reliability", + ScriptExecution = "ScriptExecution", + TestAnalysis = "TestAnalysis" +} + +// @public +export enum KnownAnalysisStatus { + Available = "Available", + Completed = "Completed", + Failed = "Failed", + InProgress = "InProgress", + None = "None", + NotAvailable = "NotAvailable", + Succeeded = "Succeeded" +} + +// @public +export enum KnownApplicationType { + Winget = "Winget" +} + +// @public +export enum KnownArchitecture { + Arm64 = "arm64", + X64 = "x64", + X86 = "x86" +} + +// @public +export enum KnownCategory { + Infrastructure = "Infrastructure", + None = "None", + OSUpdate = "OSUpdate", + Package = "Package", + Unidentified = "Unidentified" +} + +// @public +export enum KnownContentType { + File = "File", + Inline = "Inline", + Path = "Path" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + +// @public +export enum KnownCredentialType { + IntuneAccount = "IntuneAccount" +} + +// @public +export enum KnownDraftPackageSourceType { + GalleryApp = "GalleryApp", + IntuneEnrollment = "IntuneEnrollment", + IntuneWin = "IntuneWin", + Native = "Native", + TestBasePackage = "TestBasePackage" +} + +// @public +export enum KnownEngagements { + Mapp = "MAPP", + MVI = "MVI", + MVP = "MVP", + Other = "Other", + Suvp = "SUVP" +} + +// @public +export enum KnownExecutionStatus { + Completed = "Completed", + Failed = "Failed", + Incomplete = "Incomplete", + InProgress = "InProgress", + None = "None", + NotExecuted = "NotExecuted", + Processing = "Processing", + Succeeded = "Succeeded" +} + +// @public +export enum KnownExtractFileType { + IntuneWinPackage = "IntuneWinPackage", + TestBasePackage = "TestBasePackage" +} + +// @public +export enum KnownFileUploadResourceType { + Package = "Package", + VHD = "VHD" +} + +// @public +export enum KnownFreeHourBalanceName { + SubscriptionLevel = "SubscriptionLevel", + TenantLevel = "TenantLevel" +} + +// @public +export enum KnownFreeHourStatus { + Enabled = "Enabled", + Suspended = "Suspended" +} + +// @public +export enum KnownFreeHourType { + Permanent = "Permanent", + Temporary = "Temporary" +} + +// @public +export enum KnownGrade { + Fail = "Fail", + None = "None", + NotAvailable = "NotAvailable", + Pass = "Pass" +} + +// @public +export enum KnownImageArchitecture { + X64 = "x64" +} + +// @public +export enum KnownImageOSState { + Generalized = "Generalized", + Specialized = "Specialized" +} + +// @public +export enum KnownImageSecurityType { + Standard = "Standard", + TrustedLaunch = "TrustedLaunch" +} + +// @public +export enum KnownImageSource { + Unknown = "Unknown", + VHD = "VHD" +} + +// @public +export enum KnownImageStatus { + Failed = "Failed", + Ready = "Ready", + Unknown = "Unknown", + Validating = "Validating" +} + +// @public +export enum KnownInteropExecutionMode { + FirstPartyApp = "firstPartyApp", + FirstPartyAppWithTests = "firstPartyAppWithTests" +} + +// @public +export enum KnownIntuneExtractStatus { + ExtractFailed = "ExtractFailed", + NoDependencyApp = "NoDependencyApp", + Ready = "Ready", + UploadFailed = "UploadFailed", + Uploading = "Uploading" +} + +// @public +export enum KnownOrderBy { + Popularity = "popularity", + Relevance = "relevance" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownOsProductState { + Active = "Active", + Disabled = "Disabled" +} + +// @public +export enum KnownOsUpdateType { + FeatureUpdate = "FeatureUpdate", + InplaceUpgrade = "InplaceUpgrade", + SecurityUpdate = "SecurityUpdate" +} + +// @public +export enum KnownPackageStatus { + Deleted = "Deleted", + Error = "Error", + PreValidationCheckPass = "PreValidationCheckPass", + Ready = "Ready", + Registered = "Registered", + Unknown = "Unknown", + ValidatingPackage = "ValidatingPackage", + ValidationLongerThanUsual = "ValidationLongerThanUsual", + VerifyingPackage = "VerifyingPackage" +} + +// @public +export enum KnownPackageStudioTabs { + BasicsTab = "BasicsTab", + ConfigureTestTab = "ConfigureTestTab", + EditPackageTab = "EditPackageTab", + ReviewAndCreateTab = "ReviewAndCreateTab", + TagsTab = "TagsTab", + TestMatrixTab = "TestMatrixTab", + Unspecified = "Unspecified" +} + +// @public +export enum KnownProvisioningState { + Cancelled = "Cancelled", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownReason { + AlreadyExists = "AlreadyExists", + Invalid = "Invalid" +} + +// @public +export enum KnownRequestStatus { + Approved = "Approved", + Declined = "Declined", + InReview = "InReview" +} + +// @public +export enum KnownRequestTypes { + PreReleaseAccess = "PreReleaseAccess" +} + +// @public +export enum KnownSystemAssignedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned" +} + +// @public +export enum KnownTestAnalysisStatus { + Analyzing = "Analyzing", + Completed = "Completed", + Failed = "Failed", + None = "None" +} + +// @public +export enum KnownTestStatus { + Completed = "Completed", + DataProcessing = "DataProcessing", + InfrastructureFailure = "InfrastructureFailure", + None = "None", + TestAndUpdateFailure = "TestAndUpdateFailure", + TestExecutionInProgress = "TestExecutionInProgress", + TestFailure = "TestFailure", + UpdateFailure = "UpdateFailure" +} + +// @public +export enum KnownTestType { + FlowDrivenTest = "FlowDrivenTest", + FunctionalTest = "FunctionalTest", + OutOfBoxTest = "OutOfBoxTest" +} + +// @public +export enum KnownTier { + Standard = "Standard" +} + +// @public +export enum KnownType { + FeatureUpdate = "FeatureUpdate", + InplaceUpgrade = "InplaceUpgrade", + SecurityUpdate = "SecurityUpdate" +} + +// @public +export enum KnownValidationRunStatus { + Failed = "Failed", + Passed = "Passed", + Pending = "Pending", + Unknown = "Unknown" +} + +// @public +export enum KnownVerificationStatus { + Failed = "Failed", + Passed = "Passed" +} + +// @public +export enum KnownVHDStatus { + Failed = "Failed", + Occupied = "Occupied", + Ready = "Ready", + Unknown = "Unknown", + Verifying = "Verifying" +} + +// @public +export interface MemoryRegressionResultSingletonResourceProperties extends AnalysisResultSingletonResourceProperties { + analysisResultType: "MemoryRegression"; + memoryRegressionResults?: RegressionResult[]; +} + +// @public +export interface MemoryUtilizationResultSingletonResourceProperties extends AnalysisResultSingletonResourceProperties { + analysisResultType: "MemoryUtilization"; + memoryUtilizationResults?: UtilizationResult[]; +} + +// @public +export interface NotificationEventReceiver { + receiverType?: string; + receiverValue?: NotificationReceiverValue; +} + +// @public +export interface NotificationReceiverValue { + distributionGroupListReceiverValue?: DistributionGroupListReceiverValue; + subscriptionReceiverValue?: SubscriptionReceiverValue; + userObjectReceiverValue?: UserObjectReceiverValue; +} + +// @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 interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationListResult; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export type OrderBy = string; + +// @public +export type Origin = string; + +// @public +export type OsProductState = string; + +// @public +export interface OsProperties { + readonly customImageDisplayName?: string; + customImageId?: string; + osName?: string; + releaseProperties?: ReleaseProperties; +} + +// @public +export interface OSUpdateListResult { + readonly nextLink?: string; + value?: OSUpdateResource[]; +} + +// @public +export interface OSUpdateResource extends ProxyResource { + buildRevision?: string; + buildVersion?: string; + customImageDisplayName?: string; + customImageId?: string; + flightingRing?: string; + inplaceUpgradeBaselineProperties?: OsProperties; + osName?: string; + release?: string; + releaseVersionDate?: Date; + typePropertiesType?: Type; +} + +// @public +export interface OSUpdates { + get(resourceGroupName: string, testBaseAccountName: string, packageName: string, osUpdateResourceName: string, options?: OSUpdatesGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, packageName: string, osUpdateType: OsUpdateType, options?: OSUpdatesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OSUpdatesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OSUpdatesGetResponse = OSUpdateResource; + +// @public +export interface OSUpdatesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OSUpdatesListNextResponse = OSUpdateListResult; + +// @public +export interface OSUpdatesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OSUpdatesListResponse = OSUpdateListResult; + +// @public +export interface OSUpdatesTestSummary { + executionStatus?: ExecutionStatus; + grade?: Grade; + osUpdateTestSummaries?: OSUpdateTestSummary[]; + testRunTime?: string; + testStatus?: TestStatus; +} + +// @public +export interface OSUpdateTestSummary { + buildRevision?: string; + buildVersion?: string; + customImageDisplayName?: string; + customImageId?: string; + executionStatus?: ExecutionStatus; + flightingRing?: string; + grade?: Grade; + inplaceUpgradeBaselineProperties?: OsProperties; + osName?: string; + releaseName?: string; + releaseVersionDate?: Date; + testRunTime?: string; + testStatus?: TestStatus; + testType?: string; +} + +// @public +export type OsUpdateType = string; + +// @public +export interface PackageCheckNameAvailabilityParameters { + applicationName: string; + name: string; + type?: string; + version: string; +} + +// @public +export interface PackageListResult { + readonly nextLink?: string; + value?: PackageResource[]; +} + +// @public +export interface PackageResource extends TrackedResource { + applicationName?: string; + blobPath?: string; + draftPackageId?: string; + firstPartyApps?: FirstPartyAppDefinition[]; + flightingRing?: string; + readonly galleryApps?: GalleryAppDefinition[]; + inplaceUpgradeOSPair?: InplaceUpgradeOSInfo; + intuneEnrollmentMetadata?: IntuneEnrollmentMetadata; + readonly isEnabled?: boolean; + readonly lastModifiedTime?: Date; + readonly packageStatus?: PackageStatus; + readonly provisioningState?: ProvisioningState; + targetOSList?: TargetOSInfo[]; + tests?: Test[]; + readonly testTypes?: TestType[]; + readonly validationResults?: PackageValidationResult[]; + version?: string; +} + +// @public +export interface PackageRunTestParameters { + customImageId?: string; + flightingRing?: string; + osName?: string; + osUpdateType?: OsUpdateType; + releaseName?: string; + testType?: TestType; +} + +// @public +export interface Packages { + beginCreate(resourceGroupName: string, testBaseAccountName: string, packageName: string, parameters: PackageResource, options?: PackagesCreateOptionalParams): Promise, PackagesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, testBaseAccountName: string, packageName: string, parameters: PackageResource, options?: PackagesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, testBaseAccountName: string, packageName: string, options?: PackagesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, testBaseAccountName: string, packageName: string, options?: PackagesDeleteOptionalParams): Promise; + beginHardDelete(resourceGroupName: string, testBaseAccountName: string, packageName: string, options?: PackagesHardDeleteOptionalParams): Promise, void>>; + beginHardDeleteAndWait(resourceGroupName: string, testBaseAccountName: string, packageName: string, options?: PackagesHardDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, testBaseAccountName: string, packageName: string, parameters: PackageUpdateParameters, options?: PackagesUpdateOptionalParams): Promise, PackagesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, testBaseAccountName: string, packageName: string, parameters: PackageUpdateParameters, options?: PackagesUpdateOptionalParams): Promise; + get(resourceGroupName: string, testBaseAccountName: string, packageName: string, options?: PackagesGetOptionalParams): Promise; + getDownloadURL(resourceGroupName: string, testBaseAccountName: string, packageName: string, options?: PackagesGetDownloadURLOptionalParams): Promise; + listByTestBaseAccount(resourceGroupName: string, testBaseAccountName: string, options?: PackagesListByTestBaseAccountOptionalParams): PagedAsyncIterableIterator; + runTest(resourceGroupName: string, testBaseAccountName: string, packageName: string, options?: PackagesRunTestOptionalParams): Promise; +} + +// @public +export interface PackagesCreateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface PackagesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PackagesCreateResponse = PackageResource; + +// @public +export interface PackagesDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface PackagesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PackagesGetDownloadURLOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PackagesGetDownloadURLResponse = DownloadURLResponse; + +// @public +export interface PackagesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PackagesGetResponse = PackageResource; + +// @public +export interface PackagesHardDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface PackagesHardDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PackagesListByTestBaseAccountNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PackagesListByTestBaseAccountNextResponse = PackageListResult; + +// @public +export interface PackagesListByTestBaseAccountOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PackagesListByTestBaseAccountResponse = PackageListResult; + +// @public +export interface PackagesRunTestHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface PackagesRunTestOptionalParams extends coreClient.OperationOptions { + parameters?: PackageRunTestParameters; +} + +// @public +export type PackagesRunTestResponse = PackagesRunTestHeaders; + +// @public +export type PackageStatus = string; + +// @public +export type PackageStudioTabs = string; + +// @public +export interface PackagesUpdateHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface PackagesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PackagesUpdateResponse = PackageResource; + +// @public +export interface PackageUpdateParameters { + blobPath?: string; + draftPackageId?: string; + firstPartyApps?: FirstPartyAppDefinition[]; + flightingRing?: string; + inplaceUpgradeOSPair?: InplaceUpgradeOSInfo; + intuneEnrollmentMetadata?: IntuneEnrollmentMetadata; + isEnabled?: boolean; + tags?: { + [propertyName: string]: string; + }; + targetOSList?: TargetOSInfo[]; + tests?: Test[]; +} + +// @public +export interface PackageValidationResult { + readonly errors?: string[]; + readonly isValid?: boolean; + readonly validationName?: string; +} + +// @public (undocumented) +export interface PreReleaseAccessRequestSpec { + // (undocumented) + city?: string; + // (undocumented) + companyWebsite?: string; + // (undocumented) + countryAndRegion?: string; + // (undocumented) + email?: string; + // (undocumented) + engagements?: Engagements[]; + // (undocumented) + organizationName?: string; + // (undocumented) + stateOrProvince?: string; + // (undocumented) + streetAddress?: string; + // (undocumented) + zipCode?: string; +} + +// @public +export type ProvisioningState = string; + +// @public +export interface ProxyResource extends Resource { +} + +// @public +export type Reason = string; + +// @public +export interface RegressionResult { + details?: string; + diff?: number; + fileName?: string; + grade?: Grade; + isRegressed?: boolean; +} + +// @public +export interface RegressionTestDetails { + diff?: number; + isRegressed?: boolean; +} + +// @public +export interface ReleaseProperties { + buildNumber?: string; + buildRevision?: string; + releaseName?: string; + releaseVersionDate?: Date; +} + +// @public +export interface ReliabilityResult { + crashCount?: number; + crashRegressionGrade?: Grade; + crashRegressionTestDetails?: RegressionTestDetails; + fileName?: string; + hangCount?: number; + hangRegressionGrade?: Grade; + hangRegressionTestDetails?: RegressionTestDetails; + launchCount?: number; + regressionGrade?: Grade; +} + +// @public +export interface ReliabilityResultSingletonResourceProperties extends AnalysisResultSingletonResourceProperties { + analysisResultType: "Reliability"; + inplaceUpgradeBaselineReliabilityResults?: ReliabilityResult[]; + reliabilityResults?: ReliabilityResult[]; +} + +// @public +export type RequestStatus = string; + +// @public +export type RequestTypes = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface ScriptExecutionResult { + endTime?: Date; + exitCode?: number; + scriptName?: string; + startTime?: Date; + stderrLogFileName?: string; + stdoutLogFileName?: string; + timedOut?: boolean; +} + +// @public +export interface ScriptExecutionResultSingletonResourceProperties extends AnalysisResultSingletonResourceProperties { + analysisResultType: "ScriptExecution"; + scriptExecutionResults?: ScriptExecutionResult[]; +} + +// @public +export interface Skus { + list(options?: SkusListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SkusListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SkusListNextResponse = TestBaseAccountSKUListResult; + +// @public +export interface SkusListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SkusListResponse = TestBaseAccountSKUListResult; + +// @public +export interface SubscriptionReceiverValue { + role?: string; + subscriptionId?: string; + subscriptionName?: string; +} + +// @public +export interface SystemAssignedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: SystemAssignedServiceIdentityType; +} + +// @public +export type SystemAssignedServiceIdentityType = string; + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TabState { + currentTab?: PackageStudioTabs; + visitedTabs?: PackageStudioTabs[]; +} + +// @public +export interface TargetOSInfo { + baselineOSs?: string[]; + insiderChannelIds?: string[]; + osUpdateType: string; + targetOSImageIds?: string[]; + targetOSs?: string[]; +} + +// @public +export interface Test { + commands: Command[]; + isActive?: boolean; + testType: TestType; + readonly validationResultId?: string; + readonly validationRunStatus?: ValidationRunStatus; +} + +// @public +export interface TestAnalysisResult { + blobData?: string; + identifiedFailures?: IdentifiedFailure[]; + testAnalysisStatus?: TestAnalysisStatus; +} + +// @public +export interface TestAnalysisResultSingletonResourceProperties extends AnalysisResultSingletonResourceProperties { + analysisResultType: "TestAnalysis"; + testAnalysisResult?: TestAnalysisResult; +} + +// @public +export type TestAnalysisStatus = string; + +// @public (undocumented) +export class TestBase extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: TestBaseOptionalParams); + // (undocumented) + actionRequestsOperations: ActionRequestsOperations; + // (undocumented) + analysisResults: AnalysisResults; + // (undocumented) + apiVersion: string; + // (undocumented) + availableInplaceUpgradeOS: AvailableInplaceUpgradeOS; + // (undocumented) + availableOS: AvailableOS; + // (undocumented) + billingHubService: BillingHubService; + // (undocumented) + chatSession: ChatSession; + // (undocumented) + chatSessions: ChatSessions; + // (undocumented) + credential: Credential_2; + // (undocumented) + credentials: Credentials; + // (undocumented) + customerEvents: CustomerEvents; + // (undocumented) + customImages: CustomImages; + // (undocumented) + draftPackages: DraftPackages; + // (undocumented) + emailEvents: EmailEvents; + // (undocumented) + favoriteProcesses: FavoriteProcesses; + // (undocumented) + featureUpdateSupportedOses: FeatureUpdateSupportedOses; + // (undocumented) + firstPartyApps: FirstPartyApps; + // (undocumented) + flightingRings: FlightingRings; + // (undocumented) + freeHourBalances: FreeHourBalances; + // (undocumented) + galleryApps: GalleryApps; + // (undocumented) + galleryAppSkus: GalleryAppSkus; + // (undocumented) + imageDefinitions: ImageDefinitions; + // (undocumented) + operations: Operations; + // (undocumented) + oSUpdates: OSUpdates; + // (undocumented) + packages: Packages; + // (undocumented) + skus: Skus; + // (undocumented) + subscriptionId: string; + // (undocumented) + testBaseAccounts: TestBaseAccounts; + // (undocumented) + testResults: TestResults; + // (undocumented) + testSummaries: TestSummaries; + // (undocumented) + testTypes: TestTypes; + // (undocumented) + usage: Usage; + // (undocumented) + vHDs: VHDs; +} + +// @public +export interface TestBaseAccountListResult { + readonly nextLink?: string; + value?: TestBaseAccountResource[]; +} + +// @public +export interface TestBaseAccountResource extends TrackedResource { + readonly accessLevel?: string; + identity?: SystemAssignedServiceIdentity; + readonly provisioningState?: ProvisioningState; + sku?: TestBaseAccountSKU; +} + +// @public +export interface TestBaseAccounts { + beginCreate(resourceGroupName: string, testBaseAccountName: string, parameters: TestBaseAccountResource, options?: TestBaseAccountsCreateOptionalParams): Promise, TestBaseAccountsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, testBaseAccountName: string, parameters: TestBaseAccountResource, options?: TestBaseAccountsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, testBaseAccountName: string, options?: TestBaseAccountsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, testBaseAccountName: string, options?: TestBaseAccountsDeleteOptionalParams): Promise; + beginOffboard(resourceGroupName: string, testBaseAccountName: string, options?: TestBaseAccountsOffboardOptionalParams): Promise, void>>; + beginOffboardAndWait(resourceGroupName: string, testBaseAccountName: string, options?: TestBaseAccountsOffboardOptionalParams): Promise; + beginUpdate(resourceGroupName: string, testBaseAccountName: string, parameters: TestBaseAccountUpdateParameters, options?: TestBaseAccountsUpdateOptionalParams): Promise, TestBaseAccountsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, testBaseAccountName: string, parameters: TestBaseAccountUpdateParameters, options?: TestBaseAccountsUpdateOptionalParams): Promise; + checkPackageNameAvailability(resourceGroupName: string, testBaseAccountName: string, parameters: PackageCheckNameAvailabilityParameters, options?: TestBaseAccountsCheckPackageNameAvailabilityOptionalParams): Promise; + get(resourceGroupName: string, testBaseAccountName: string, options?: TestBaseAccountsGetOptionalParams): Promise; + getFileUploadUrl(resourceGroupName: string, testBaseAccountName: string, options?: TestBaseAccountsGetFileUploadUrlOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: TestBaseAccountsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: TestBaseAccountsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TestBaseAccountsCheckPackageNameAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestBaseAccountsCheckPackageNameAvailabilityResponse = CheckNameAvailabilityResult; + +// @public +export interface TestBaseAccountsCreateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface TestBaseAccountsCreateOptionalParams extends coreClient.OperationOptions { + restore?: boolean; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TestBaseAccountsCreateResponse = TestBaseAccountResource; + +// @public +export interface TestBaseAccountsDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface TestBaseAccountsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface TestBaseAccountsGetFileUploadUrlOptionalParams extends coreClient.OperationOptions { + parameters?: GetFileUploadURLParameters; +} + +// @public +export type TestBaseAccountsGetFileUploadUrlResponse = FileUploadURLResponse; + +// @public +export interface TestBaseAccountsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestBaseAccountsGetResponse = TestBaseAccountResource; + +// @public +export interface TestBaseAccountSKU { + readonly capabilities?: TestBaseAccountSKUCapability[]; + locations?: string[]; + name: string; + resourceType?: string; + tier: Tier; +} + +// @public +export interface TestBaseAccountSKUCapability { + name: string; + value: string; +} + +// @public +export interface TestBaseAccountSKUListResult { + readonly nextLink?: string; + value?: TestBaseAccountSKU[]; +} + +// @public +export interface TestBaseAccountsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestBaseAccountsListByResourceGroupNextResponse = TestBaseAccountListResult; + +// @public +export interface TestBaseAccountsListByResourceGroupOptionalParams extends coreClient.OperationOptions { + getDeleted?: boolean; +} + +// @public +export type TestBaseAccountsListByResourceGroupResponse = TestBaseAccountListResult; + +// @public +export interface TestBaseAccountsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestBaseAccountsListBySubscriptionNextResponse = TestBaseAccountListResult; + +// @public +export interface TestBaseAccountsListBySubscriptionOptionalParams extends coreClient.OperationOptions { + getDeleted?: boolean; +} + +// @public +export type TestBaseAccountsListBySubscriptionResponse = TestBaseAccountListResult; + +// @public +export interface TestBaseAccountsOffboardHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface TestBaseAccountsOffboardOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface TestBaseAccountsUpdateHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface TestBaseAccountsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TestBaseAccountsUpdateResponse = TestBaseAccountResource; + +// @public +export interface TestBaseAccountUpdateParameters { + identity?: SystemAssignedServiceIdentity; + sku?: TestBaseAccountSKU; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface TestBaseAccountUsageData { + currentValue?: number; + id?: string; + limit?: number; + name?: TestBaseAccountUsageName; + unit?: string; +} + +// @public +export interface TestBaseAccountUsageDataList { + readonly nextLink?: string; + value?: TestBaseAccountUsageData[]; +} + +// @public +export interface TestBaseAccountUsageName { + localizedValue?: string; + value?: string; +} + +// @public +export interface TestBaseOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export interface TestResultAnalysisSummary { + analysisStatus?: AnalysisStatus; + grade?: Grade; + name?: string; +} + +// @public +export interface TestResultConsoleLogDownloadURLParameters { + logFileName: string; +} + +// @public +export interface TestResultFirstPartyAppDefinition { + architecture?: Architecture; + channel?: string; + name?: string; + ring?: string; + version?: string; +} + +// @public +export interface TestResultListResult { + readonly nextLink?: string; + value?: TestResultResource[]; +} + +// @public +export interface TestResultResource extends ProxyResource { + analysisSummaries?: TestResultAnalysisSummary[]; + applicationName?: string; + applicationVersion?: string; + baselineTestResultId?: string; + buildRevision?: string; + buildVersion?: string; + customImageDisplayName?: string; + customImageId?: string; + executionStatus?: ExecutionStatus; + firstPartyApps?: TestResultFirstPartyAppDefinition[]; + flightingRing?: string; + grade?: Grade; + inplaceUpgradeProperties?: InplaceUpgradeProperties; + interopMediaType?: string; + interopMediaVersion?: string; + isDownloadDataAvailable?: boolean; + isVideoAvailable?: boolean; + kbNumber?: string; + osName?: string; + packageId?: string; + packageVersion?: string; + releaseName?: string; + releaseVersionDate?: Date; + testEndTime?: Date; + testRunTime?: string; + testStartTime?: Date; + testStatus?: TestStatus; + testType?: string; +} + +// @public +export interface TestResults { + get(resourceGroupName: string, testBaseAccountName: string, packageName: string, testResultName: string, options?: TestResultsGetOptionalParams): Promise; + getConsoleLogDownloadURL(resourceGroupName: string, testBaseAccountName: string, packageName: string, testResultName: string, parameters: TestResultConsoleLogDownloadURLParameters, options?: TestResultsGetConsoleLogDownloadURLOptionalParams): Promise; + getDownloadURL(resourceGroupName: string, testBaseAccountName: string, packageName: string, testResultName: string, options?: TestResultsGetDownloadURLOptionalParams): Promise; + getVideoDownloadURL(resourceGroupName: string, testBaseAccountName: string, packageName: string, testResultName: string, options?: TestResultsGetVideoDownloadURLOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, packageName: string, osUpdateType: OsUpdateType, options?: TestResultsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TestResultsGetConsoleLogDownloadURLOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestResultsGetConsoleLogDownloadURLResponse = DownloadURLResponse; + +// @public +export interface TestResultsGetDownloadURLOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestResultsGetDownloadURLResponse = DownloadURLResponse; + +// @public +export interface TestResultsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestResultsGetResponse = TestResultResource; + +// @public +export interface TestResultsGetVideoDownloadURLOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestResultsGetVideoDownloadURLResponse = DownloadURLResponse; + +// @public +export interface TestResultsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestResultsListNextResponse = TestResultListResult; + +// @public +export interface TestResultsListOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type TestResultsListResponse = TestResultListResult; + +// @public +export type TestStatus = string; + +// @public +export interface TestSummaries { + get(resourceGroupName: string, testBaseAccountName: string, testSummaryName: string, options?: TestSummariesGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, options?: TestSummariesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TestSummariesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestSummariesGetResponse = TestSummaryResource; + +// @public +export interface TestSummariesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestSummariesListNextResponse = TestSummaryListResult; + +// @public +export interface TestSummariesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestSummariesListResponse = TestSummaryListResult; + +// @public +export interface TestSummaryListResult { + readonly nextLink?: string; + value?: TestSummaryResource[]; +} + +// @public +export interface TestSummaryResource extends ProxyResource { + applicationName?: string; + applicationVersion?: string; + executionStatus?: ExecutionStatus; + featureUpdatesTestSummary?: OSUpdatesTestSummary; + grade?: Grade; + inplaceUpgradesTestSummary?: OSUpdatesTestSummary; + packageId?: string; + packageTags?: { + [propertyName: string]: string; + }; + securityUpdatesTestSummary?: OSUpdatesTestSummary; + testRunTime?: string; + testStatus?: TestStatus; + testSummaryId?: string; +} + +// @public +export type TestType = string; + +// @public +export interface TestTypeListResult { + readonly nextLink?: string; + value?: TestTypeResource[]; +} + +// @public +export interface TestTypeResource extends ProxyResource { + actualTestTypeName?: string; +} + +// @public +export interface TestTypes { + get(resourceGroupName: string, testBaseAccountName: string, testTypeResourceName: string, options?: TestTypesGetOptionalParams): Promise; + list(resourceGroupName: string, testBaseAccountName: string, options?: TestTypesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TestTypesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestTypesGetResponse = TestTypeResource; + +// @public +export interface TestTypesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestTypesListNextResponse = TestTypeListResult; + +// @public +export interface TestTypesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TestTypesListResponse = TestTypeListResult; + +// @public +export type Tier = string; + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type Type = string; + +// @public +export interface Usage { + list(resourceGroupName: string, testBaseAccountName: string, options?: UsageListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface UsageListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UsageListNextResponse = TestBaseAccountUsageDataList; + +// @public +export interface UsageListOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type UsageListResponse = TestBaseAccountUsageDataList; + +// @public +export interface UserObjectReceiverValue { + userObjectIds?: string[]; +} + +// @public +export interface UtilizationBound { + percentile?: number; + value?: number; +} + +// @public +export interface UtilizationEntry { + timestamp?: Date; + value?: number; +} + +// @public +export interface UtilizationResult { + lowerBound?: UtilizationBound; + process?: string; + upperBound?: UtilizationBound; + utilization?: UtilizationEntry[]; +} + +// @public +export type ValidationRunStatus = string; + +// @public +export interface VerificationResult { + message?: string; + result: VerificationStatus; + verificationName?: string; +} + +// @public +export type VerificationStatus = string; + +// @public +export interface VHDListResult { + readonly nextLink?: string; + value?: VHDResource[]; +} + +// @public +export interface VHDResource extends ProxyResource { + readonly creationTime?: Date; + readonly fileName?: string; + readonly fileSize?: number; + readonly path?: string; + readonly provisioningState?: string; + readonly status?: VHDStatus; +} + +// @public +export interface VHDs { + delete(resourceGroupName: string, testBaseAccountName: string, vhdName: string, options?: VHDsDeleteOptionalParams): Promise; + get(resourceGroupName: string, testBaseAccountName: string, vhdName: string, options?: VHDsGetOptionalParams): Promise; + listByTestBaseAccount(resourceGroupName: string, testBaseAccountName: string, options?: VHDsListByTestBaseAccountOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VHDsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface VHDsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VHDsGetResponse = VHDResource; + +// @public +export interface VHDsListByTestBaseAccountNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VHDsListByTestBaseAccountNextResponse = VHDListResult; + +// @public +export interface VHDsListByTestBaseAccountOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VHDsListByTestBaseAccountResponse = VHDListResult; + +// @public +export type VHDStatus = string; + +// @public +export interface WingetAppSkuProperties extends GalleryAppSkuProperties { + applicationType: "Winget"; + license?: string; + licenseUrl?: string; + version?: string; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/testbase/arm-testbase/sample.env b/sdk/testbase/arm-testbase/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/testbase/arm-testbase/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/testbase/arm-testbase/src/index.ts b/sdk/testbase/arm-testbase/src/index.ts new file mode 100644 index 000000000000..bf792663d9ca --- /dev/null +++ b/sdk/testbase/arm-testbase/src/index.ts @@ -0,0 +1,13 @@ +/* + * 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 { getContinuationToken } from "./pagingHelper"; +export * from "./models"; +export { TestBase } from "./testBase"; +export * from "./operationsInterfaces"; diff --git a/sdk/testbase/arm-testbase/src/lroImpl.ts b/sdk/testbase/arm-testbase/src/lroImpl.ts new file mode 100644 index 000000000000..dd803cd5e28c --- /dev/null +++ b/sdk/testbase/arm-testbase/src/lroImpl.ts @@ -0,0 +1,42 @@ +/* + * 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 { AbortSignalLike } from "@azure/abort-controller"; +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; +} diff --git a/sdk/testbase/arm-testbase/src/models/index.ts b/sdk/testbase/arm-testbase/src/models/index.ts new file mode 100644 index 000000000000..d23396f2bd7b --- /dev/null +++ b/sdk/testbase/arm-testbase/src/models/index.ts @@ -0,0 +1,4177 @@ +/* + * 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 type GalleryAppSkuPropertiesUnion = + | GalleryAppSkuProperties + | WingetAppSkuProperties; +export type AnalysisResultSingletonResourcePropertiesUnion = + | AnalysisResultSingletonResourceProperties + | ScriptExecutionResultSingletonResourceProperties + | ReliabilityResultSingletonResourceProperties + | CPUUtilizationResultSingletonResourceProperties + | MemoryUtilizationResultSingletonResourceProperties + | CPURegressionResultSingletonResourceProperties + | MemoryRegressionResultSingletonResourceProperties + | TestAnalysisResultSingletonResourceProperties; +export type CredentialPropertiesUnion = + | CredentialProperties + | IntuneSingletonResourceProperties; + +export interface PreReleaseAccessRequestSpec { + organizationName?: string; + email?: string; + engagements?: Engagements[]; + streetAddress?: string; + city?: string; + stateOrProvince?: string; + zipCode?: string; + countryAndRegion?: string; + companyWebsite?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: 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; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +export interface ActionRequests { + value?: ActionRequest[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of chat session. */ +export interface ChatSessionResourceListResult { + /** The list of chat session. */ + value?: ChatSessionResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The chat request payload. */ +export interface ChatRequest { + /** The question of the chat turn */ + question: string; +} + +/** The chat response payload. */ +export interface ChatResponse { + /** The question from the request */ + question: string; + /** The answer from the system */ + answer: string; + citations?: AnswerCitation[]; + /** + * The usage of questions within the chat session + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly usage: number; + /** + * The limit of questions within the chat session + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly limit: number; +} + +/** The answer citation. */ +export interface AnswerCitation { + /** The title of the citation. */ + title?: string; + /** The url of the citation. */ + url?: string; + /** The chunk index of the content. */ + chunkIndex?: number; +} + +/** A list of Test Base custom images. */ +export interface CustomImageListResult { + /** The list of Test Base custom images. */ + value?: CustomImageResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The image validation result. */ +export interface ImageValidationResults { + /** The validation results of the image. */ + results?: VerificationResult[]; +} + +/** The detailed result of a validation or rule checking. */ +export interface VerificationResult { + /** The name of the verification rule. */ + verificationName?: string; + /** Indicates if the validation or rule checking is passed. */ + result: VerificationStatus; + /** Message for clarification. */ + message?: string; +} + +/** Parameter body to request test base custom image availability. */ +export interface ImageNameCheckAvailabilityParameters { + /** Image definition name. */ + definitionName: string; + /** Image version name. */ + versionName: string; +} + +/** The result of all available image definition under a test base account. */ +export interface ImageDefinitionsListResult { + /** The list of image definitions. */ + value?: ImageDefinitionResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of VHD resource. */ +export interface VHDListResult { + /** The list of Test Base VHDs. */ + value?: VHDResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of Test Base Draft Packages. */ +export interface DraftPackageListResult { + /** The list of Test Base Draft Packages. */ + value?: DraftPackageResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The metadata of Intune app(s) used for generation. */ +export interface DraftPackageIntuneAppMetadata { + /** The Metadata of the Intune App through intunewin file uploading. */ + intuneApp?: DraftPackageIntuneAppMetadataItem; + /** The Metadata of dependencies of the Intune App through intunewin file uploading. */ + intuneAppDependencies?: DraftPackageIntuneAppMetadataItem[]; +} + +/** The Metadata of a single Intune App. */ +export interface DraftPackageIntuneAppMetadataItem { + /** Intune app name. */ + appName?: string; + /** Intune app version. */ + version?: string; + /** Intune app id. */ + appId?: string; + /** Publisher of the app. */ + publisher?: string; + /** Description of the app. */ + description?: string; + /** Owner of the app. */ + owner?: string; + /** Creation date of the app. */ + createDate?: Date; + /** Count of dependency apps. */ + dependentAppCount?: number; + /** Install command. */ + installCommand?: string; + /** Uninstall command. */ + uninstallCommand?: string; + /** last processed time tickets. */ + lastProcessed?: number; + /** Ids of dependency apps. */ + dependencyIds?: string[]; + /** Setup file path. */ + setupFile?: string; + /** Minimum supported OS. The OS version must be greater than this version to run this app. */ + minimumSupportedOS?: string; + /** Extract status. */ + status?: IntuneExtractStatus; + /** Expected exit codes returned from Intune App. */ + expectedExitCodes?: string[]; +} + +/** The information of a highlighted file that user should pay attention to. */ +export interface HighlightedFile { + /** The path of the highlighted file. */ + path: string; + /** A flag to save whether this file is viewed by user. */ + visited?: boolean; + /** The name of sections to highlight. */ + sections?: string[]; +} + +/** Specifies current state of tabs. */ +export interface TabState { + /** Current tab. */ + currentTab?: PackageStudioTabs; + /** visited tabs. */ + visitedTabs?: PackageStudioTabs[]; +} + +/** The information of the target OS to be tested. */ +export interface TargetOSInfo { + /** Specifies the OS update type to test against, e.g., 'Security updates' or 'Feature updates'. */ + osUpdateType: string; + /** Specifies the target OSs to be tested. */ + targetOSs?: string[]; + /** Insider Channel Ids. Only used for feature update. */ + insiderChannelIds?: string[]; + /** Specifies the baseline OSs to be tested. */ + baselineOSs?: string[]; + /** Specifies the ids of the target OSs from Custom Images to be tested. */ + targetOSImageIds?: string[]; +} + +/** Specifies the baseline os and target os for in-place upgrade tests. */ +export interface InplaceUpgradeOSInfo { + /** Specifies the baseline os for in-place upgrade tests. */ + baselineOS?: OsProperties; + /** Specifies the target os for in-place upgrade tests. */ + targetOS?: string; +} + +/** The properties of an operating system. */ +export interface OsProperties { + /** The name of the OS. */ + osName?: string; + /** Specify the referenced Test Base Custom Image Id if available. */ + customImageId?: string; + /** + * The name of the custom image resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customImageDisplayName?: string; + /** The properties of the OS release. */ + releaseProperties?: ReleaseProperties; +} + +/** The properties of an operating system release. */ +export interface ReleaseProperties { + /** The name of the OS release. */ + releaseName?: string; + /** The build number of the OS release. */ + buildNumber?: string; + /** The build revision of the OS release. */ + buildRevision?: string; + /** The release version date of the OS release. */ + releaseVersionDate?: Date; +} + +/** Properties of the definition of a first party application of the Test Base package. */ +export interface FirstPartyAppDefinition { + /** The media name of a first party application of a Test Base Account. */ + name?: string; + /** The architecture of a first party application of a Test Base Account. */ + architecture?: Architecture; + /** The channel info of a first party application of a Test Base Account. */ + channel?: string; + /** The ring info of a first party application of a Test Base Account. */ + ring?: string; + /** Specifies how the first party applications should be inter-operated with user's application. */ + interopExecutionMode?: InteropExecutionMode; +} + +/** Properties of the definition of a gallery application used in Test Base package. */ +export interface GalleryAppDefinition { + /** The SKU id of the gallery application. */ + skuId: string; + /** Whether the disclaimer of the gallery application is accepted. */ + isConsented?: boolean; +} + +/** The definition of a Test. */ +export interface Test { + /** The type of the test. */ + testType: TestType; + /** + * The status of the validation run of the package. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly validationRunStatus?: ValidationRunStatus; + /** + * Resource identifier of the validation test result. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly validationResultId?: string; + /** Indicates if this test is active.It doesn't schedule test for not active Test. */ + isActive?: boolean; + /** The commands used in the test. */ + commands: Command[]; +} + +/** The command used in the test */ +export interface Command { + /** The name of the command. */ + name: string; + /** The action of the command. */ + action: Action; + /** The type of command content. */ + contentType: ContentType; + /** The content of the command. The content depends on source type. */ + content: string; + /** Specifies whether to run the command as administrator. */ + runElevated?: boolean; + /** Specifies whether to restart the VM after the command executed. */ + restartAfter?: boolean; + /** Specifies the max run time of the command. */ + maxRunTime?: number; + /** Specifies whether to run the command in interactive mode. */ + runAsInteractive?: boolean; + /** Specifies whether to run the command even if a previous command is failed. */ + alwaysRun?: boolean; + /** Specifies whether to apply update before the command. */ + applyUpdateBefore?: boolean; + /** Specifies whether to install first party applications before running the command. */ + install1PAppBefore?: boolean; + /** Specifies whether the command is assigned to be executed before in-place upgrade. */ + preUpgrade?: boolean; + /** Specifies whether the command is assigned to be executed after in-place upgrade. */ + postUpgrade?: boolean; + /** Specifies whether to enroll Intune before the command. */ + enrollIntuneBefore?: boolean; +} + +/** The metadata of Intune enrollment. */ +export interface IntuneEnrollmentMetadata { + /** The enrolled Intune apps. */ + appList?: EnrolledIntuneApp[]; + /** The id of the Intune enrollment credential. */ + credentialId?: string; + /** The expected duration of Intune applications and policies deployment. */ + expectedDeploymentDurationInMinute?: number; +} + +/** Metadata of the enrolled Intune app. */ +export interface EnrolledIntuneApp { + /** Intune app name. */ + appName: string; + /** Intune app id. */ + appId: string; + /** Intune app expected installation path. */ + expectedInstallationPath: string; +} + +/** Parameters supplied to update a Test Base Draft Package. */ +export interface DraftPackageUpdateParameters { + /** Application name */ + applicationName?: string; + /** Application version */ + version?: string; + /** The name of the app file. */ + appFileName?: string; + /** The source type. */ + sourceType?: DraftPackageSourceType; + /** Specifies whether a sample package should be used instead of the one uploaded by the user. */ + useSample?: boolean; + /** Comments added by user. */ + comments?: string; + /** Metadata used to generate draft package folder and scripts. */ + intuneMetadata?: DraftPackageIntuneAppMetadata; + /** The highlight files in the package. */ + highlightedFiles?: HighlightedFile[]; + /** Tags of the package to be created. */ + packageTags?: { [propertyName: string]: string }; + /** Specifies the package id from which the draft package copied. */ + packageId?: string; + /** Indicates whether user choose to enable script auto-fill. */ + useAutofill?: boolean; + /** The executable launch command for script auto-fill. Will be used to run the application. */ + executableLaunchCommand?: string; + /** The process name for script auto-fill. Will be used to identify the application process. */ + processName?: string; + /** Tab state. */ + tabState?: TabState; + /** OOB, functional or flow driven. Mapped to the data in 'tests' property. */ + testTypes?: TestType[]; + /** Specifies the target OSs of specific OS Update types. */ + targetOSList?: TargetOSInfo[]; + /** Specifies the baseline os and target os for in-place upgrade. */ + inplaceUpgradeOSPair?: InplaceUpgradeOSInfo; + /** The flighting ring for feature update. */ + flightingRing?: string; + /** Specifies the list of first party applications to test along with user application. */ + firstPartyApps?: FirstPartyAppDefinition[]; + /** The list of gallery apps to test along with user application. */ + galleryApps?: GalleryAppDefinition[]; + /** The detailed test information. */ + tests?: Test[]; + /** The metadata of Intune enrollment. */ + intuneEnrollmentMetadata?: IntuneEnrollmentMetadata; +} + +/** The response of getting a download URL. */ +export interface DraftPackageGetPathResponse { + /** + * The base URL of the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly baseUrl?: string; + /** + * The relative path of the folder hosting package files. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly draftPackagePath?: string; + /** + * The relative path for a temporary folder for package creation work. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly workingPath?: string; + /** + * A SAS token for the storage account to access workspace. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sasToken?: string; + /** + * Expiry date of the SAS token. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expirationTime?: Date; +} + +/** Parameters body to pass to copy-from-package operation of Draft Package. */ +export interface CopyFromPackageOperationParameters { + /** The id of the package to copy from. */ + packageId: string; +} + +/** Parameters body to pass to extract file operation of Draft Package. */ +export interface ExtractFileOperationParameters { + /** The type of file to extract. */ + fileType?: ExtractFileType; + /** Relative path of the file to be extracted, the path must under working path of this draft package. */ + sourceFile: string; + /** Intune application id. */ + intuneAppId?: string; +} + +/** Parameters body to pass to generate operation of Draft Package. */ +export interface GenerateOperationParameters { + /** Force to generate package files even if no metadata changed. */ + forceGenerate?: boolean; +} + +/** A list of Test Base Free Hour Balances. It will only contain one element as all the data will be nested in a singleton object. */ +export interface FreeHourBalancesListResult { + /** The list of FreeHourBalances. */ + value?: FreeHourBalanceResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +export interface BillingHubGetFreeHourBalanceResponse { + totalRemainingFreeHours?: number; + incrementEntries?: BillingHubFreeHourIncrementEntry[]; +} + +export interface BillingHubFreeHourIncrementEntry { + freeHourType?: FreeHourType; + freeHourStatus?: FreeHourStatus; + createTimeStamp?: Date; + expirationTimeStamp?: Date; + incrementalFreeHours?: number; + remainingFreeHours?: number; +} + +/** A list of Test Base Account SKUs. */ +export interface TestBaseAccountSKUListResult { + /** The list of Test Base Account SKUs. */ + value?: TestBaseAccountSKU[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Describes a Test Base Account SKU. */ +export interface TestBaseAccountSKU { + /** The type of resource the SKU applies to. */ + resourceType?: string; + /** The name of the SKU. This is typically a letter + number code, such as B0 or S0. */ + name: string; + /** The tier of this particular SKU. */ + tier: Tier; + /** + * The capabilities of a SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capabilities?: TestBaseAccountSKUCapability[]; + /** The locations that the SKU is available. */ + locations?: string[]; +} + +/** Properties of the Test Base Account SKU Capability. */ +export interface TestBaseAccountSKUCapability { + /** An invariant to describe the feature, such as 'SLA'. */ + name: string; + /** An invariant if the feature is measured by quantity, such as 99.9%. */ + value: string; +} + +/** A list of Test Base Accounts. */ +export interface TestBaseAccountListResult { + /** The list of Test Base Accounts. */ + value?: TestBaseAccountResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Managed service identity (either system assigned, or none) */ +export interface SystemAssignedServiceIdentity { + /** + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of managed service identity (either system assigned, or none). */ + type: SystemAssignedServiceIdentityType; +} + +/** Parameters supplied to update a Test Base Account. */ +export interface TestBaseAccountUpdateParameters { + /** The identity of the testBaseAccount. */ + identity?: SystemAssignedServiceIdentity; + /** The tags of the Test Base Account. */ + tags?: { [propertyName: string]: string }; + /** The SKU of the Test Base Account. */ + sku?: TestBaseAccountSKU; +} + +/** A list of Test Base Account usage data. */ +export interface TestBaseAccountUsageDataList { + /** The list of Test Base Account usage data. */ + value?: TestBaseAccountUsageData[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The usage data of a Test Base Account. */ +export interface TestBaseAccountUsageData { + /** Fully qualified ARM resource id */ + id?: string; + /** Localizable String object containing the name and a localized value. */ + name?: TestBaseAccountUsageName; + /** Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. */ + unit?: string; + /** The maximum permitted value for the usage quota. If there is no limit, this value will be -1. */ + limit?: number; + /** Current value for the usage quota. */ + currentValue?: number; +} + +/** Localizable String object containing the name and a localized value. */ +export interface TestBaseAccountUsageName { + /** The identifier of the usage. */ + value?: string; + /** Localized name of the usage. */ + localizedValue?: string; +} + +/** The parameters supplied to the Test Base Account GetFileUploadURL action. */ +export interface GetFileUploadURLParameters { + /** The custom file name of the uploaded blob. */ + blobName?: string; + /** Resource type for file uploading. */ + resourceType?: FileUploadResourceType; +} + +/** The URL response */ +export interface FileUploadURLResponse { + /** + * The URL used for uploading the package. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly uploadUrl?: string; + /** + * The blob path of the uploaded package. It will be used as the 'blobPath' property of PackageResource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly blobPath?: string; +} + +/** A list of available OSs. */ +export interface AvailableOSListResult { + /** The list of available OSs. */ + value?: AvailableOSResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Response schema of feature update supported OSes list API. */ +export interface FeatureUpdateSupportedOsesResult { + value?: FeatureUpdateSupportedOsesResource[]; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly nextLink?: string; +} + +/** A list of flighting rings. */ +export interface FlightingRingListResult { + /** The list of flighting rings. */ + value?: FlightingRingResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of currently available first party applications. */ +export interface FirstPartyAppListResult { + /** The list of currently available first party applications. */ + value?: FirstPartyAppResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of currently available gallery applications. */ +export interface GalleryAppListResult { + /** The list of currently available gallery applications. */ + value?: GalleryAppResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of currently available SKUs of a gallery application. */ +export interface GalleryAppSkuListResult { + /** The list of currently available SKUs of a gallery applications. */ + value?: GalleryAppSkuResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Properties of a gallery application SKU. */ +export interface GalleryAppSkuProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + applicationType: "Winget"; + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** A list of test types. */ +export interface TestTypeListResult { + /** The list of test types. */ + value?: TestTypeResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Parameters body to pass for Test Base Package name availability check. */ +export interface PackageCheckNameAvailabilityParameters { + /** Resource name to verify. */ + name: string; + /** Application name to verify. */ + applicationName: string; + /** Version name to verify. */ + version: string; + /** fully qualified resource type which includes provider namespace. */ + type?: string; +} + +/** Description of a Check Name availability response properties. */ +export interface CheckNameAvailabilityResult { + /** Value indicating the availability of the name: true if the name is available; otherwise, false. */ + nameAvailable?: boolean; + /** The reason for unavailability of a name. Required if nameAvailable == false. */ + reason?: Reason; + /** + * The detailed info regarding the reason associated with the name. Required if nameAvailable == false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} + +/** A list of Test Base Packages. */ +export interface PackageListResult { + /** The list of Test Base Packages. */ + value?: PackageResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The validation results. There's validation on package when it's created or updated. */ +export interface PackageValidationResult { + /** + * Validation name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly validationName?: string; + /** + * Indicates whether the package passed the validation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isValid?: boolean; + /** + * Error information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errors?: string[]; +} + +/** Parameters supplied to update a Test Base Package. */ +export interface PackageUpdateParameters { + /** The tags of the Package. */ + tags?: { [propertyName: string]: string }; + /** The id of draft package. Used to create or update this package from a draft package. */ + draftPackageId?: string; + /** Specifies whether the package is enabled. It doesn't schedule test for package which is not enabled. */ + isEnabled?: boolean; + /** The file name of the package. */ + blobPath?: string; + /** Specifies the target OSs of specific OS Update types. */ + targetOSList?: TargetOSInfo[]; + /** Specifies the baseline os and target os for in-place upgrade. */ + inplaceUpgradeOSPair?: InplaceUpgradeOSInfo; + /** The flighting ring for feature update. */ + flightingRing?: string; + /** Specifies the list of first party applications to test along with user application. */ + firstPartyApps?: FirstPartyAppDefinition[]; + /** The detailed test information. */ + tests?: Test[]; + /** The metadata of Intune enrollment. */ + intuneEnrollmentMetadata?: IntuneEnrollmentMetadata; +} + +/** The response of getting a download URL. */ +export interface DownloadURLResponse { + /** + * The download URL. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly downloadUrl?: string; + /** + * Expiry date of the download URL. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expirationTime?: Date; +} + +/** The parameters supplied to the Test Base Package to start a Test Run. */ +export interface PackageRunTestParameters { + /** The type of the test. */ + testType?: TestType; + /** Specifies the OS update type to test against. */ + osUpdateType?: OsUpdateType; + /** The operating system name. e.g. Windows 10 1809. */ + osName?: string; + /** The name of the tested release (OS update). */ + releaseName?: string; + /** The flighting ring, only for release of feature updates. */ + flightingRing?: string; + /** The tested custom image id. 'osName', 'release', 'buildVersion' and 'mediaPackageVersion' would be ignored when it's eligible.' */ + customImageId?: string; +} + +/** A list of Test Summaries. */ +export interface TestSummaryListResult { + /** The list of Test Summaries. */ + value?: TestSummaryResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The summary of some tests. */ +export interface OSUpdatesTestSummary { + /** The status of the last test. */ + executionStatus?: ExecutionStatus; + /** The status of last test. */ + testStatus?: TestStatus; + /** The grade of last test. */ + grade?: Grade; + /** The run time of the last test. */ + testRunTime?: string; + /** Detailed summary for each OS update */ + osUpdateTestSummaries?: OSUpdateTestSummary[]; +} + +/** The summary of a test. */ +export interface OSUpdateTestSummary { + /** The operating system name. e.g. Windows 10 1809. */ + osName?: string; + /** Specify the referenced Test Base Custom Image Id if available. */ + customImageId?: string; + /** The name of the custom image resource. */ + customImageDisplayName?: string; + /** The name of the tested release (OS update). */ + releaseName?: string; + /** The build version of the tested release (OS update) */ + buildVersion?: string; + /** The build revision of the tested release (OS update) */ + buildRevision?: string; + /** The release version date. */ + releaseVersionDate?: Date; + /** The flighting ring, only for release of feature updates. */ + flightingRing?: string; + /** The execution status of the test. */ + executionStatus?: ExecutionStatus; + /** The status of the test. */ + testStatus?: TestStatus; + /** The grade of the test. */ + grade?: Grade; + /** The run time of the test. */ + testRunTime?: string; + /** The test type of the package */ + testType?: string; + /** The properties of baseline os for in-place upgrade test. */ + inplaceUpgradeBaselineProperties?: OsProperties; +} + +/** A list of Test Results. */ +export interface TestResultListResult { + /** The list of Test Results. */ + value?: TestResultResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The summary of a Test Analysis Result. */ +export interface TestResultAnalysisSummary { + /** Metric name */ + name?: string; + /** The analysis status. */ + analysisStatus?: AnalysisStatus; + /** The grade of the test result. */ + grade?: Grade; +} + +/** Properties for in-place upgrade test result. */ +export interface InplaceUpgradeProperties { + /** Time stamp for os upgrading start (UTC). */ + upgradeStartTime?: Date; + /** Time stamp for os upgrading end (UTC). */ + upgradeEndTime?: Date; + /** Specify the referenced Test Base Custom Image Id if applicable. */ + customImageId?: string; + /** The name of the custom image resource. */ + customImageDisplayName?: string; + /** The name of the OS. */ + baselineOsName?: string; + /** The name of the baseline OS release. */ + baselineReleaseName?: string; + /** The build number of the baseline OS release. */ + baselineBuildNumber?: string; + /** The build revision of the baseline OS release. */ + baselineBuildRevision?: string; + /** The kb number of the baseline OS release. */ + baselineKbNumber?: string; + /** The release version date of the baseline OS release. */ + baselineReleaseVersionDate?: Date; +} + +/** Properties of the definition of first party application in test result. */ +export interface TestResultFirstPartyAppDefinition { + /** The media name of a first party application of a Test Base Account. */ + name?: string; + /** The media version of a first party application of a Test Base Account. */ + version?: string; + /** The architecture of a first party application of a Test Base Account. */ + architecture?: Architecture; + /** The channel info of a first party application of a Test Base Account. */ + channel?: string; + /** The ring info of a first party application of a Test Base Account. */ + ring?: string; +} + +/** A list of OS Updates. */ +export interface OSUpdateListResult { + /** The list of OS Updates. */ + value?: OSUpdateResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of favorite processes for a package. */ +export interface FavoriteProcessListResult { + /** The list of favorite processes for a package. */ + value?: FavoriteProcessResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of Analysis Results. It will only contain one element as all the data will be nested in a singleton object. */ +export interface AnalysisResultListResult { + /** The list of Analysis Results. */ + value?: AnalysisResultSingletonResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The properties of Analysis Result resource. */ +export interface AnalysisResultSingletonResourceProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + analysisResultType: + | "ScriptExecution" + | "Reliability" + | "CPUUtilization" + | "MemoryUtilization" + | "CPURegression" + | "MemoryRegression" + | "TestAnalysis"; + /** The grade of the test. */ + grade?: Grade; +} + +/** Parameters body to pass for getting the download URL of the test execution console log file. */ +export interface TestResultConsoleLogDownloadURLParameters { + /** The log file name corresponding to the download URL. */ + logFileName: string; +} + +/** A list of email events. */ +export interface EmailEventListResult { + /** The list of email events. */ + value?: EmailEventResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of Test Base Customer Events. */ +export interface CustomerEventListResult { + /** The list of Test Base Customer Events. */ + value?: CustomerEventResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A notification event receivers. */ +export interface NotificationEventReceiver { + /** The type of the notification event receiver. */ + receiverType?: string; + /** The notification event receiver value. */ + receiverValue?: NotificationReceiverValue; +} + +/** A notification event receiver value. */ +export interface NotificationReceiverValue { + /** The user object receiver value. */ + userObjectReceiverValue?: UserObjectReceiverValue; + /** The user object receiver value. */ + subscriptionReceiverValue?: SubscriptionReceiverValue; + /** The user object receiver value. */ + distributionGroupListReceiverValue?: DistributionGroupListReceiverValue; +} + +/** The user object receiver value. */ +export interface UserObjectReceiverValue { + /** user object ids. */ + userObjectIds?: string[]; +} + +/** The subscription role receiver value. */ +export interface SubscriptionReceiverValue { + /** The subscription id of the notification receiver. */ + subscriptionId?: string; + /** The subscription name of the notification receiver. */ + subscriptionName?: string; + /** The role of the notification receiver. */ + role?: string; +} + +/** The user object receiver value. */ +export interface DistributionGroupListReceiverValue { + /** The list of distribution groups. */ + distributionGroups?: string[]; +} + +/** 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 { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** 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" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + 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" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; +} + +/** Localized display information for this particular operation. */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; +} + +export interface BillingHubGetUsageRequest { + startTimeStamp: Date; + endTimeStamp: Date; + pageSize?: number; + pageIndex?: number; +} + +export interface BillingHubGetUsageResponse { + totalUsedFreeHours?: number; + totalUsedBillableHours?: number; + totalCharges?: number; + packageUsageEntries?: BillingHubPackageUsage[]; + nextRequest?: BillingHubGetUsageRequest; +} + +export interface BillingHubPackageUsage { + applicationName?: string; + applicationVersion?: string; + azureResourceUri?: string; + totalUsedFreeHours?: number; + totalUsedBillableHours?: number; + totalCharges?: number; + usageEntriesGroupedByUpdateType?: BillingHubUsageGroupedByUpdateType[]; +} + +export interface BillingHubUsageGroupedByUpdateType { + updateType?: string; + totalUsedFreeHours?: number; + totalUsedBillableHours?: number; + totalCharges?: number; + usageGroups?: BillingHubUsageGroup[]; +} + +export interface BillingHubUsageGroup { + totalUsedFreeHours?: number; + totalUsedBillableHours?: number; + totalCharges?: number; + releaseBuildRevision?: number; + releaseBuildNumber?: number; + releaseBuildDate?: Date; + osBuild?: string; + release?: string; + testType?: string; + productFamily?: string; + executionUsageDetails?: BillingHubExecutionUsageDetail[]; +} + +export interface BillingHubExecutionUsageDetail { + applicationName?: string; + applicationVersion?: string; + executionRequestId?: string; + sku?: string; + meterId?: string; + startTimeStamp?: Date; + endTimeStamp?: Date; + osBuild?: string; + release?: string; + testType?: string; + updateType?: string; + usedFreeHours?: number; + usedBillableHours?: number; + billedCharges?: number; +} + +/** A list of available In-place Upgrade OSs. */ +export interface AvailableInplaceUpgradeOSListResult { + /** The list of available In-place Upgrade OS. */ + value?: AvailableInplaceUpgradeOSResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A list of credential resources. */ +export interface CredentialListResult { + /** The list of credential resources. */ + value?: CredentialResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The properties of test base credential */ +export interface CredentialProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + credentialType: "IntuneAccount"; + /** Credential display name. */ + displayName: string; +} + +/** A list of test base image definitions. */ +export interface ImageDefinitionListResult { + /** The list of test base image definitions. */ + value?: ImageDefinitionResource[]; + /** + * Link to the next set of results. Not empty if value contains incomplete list of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Parameters supplied to get the test base custom image Definition operation. */ +export interface GetImageDefinitionParameters { + /** Image definition name. */ + definitionName?: string; +} + +/** The Script Execution Result. */ +export interface ScriptExecutionResult { + /** Name of script. */ + scriptName?: string; + /** Start time of script execution. */ + startTime?: Date; + /** End time of script execution. */ + endTime?: Date; + /** Exit code. */ + exitCode?: number; + /** Whether the script execution is timed out. */ + timedOut?: boolean; + /** The stdout log file name. */ + stdoutLogFileName?: string; + /** The stderr log file name. */ + stderrLogFileName?: string; +} + +/** The Reliability Result. */ +export interface ReliabilityResult { + /** File name. */ + fileName?: string; + /** Count of number of launches. */ + launchCount?: number; + /** Count of number of crashes. */ + crashCount?: number; + /** Count of number of hangs. */ + hangCount?: number; + /** The regression grade. */ + regressionGrade?: Grade; + /** The statistic regression grade for crash signal. */ + crashRegressionGrade?: Grade; + /** Details related to the crash regression analysis. */ + crashRegressionTestDetails?: RegressionTestDetails; + /** The statistic regression grade for hang signal. */ + hangRegressionGrade?: Grade; + /** Details related to the hang regression analysis. */ + hangRegressionTestDetails?: RegressionTestDetails; +} + +/** The details of a regression test. */ +export interface RegressionTestDetails { + /** Difference between the two datasets being analyzed. */ + diff?: number; + /** Indicates if a regression was inferred. */ + isRegressed?: boolean; +} + +/** The Utilization Result. */ +export interface UtilizationResult { + /** Process name, or '_total' for all processes */ + process?: string; + /** Upper bound */ + upperBound?: UtilizationBound; + /** Lower bound */ + lowerBound?: UtilizationBound; + /** Utilization data */ + utilization?: UtilizationEntry[]; +} + +/** The bound of a utilization result. */ +export interface UtilizationBound { + /** The percentile of the bound. */ + percentile?: number; + /** The value of the bound. */ + value?: number; +} + +/** The utilization entry. */ +export interface UtilizationEntry { + /** The timestamp. */ + timestamp?: Date; + /** The value. */ + value?: number; +} + +/** The regression result. */ +export interface RegressionResult { + /** FileName of the binary being analyzed. */ + fileName?: string; + /** The grade of the test. */ + grade?: Grade; + /** Message that facilitates debugging a particular regression, if any was inferred. */ + details?: string; + /** Difference between the two datasets being analyzed. */ + diff?: number; + /** Indicates if a regression was inferred. */ + isRegressed?: boolean; +} + +/** The test analysis result. */ +export interface TestAnalysisResult { + /** The data to provide more failure analysis information. */ + blobData?: string; + /** The status of the analysis. */ + testAnalysisStatus?: TestAnalysisStatus; + /** The array of identified failures. */ + identifiedFailures?: IdentifiedFailure[]; +} + +/** The failure identified. */ +export interface IdentifiedFailure { + /** The Failure Id. */ + failureId?: string; + /** The category of the failure. */ + category?: Category; + /** Message that shows information about the failure. */ + errorMessage?: string; + /** Guidance that shows what the customer needs to do for this failure. */ + guidance?: string; +} + +export interface BillingHubUsage { + applicationName?: string; + applicationVersion?: string; + azureResourceUri?: string; + totalUsedFreeHours?: number; + totalUsedBillableHours?: number; + totalCharges?: number; + usageGroups?: BillingHubUsageGroup[]; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** The detailed properties of a winget gallery application SKU. */ +export interface WingetAppSkuProperties extends GalleryAppSkuProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + applicationType: "Winget"; + /** The version of a winget gallery application SKU. */ + version?: string; + /** The license description of a winget gallery application SKU. */ + license?: string; + /** The license URL of a winget gallery application SKU. */ + licenseUrl?: string; +} + +/** The properties of Script Execution Result. */ +export interface ScriptExecutionResultSingletonResourceProperties + extends AnalysisResultSingletonResourceProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + analysisResultType: "ScriptExecution"; + /** The result array data. */ + scriptExecutionResults?: ScriptExecutionResult[]; +} + +/** The properties of Reliability Result. */ +export interface ReliabilityResultSingletonResourceProperties + extends AnalysisResultSingletonResourceProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + analysisResultType: "Reliability"; + /** The result array data. */ + reliabilityResults?: ReliabilityResult[]; + /** The result array data for target os in an in-place upgrade test. */ + inplaceUpgradeBaselineReliabilityResults?: ReliabilityResult[]; +} + +/** The properties of CPU Utilization Result. */ +export interface CPUUtilizationResultSingletonResourceProperties + extends AnalysisResultSingletonResourceProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + analysisResultType: "CPUUtilization"; + /** The result array data. */ + cpuUtilizationResults?: UtilizationResult[]; +} + +/** The properties of Memory Utilization Result. */ +export interface MemoryUtilizationResultSingletonResourceProperties + extends AnalysisResultSingletonResourceProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + analysisResultType: "MemoryUtilization"; + /** The result array data. */ + memoryUtilizationResults?: UtilizationResult[]; +} + +/** The properties of CPU Regression Result. */ +export interface CPURegressionResultSingletonResourceProperties + extends AnalysisResultSingletonResourceProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + analysisResultType: "CPURegression"; + /** The result array data. */ + cpuRegressionResults?: RegressionResult[]; +} + +/** The properties of Memory Regression Result. */ +export interface MemoryRegressionResultSingletonResourceProperties + extends AnalysisResultSingletonResourceProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + analysisResultType: "MemoryRegression"; + /** The result array data. */ + memoryRegressionResults?: RegressionResult[]; +} + +/** The properties of Test Analysis Result. */ +export interface TestAnalysisResultSingletonResourceProperties + extends AnalysisResultSingletonResourceProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + analysisResultType: "TestAnalysis"; + /** The result of test analysis. */ + testAnalysisResult?: TestAnalysisResult; +} + +/** The properties of intune credential. */ +export interface IntuneSingletonResourceProperties + extends CredentialProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + credentialType: "IntuneAccount"; + /** The key vault secret path of user name. */ + userNameKeyVaultSecretPath?: string; + /** The key vault secret path of password. */ + passwordKeyVaultSecretPath?: string; +} + +export interface ActionRequest extends ProxyResource { + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + requestType?: RequestTypes; + preReleaseAccessRequestSpec?: PreReleaseAccessRequestSpec; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly creationDate?: Date; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly status?: RequestStatus; +} + +/** The chat session resource. */ +export interface ChatSessionResource extends ProxyResource { + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The test base custom image resource. */ +export interface CustomImageResource extends ProxyResource { + /** The Id of the associated VHD resource. */ + vhdId?: string; + /** Image definition name. */ + definitionName?: string; + /** Image version name. */ + versionName?: string; + /** Custom image source type. */ + source?: ImageSource; + /** + * Product of the custom image. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly product?: string; + /** + * Release of the custom image OS. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly release?: string; + /** + * Status of the custom image. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: ImageStatus; + /** + * The UTC timestamp when the custom image was published. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly creationTime?: Date; + /** + * The validation result of the custom image. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly validationResults?: ImageValidationResults; + /** + * This property indicates the size of the VHD to be created. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osDiskImageSizeInGB?: number; + /** + * The release version date of the release of the custom image OS. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly releaseVersionDate?: Date; + /** + * The file name of the associated VHD resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vhdFileName?: string; + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The test base image definition resource. */ +export interface ImageDefinitionResource extends ProxyResource { + /** Custom image architecture. */ + architecture?: ImageArchitecture; + /** Custom image OS state. */ + osState?: ImageOSState; + /** Custom image security type. */ + securityType?: ImageSecurityType; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly provisioningState?: string; +} + +/** The Test Base VHD resource. */ +export interface VHDResource extends ProxyResource { + /** + * The relative path of the VHD file. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly path?: string; + /** + * The VHD file name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileName?: string; + /** + * The file size in bytes of the VHD file. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileSize?: number; + /** + * The status of the VHD. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: VHDStatus; + /** + * The UTC timestamp when the VHD was created. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly creationTime?: Date; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly provisioningState?: string; +} + +/** The Test Base Draft Package resource. */ +export interface DraftPackageResource extends ProxyResource { + /** Application name */ + applicationName?: string; + /** Application version */ + version?: string; + /** + * The relative path of the folder hosting package files. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly draftPackagePath?: string; + /** + * The relative path for a temporarily folder for package creation work. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly workingPath?: string; + /** The name of the app file. */ + appFileName?: string; + /** The source type. */ + sourceType?: DraftPackageSourceType; + /** Specifies whether a sample package should be used instead of the one uploaded by the user. */ + useSample?: boolean; + /** Comments added by user. */ + comments?: string; + /** Metadata used to generate draft package folder and scripts. */ + intuneMetadata?: DraftPackageIntuneAppMetadata; + /** The highlight files in the package. */ + highlightedFiles?: HighlightedFile[]; + /** Tags of the package to be created. */ + packageTags?: { [propertyName: string]: string }; + /** Specifies whether this draft package is used to edit a package. */ + editPackage?: boolean; + /** Specifies the package id from which the draft package copied. */ + packageId?: string; + /** Indicates whether user choose to enable script auto-fill. */ + useAutofill?: boolean; + /** The executable launch command for script auto-fill. Will be used to run the application. */ + executableLaunchCommand?: string; + /** The process name for script auto-fill. Will be used to identify the application process. */ + processName?: string; + /** Tab state. */ + tabState?: TabState; + /** OOB, functional or flow driven. Mapped to the data in 'tests' property. */ + testTypes?: TestType[]; + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Specifies the target OSs of specific OS Update types. */ + targetOSList?: TargetOSInfo[]; + /** Specifies the baseline os and target os for inplace upgrade. */ + inplaceUpgradeOSPair?: InplaceUpgradeOSInfo; + /** + * The UTC timestamp when the package was last modified. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastModifiedTime?: Date; + /** The flighting ring for feature update. */ + flightingRing?: string; + /** The list of first party applications to test along with user application. */ + firstPartyApps?: FirstPartyAppDefinition[]; + /** The list of gallery apps to test along with user application. */ + galleryApps?: GalleryAppDefinition[]; + /** The detailed test information. */ + tests?: Test[]; + /** The metadata of Intune enrollment. */ + intuneEnrollmentMetadata?: IntuneEnrollmentMetadata; +} + +/** The Free Hour Balance Resource. */ +export interface FreeHourBalanceResource extends ProxyResource { + totalRemainingFreeHours?: number; + incrementEntries?: BillingHubFreeHourIncrementEntry[]; +} + +/** The Available OS resource. */ +export interface AvailableOSResource extends ProxyResource { + /** The Id of an Available OS of a Test Base Account. */ + osId?: string; + /** The name of an Available OS of a Test Base Account. */ + osName?: string; + /** The version of an Available OS of a Test Base Account. */ + osVersion?: string; + /** The insider channel of an Available OS of a Test Base Account. */ + insiderChannel?: string; + /** The OS update type of an Available OS of a Test Base Account. */ + osUpdateType?: string; + /** The Platform of an Available OS of a Test Base Account. */ + osPlatform?: string; +} + +/** Feature update supported OSes proxy resource. */ +export interface FeatureUpdateSupportedOsesResource extends ProxyResource { + osId?: string; + osName?: string; + insiderChannel?: string; + version?: string; + displayText?: string; + baselineProducts?: string[]; + /** Timestamp when the OS starts to be supported. */ + startTime?: Date; + /** State of the OS product. */ + state?: OsProductState; +} + +/** The flighting ring resource. */ +export interface FlightingRingResource extends ProxyResource { + /** The actual name of a flighting ring of a Test Base Account. */ + actualFlightingRingName?: string; +} + +/** The first party application resource. */ +export interface FirstPartyAppResource extends ProxyResource { + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The media type of a first party application of a Test Base Account. */ + mediaType?: string; + /** The architecture of a first party application of a Test Base Account. */ + architecture?: Architecture; + /** The channel info of a first party application of a Test Base Account. */ + channel?: string; + /** The ring info of a first party application of a Test Base Account. */ + ring?: string; + /** The supported OS products of a first party application of a Test Base Account. */ + supportedProducts?: string[]; +} + +/** The gallery application resource. */ +export interface GalleryAppResource extends ProxyResource { + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The application type of a gallery application. */ + applicationType?: ApplicationType; + /** The id of a gallery application. */ + applicationId?: string; + /** The name of a gallery application. */ + applicationName?: string; + /** The number of users using a gallery application. */ + popularity?: number; +} + +/** The gallery application resource. */ +export interface GalleryAppSkuResource extends ProxyResource { + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The application type of a gallery application. */ + applicationType?: ApplicationType; +} + +/** The test type resource. */ +export interface TestTypeResource extends ProxyResource { + /** The actual name of a test type of a Test Base Account. */ + actualTestTypeName?: string; +} + +/** Summary of a Test. */ +export interface TestSummaryResource extends ProxyResource { + /** The Id of the current Test Summary. */ + testSummaryId?: string; + /** The Azure resource Id of package. */ + packageId?: string; + /** Application name. */ + applicationName?: string; + /** Application version. */ + applicationVersion?: string; + /** The execution status of last test. */ + executionStatus?: ExecutionStatus; + /** The status of last test. */ + testStatus?: TestStatus; + /** The grade of the test. */ + grade?: Grade; + /** The run time of the last test. */ + testRunTime?: string; + /** The result summary of tests triggered by feature updates */ + featureUpdatesTestSummary?: OSUpdatesTestSummary; + /** The result summary of tests triggered by security updates */ + securityUpdatesTestSummary?: OSUpdatesTestSummary; + /** The result summary of tests triggered by in-place upgrades */ + inplaceUpgradesTestSummary?: OSUpdatesTestSummary; + /** The tags of Package resource that are associated with the testSummary */ + packageTags?: { [propertyName: string]: string }; +} + +/** The Test Result Resource. */ +export interface TestResultResource extends ProxyResource { + /** Azure Id of the baseline test result. */ + baselineTestResultId?: string; + /** Resource Id of the package. */ + packageId?: string; + /** Application name. */ + applicationName?: string; + /** Application version. */ + applicationVersion?: string; + /** The operating system name, e.g. Windows 10 1809. */ + osName?: string; + /** Specify the referenced Test Base Custom Image Id if applicable. */ + customImageId?: string; + /** The name of the custom image resource. */ + customImageDisplayName?: string; + /** The name of the tested release (OS update). */ + releaseName?: string; + /** The release version date of the tested release. */ + releaseVersionDate?: Date; + /** The flighting ring, only for release of feature updates. */ + flightingRing?: string; + /** The build version of the tested release (OS update). */ + buildVersion?: string; + /** The build revision of the tested release (OS update). */ + buildRevision?: string; + /** Test type. E.g. 'Out of box test' or 'Functional test'. */ + testType?: string; + /** The run time of the test. */ + testRunTime?: string; + /** Whether download data is available. */ + isDownloadDataAvailable?: boolean; + /** Whether video data is available. */ + isVideoAvailable?: boolean; + /** The execution status of the test. */ + executionStatus?: ExecutionStatus; + /** The status of the test. */ + testStatus?: TestStatus; + /** The grade of the test. */ + grade?: Grade; + /** KB number. */ + kbNumber?: string; + /** Interop media type. */ + interopMediaType?: string; + /** Interop media version. */ + interopMediaVersion?: string; + /** The version of the Windows update package. */ + packageVersion?: string; + /** List of analysis summaries. */ + analysisSummaries?: TestResultAnalysisSummary[]; + /** Properties for inplace upgrade test. */ + inplaceUpgradeProperties?: InplaceUpgradeProperties; + /** The time when test starts. */ + testStartTime?: Date; + /** The time when test ends. */ + testEndTime?: Date; + /** The list of first party applications tested along with the package. */ + firstPartyApps?: TestResultFirstPartyAppDefinition[]; +} + +/** An OS Update. */ +export interface OSUpdateResource extends ProxyResource { + /** The name of the OS. */ + osName?: string; + /** The name of tested release. */ + release?: string; + /** The flighting ring, only for release of feature updates. */ + flightingRing?: string; + /** The build version of the tested release (OS update). */ + buildVersion?: string; + /** The build revision of the tested release (OS update) */ + buildRevision?: string; + /** The type of this release (OS update). */ + typePropertiesType?: Type; + /** The release version date the tested release (OS update) */ + releaseVersionDate?: Date; + /** The properties of baseline os for in-place upgrade test. */ + inplaceUpgradeBaselineProperties?: OsProperties; + /** Specify the referenced Test Base Custom Image Id if available. */ + customImageId?: string; + /** The name of the custom image resource. */ + customImageDisplayName?: string; +} + +/** A favorite process identifier. */ +export interface FavoriteProcessResource extends ProxyResource { + /** The actual name of the favorite process. It will be equal to resource name except for the scenario that the process name contains characters that are not allowed in the resource name. */ + actualProcessName?: string; +} + +/** The Analysis Result Singleton Resource. */ +export interface AnalysisResultSingletonResource extends ProxyResource { + /** The grade of the test. */ + grade?: Grade; + /** Type of the Analysis Result. */ + analysisResultType?: AnalysisResultType; +} + +/** The email event resource. */ +export interface EmailEventResource extends ProxyResource { + /** The identifier of the email event. */ + eventId?: string; + /** The name of the email event. */ + eventName?: string; + /** The display name of the email event. */ + displayName?: string; +} + +/** The Customer Notification Event resource. */ +export interface CustomerEventResource extends ProxyResource { + /** The name of the event subscribed to. */ + eventName?: string; + /** The notification event receivers. */ + receivers?: NotificationEventReceiver[]; +} + +/** The Available In-place Upgrade OS Map resource. */ +export interface AvailableInplaceUpgradeOSResource extends ProxyResource { + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The name of an Available In-place Upgrade source OS of a Test Base Account. */ + sourceOsName?: string; + /** The the release list of the source os. */ + sourceOsReleases?: ReleaseProperties[]; + /** The list of the corresponding Available In-place Upgrade target OS name of a Test Base Account. */ + supportedTargetOsNameList?: string[]; +} + +/** The test base credential resource. */ +export interface CredentialResource extends ProxyResource { + /** Credential type. */ + credentialType?: CredentialType; + /** Credential display name. */ + displayName?: string; +} + +/** The Test Base Account resource. */ +export interface TestBaseAccountResource extends TrackedResource { + /** The identity of the testBaseAccount. */ + identity?: SystemAssignedServiceIdentity; + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The SKU of the Test Base Account. */ + sku?: TestBaseAccountSKU; + /** + * The access level of the Test Base Account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly accessLevel?: string; +} + +/** The Test Base Package resource. */ +export interface PackageResource extends TrackedResource { + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Application name */ + applicationName?: string; + /** Application version */ + version?: string; + /** The id of draft package. Used to create or update this package from a draft package. */ + draftPackageId?: string; + /** + * The status of the package. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly packageStatus?: PackageStatus; + /** + * Flag showing that whether the package is enabled. It doesn't schedule test for package which is not enabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isEnabled?: boolean; + /** The file path of the package. */ + blobPath?: string; + /** + * The validation results. There's validation on package when it's created or updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly validationResults?: PackageValidationResult[]; + /** + * OOB, functional or flow driven. Mapped to the data in 'tests' property. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly testTypes?: TestType[]; + /** Specifies the target OSs of specific OS Update types. */ + targetOSList?: TargetOSInfo[]; + /** Specifies the baseline os and target os for inplace upgrade. */ + inplaceUpgradeOSPair?: InplaceUpgradeOSInfo; + /** + * The UTC timestamp when the package was last modified. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastModifiedTime?: Date; + /** The flighting ring for feature update. */ + flightingRing?: string; + /** The list of first party applications to test along with user application. */ + firstPartyApps?: FirstPartyAppDefinition[]; + /** + * The list of gallery apps to test along with user application. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly galleryApps?: GalleryAppDefinition[]; + /** The detailed test information. */ + tests?: Test[]; + /** The metadata of Intune enrollment. */ + intuneEnrollmentMetadata?: IntuneEnrollmentMetadata; +} + +/** Defines headers for ChatSession_chat operation. */ +export interface ChatSessionChatHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for CustomImages_create operation. */ +export interface CustomImagesCreateHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for CustomImages_delete operation. */ +export interface CustomImagesDeleteHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for DraftPackages_copyFromPackage operation. */ +export interface DraftPackagesCopyFromPackageHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for DraftPackages_extractFile operation. */ +export interface DraftPackagesExtractFileHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for DraftPackages_generateFoldersAndScripts operation. */ +export interface DraftPackagesGenerateFoldersAndScriptsHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for TestBaseAccounts_create operation. */ +export interface TestBaseAccountsCreateHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for TestBaseAccounts_update operation. */ +export interface TestBaseAccountsUpdateHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for TestBaseAccounts_delete operation. */ +export interface TestBaseAccountsDeleteHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for TestBaseAccounts_offboard operation. */ +export interface TestBaseAccountsOffboardHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for Packages_create operation. */ +export interface PackagesCreateHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Packages_update operation. */ +export interface PackagesUpdateHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for Packages_delete operation. */ +export interface PackagesDeleteHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for Packages_hardDelete operation. */ +export interface PackagesHardDeleteHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for Packages_runTest operation. */ +export interface PackagesRunTestHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Defines headers for CustomerEvents_create operation. */ +export interface CustomerEventsCreateHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for CustomerEvents_delete operation. */ +export interface CustomerEventsDeleteHeaders { + /** URL to query for status of the operation. */ + azureAsyncOperation?: string; + /** URL to query for status of the operation. */ + location?: string; +} + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Cancelled */ + Cancelled = "Cancelled", + /** Creating */ + Creating = "Creating", + /** Deleting */ + Deleting = "Deleting", + /** Updating */ + Updating = "Updating" +} + +/** + * 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 + * **Succeeded** \ + * **Failed** \ + * **Cancelled** \ + * **Creating** \ + * **Deleting** \ + * **Updating** + */ +export type ProvisioningState = string; + +/** Known values of {@link RequestTypes} that the service accepts. */ +export enum KnownRequestTypes { + /** PreReleaseAccess */ + PreReleaseAccess = "PreReleaseAccess" +} + +/** + * Defines values for RequestTypes. \ + * {@link KnownRequestTypes} can be used interchangeably with RequestTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PreReleaseAccess** + */ +export type RequestTypes = string; + +/** Known values of {@link Engagements} that the service accepts. */ +export enum KnownEngagements { + /** MVI */ + MVI = "MVI", + /** MVP */ + MVP = "MVP", + /** Suvp */ + Suvp = "SUVP", + /** Mapp */ + Mapp = "MAPP", + /** Other */ + Other = "Other" +} + +/** + * Defines values for Engagements. \ + * {@link KnownEngagements} can be used interchangeably with Engagements, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MVI** \ + * **MVP** \ + * **SUVP** \ + * **MAPP** \ + * **Other** + */ +export type Engagements = string; + +/** Known values of {@link RequestStatus} that the service accepts. */ +export enum KnownRequestStatus { + /** InReview */ + InReview = "InReview", + /** Approved */ + Approved = "Approved", + /** Declined */ + Declined = "Declined" +} + +/** + * Defines values for RequestStatus. \ + * {@link KnownRequestStatus} can be used interchangeably with RequestStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **InReview** \ + * **Approved** \ + * **Declined** + */ +export type RequestStatus = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link ImageSource} that the service accepts. */ +export enum KnownImageSource { + /** Unknown image source type. */ + Unknown = "Unknown", + /** Specify image onboarding through VHD. */ + VHD = "VHD" +} + +/** + * Defines values for ImageSource. \ + * {@link KnownImageSource} can be used interchangeably with ImageSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown image source type. \ + * **VHD**: Specify image onboarding through VHD. + */ +export type ImageSource = string; + +/** Known values of {@link ImageStatus} that the service accepts. */ +export enum KnownImageStatus { + /** Unknown image status. */ + Unknown = "Unknown", + /** Completed validation and is ready for use. */ + Ready = "Ready", + /** Failed to onboard or pass validation. */ + Failed = "Failed", + /** Succeed to onboard but is in validation process. */ + Validating = "Validating" +} + +/** + * Defines values for ImageStatus. \ + * {@link KnownImageStatus} can be used interchangeably with ImageStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown image status. \ + * **Ready**: Completed validation and is ready for use. \ + * **Failed**: Failed to onboard or pass validation. \ + * **Validating**: Succeed to onboard but is in validation process. + */ +export type ImageStatus = string; + +/** Known values of {@link VerificationStatus} that the service accepts. */ +export enum KnownVerificationStatus { + /** Validation or rule checking passed. */ + Passed = "Passed", + /** Validation or rule checking failed. */ + Failed = "Failed" +} + +/** + * Defines values for VerificationStatus. \ + * {@link KnownVerificationStatus} can be used interchangeably with VerificationStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Passed**: Validation or rule checking passed. \ + * **Failed**: Validation or rule checking failed. + */ +export type VerificationStatus = string; + +/** Known values of {@link ImageArchitecture} that the service accepts. */ +export enum KnownImageArchitecture { + /** 64-bit architecture. */ + X64 = "x64" +} + +/** + * Defines values for ImageArchitecture. \ + * {@link KnownImageArchitecture} can be used interchangeably with ImageArchitecture, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **x64**: 64-bit architecture. + */ +export type ImageArchitecture = string; + +/** Known values of {@link ImageOSState} that the service accepts. */ +export enum KnownImageOSState { + /** Sysprep generalization processed. */ + Generalized = "Generalized", + /** Fully kept with user specified settings. */ + Specialized = "Specialized" +} + +/** + * Defines values for ImageOSState. \ + * {@link KnownImageOSState} can be used interchangeably with ImageOSState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Generalized**: Sysprep generalization processed. \ + * **Specialized**: Fully kept with user specified settings. + */ +export type ImageOSState = string; + +/** Known values of {@link ImageSecurityType} that the service accepts. */ +export enum KnownImageSecurityType { + /** Standard security type. */ + Standard = "Standard", + /** Specify higher security level compared to Standard. */ + TrustedLaunch = "TrustedLaunch" +} + +/** + * Defines values for ImageSecurityType. \ + * {@link KnownImageSecurityType} can be used interchangeably with ImageSecurityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard security type. \ + * **TrustedLaunch**: Specify higher security level compared to Standard. + */ +export type ImageSecurityType = string; + +/** Known values of {@link VHDStatus} that the service accepts. */ +export enum KnownVHDStatus { + /** Unknown VHD status. */ + Unknown = "Unknown", + /** Succeed to be upload and pass VHD verification. */ + Ready = "Ready", + /** Failed to pass VHD verification. */ + Failed = "Failed", + /** Processing VHD file checking and malware scanning. */ + Verifying = "Verifying", + /** An image is onboarding with this VHD. */ + Occupied = "Occupied" +} + +/** + * Defines values for VHDStatus. \ + * {@link KnownVHDStatus} can be used interchangeably with VHDStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown VHD status. \ + * **Ready**: Succeed to be upload and pass VHD verification. \ + * **Failed**: Failed to pass VHD verification. \ + * **Verifying**: Processing VHD file checking and malware scanning. \ + * **Occupied**: An image is onboarding with this VHD. + */ +export type VHDStatus = string; + +/** Known values of {@link DraftPackageSourceType} that the service accepts. */ +export enum KnownDraftPackageSourceType { + /** Native */ + Native = "Native", + /** IntuneWin */ + IntuneWin = "IntuneWin", + /** TestBasePackage */ + TestBasePackage = "TestBasePackage", + /** GalleryApp */ + GalleryApp = "GalleryApp", + /** IntuneEnrollment */ + IntuneEnrollment = "IntuneEnrollment" +} + +/** + * Defines values for DraftPackageSourceType. \ + * {@link KnownDraftPackageSourceType} can be used interchangeably with DraftPackageSourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Native** \ + * **IntuneWin** \ + * **TestBasePackage** \ + * **GalleryApp** \ + * **IntuneEnrollment** + */ +export type DraftPackageSourceType = string; + +/** Known values of {@link IntuneExtractStatus} that the service accepts. */ +export enum KnownIntuneExtractStatus { + /** Ready */ + Ready = "Ready", + /** Uploading */ + Uploading = "Uploading", + /** UploadFailed */ + UploadFailed = "UploadFailed", + /** ExtractFailed */ + ExtractFailed = "ExtractFailed", + /** NoDependencyApp */ + NoDependencyApp = "NoDependencyApp" +} + +/** + * Defines values for IntuneExtractStatus. \ + * {@link KnownIntuneExtractStatus} can be used interchangeably with IntuneExtractStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Ready** \ + * **Uploading** \ + * **UploadFailed** \ + * **ExtractFailed** \ + * **NoDependencyApp** + */ +export type IntuneExtractStatus = string; + +/** Known values of {@link PackageStudioTabs} that the service accepts. */ +export enum KnownPackageStudioTabs { + /** Unspecified */ + Unspecified = "Unspecified", + /** BasicsTab */ + BasicsTab = "BasicsTab", + /** ConfigureTestTab */ + ConfigureTestTab = "ConfigureTestTab", + /** EditPackageTab */ + EditPackageTab = "EditPackageTab", + /** TestMatrixTab */ + TestMatrixTab = "TestMatrixTab", + /** TagsTab */ + TagsTab = "TagsTab", + /** ReviewAndCreateTab */ + ReviewAndCreateTab = "ReviewAndCreateTab" +} + +/** + * Defines values for PackageStudioTabs. \ + * {@link KnownPackageStudioTabs} can be used interchangeably with PackageStudioTabs, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unspecified** \ + * **BasicsTab** \ + * **ConfigureTestTab** \ + * **EditPackageTab** \ + * **TestMatrixTab** \ + * **TagsTab** \ + * **ReviewAndCreateTab** + */ +export type PackageStudioTabs = string; + +/** Known values of {@link TestType} that the service accepts. */ +export enum KnownTestType { + /** OutOfBoxTest */ + OutOfBoxTest = "OutOfBoxTest", + /** FunctionalTest */ + FunctionalTest = "FunctionalTest", + /** FlowDrivenTest */ + FlowDrivenTest = "FlowDrivenTest" +} + +/** + * Defines values for TestType. \ + * {@link KnownTestType} can be used interchangeably with TestType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **OutOfBoxTest** \ + * **FunctionalTest** \ + * **FlowDrivenTest** + */ +export type TestType = string; + +/** Known values of {@link Architecture} that the service accepts. */ +export enum KnownArchitecture { + /** X86 */ + X86 = "x86", + /** X64 */ + X64 = "x64", + /** Arm64 */ + Arm64 = "arm64" +} + +/** + * Defines values for Architecture. \ + * {@link KnownArchitecture} can be used interchangeably with Architecture, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **x86** \ + * **x64** \ + * **arm64** + */ +export type Architecture = string; + +/** Known values of {@link InteropExecutionMode} that the service accepts. */ +export enum KnownInteropExecutionMode { + /** User application will test with the first party applications. For out-of-box tests, additional test cases for first party applications will also be run. */ + FirstPartyAppWithTests = "firstPartyAppWithTests", + /** User application will test with the first party applications. */ + FirstPartyApp = "firstPartyApp" +} + +/** + * Defines values for InteropExecutionMode. \ + * {@link KnownInteropExecutionMode} can be used interchangeably with InteropExecutionMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **firstPartyAppWithTests**: User application will test with the first party applications. For out-of-box tests, additional test cases for first party applications will also be run. \ + * **firstPartyApp**: User application will test with the first party applications. + */ +export type InteropExecutionMode = string; + +/** Known values of {@link ValidationRunStatus} that the service accepts. */ +export enum KnownValidationRunStatus { + /** Unknown */ + Unknown = "Unknown", + /** Pending */ + Pending = "Pending", + /** Passed */ + Passed = "Passed", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for ValidationRunStatus. \ + * {@link KnownValidationRunStatus} can be used interchangeably with ValidationRunStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Pending** \ + * **Passed** \ + * **Failed** + */ +export type ValidationRunStatus = string; + +/** Known values of {@link Action} that the service accepts. */ +export enum KnownAction { + /** Install */ + Install = "Install", + /** Launch */ + Launch = "Launch", + /** Close */ + Close = "Close", + /** Uninstall */ + Uninstall = "Uninstall", + /** Custom */ + Custom = "Custom", + /** FlowDrivenCustom */ + FlowDrivenCustom = "FlowDrivenCustom" +} + +/** + * Defines values for Action. \ + * {@link KnownAction} can be used interchangeably with Action, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Install** \ + * **Launch** \ + * **Close** \ + * **Uninstall** \ + * **Custom** \ + * **FlowDrivenCustom** + */ +export type Action = string; + +/** Known values of {@link ContentType} that the service accepts. */ +export enum KnownContentType { + /** Inline */ + Inline = "Inline", + /** File */ + File = "File", + /** Path */ + Path = "Path" +} + +/** + * Defines values for ContentType. \ + * {@link KnownContentType} can be used interchangeably with ContentType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inline** \ + * **File** \ + * **Path** + */ +export type ContentType = string; + +/** Known values of {@link ExtractFileType} that the service accepts. */ +export enum KnownExtractFileType { + /** TestBasePackage */ + TestBasePackage = "TestBasePackage", + /** IntuneWinPackage */ + IntuneWinPackage = "IntuneWinPackage" +} + +/** + * Defines values for ExtractFileType. \ + * {@link KnownExtractFileType} can be used interchangeably with ExtractFileType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TestBasePackage** \ + * **IntuneWinPackage** + */ +export type ExtractFileType = string; + +/** Known values of {@link FreeHourType} that the service accepts. */ +export enum KnownFreeHourType { + /** Permanent */ + Permanent = "Permanent", + /** Temporary */ + Temporary = "Temporary" +} + +/** + * Defines values for FreeHourType. \ + * {@link KnownFreeHourType} can be used interchangeably with FreeHourType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Permanent** \ + * **Temporary** + */ +export type FreeHourType = string; + +/** Known values of {@link FreeHourStatus} that the service accepts. */ +export enum KnownFreeHourStatus { + /** Enabled */ + Enabled = "Enabled", + /** Suspended */ + Suspended = "Suspended" +} + +/** + * Defines values for FreeHourStatus. \ + * {@link KnownFreeHourStatus} can be used interchangeably with FreeHourStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Suspended** + */ +export type FreeHourStatus = string; + +/** Known values of {@link FreeHourBalanceName} that the service accepts. */ +export enum KnownFreeHourBalanceName { + /** TenantLevel */ + TenantLevel = "TenantLevel", + /** SubscriptionLevel */ + SubscriptionLevel = "SubscriptionLevel" +} + +/** + * Defines values for FreeHourBalanceName. \ + * {@link KnownFreeHourBalanceName} can be used interchangeably with FreeHourBalanceName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TenantLevel** \ + * **SubscriptionLevel** + */ +export type FreeHourBalanceName = string; + +/** Known values of {@link Tier} that the service accepts. */ +export enum KnownTier { + /** Standard */ + Standard = "Standard" +} + +/** + * Defines values for Tier. \ + * {@link KnownTier} can be used interchangeably with Tier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard** + */ +export type Tier = string; + +/** Known values of {@link SystemAssignedServiceIdentityType} that the service accepts. */ +export enum KnownSystemAssignedServiceIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned" +} + +/** + * Defines values for SystemAssignedServiceIdentityType. \ + * {@link KnownSystemAssignedServiceIdentityType} can be used interchangeably with SystemAssignedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** + */ +export type SystemAssignedServiceIdentityType = string; + +/** Known values of {@link FileUploadResourceType} that the service accepts. */ +export enum KnownFileUploadResourceType { + /** Upload file for package onboarding. */ + Package = "Package", + /** Upload VHD file for image onboarding. */ + VHD = "VHD" +} + +/** + * Defines values for FileUploadResourceType. \ + * {@link KnownFileUploadResourceType} can be used interchangeably with FileUploadResourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Package**: Upload file for package onboarding. \ + * **VHD**: Upload VHD file for image onboarding. + */ +export type FileUploadResourceType = string; + +/** Known values of {@link OsUpdateType} that the service accepts. */ +export enum KnownOsUpdateType { + /** SecurityUpdate */ + SecurityUpdate = "SecurityUpdate", + /** FeatureUpdate */ + FeatureUpdate = "FeatureUpdate", + /** InplaceUpgrade */ + InplaceUpgrade = "InplaceUpgrade" +} + +/** + * Defines values for OsUpdateType. \ + * {@link KnownOsUpdateType} can be used interchangeably with OsUpdateType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SecurityUpdate** \ + * **FeatureUpdate** \ + * **InplaceUpgrade** + */ +export type OsUpdateType = string; + +/** Known values of {@link OsProductState} that the service accepts. */ +export enum KnownOsProductState { + /** Disabled */ + Disabled = "Disabled", + /** Active */ + Active = "Active" +} + +/** + * Defines values for OsProductState. \ + * {@link KnownOsProductState} can be used interchangeably with OsProductState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Active** + */ +export type OsProductState = string; + +/** Known values of {@link ApplicationType} that the service accepts. */ +export enum KnownApplicationType { + /** Winget */ + Winget = "Winget" +} + +/** + * Defines values for ApplicationType. \ + * {@link KnownApplicationType} can be used interchangeably with ApplicationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Winget** + */ +export type ApplicationType = string; + +/** Known values of {@link OrderBy} that the service accepts. */ +export enum KnownOrderBy { + /** Popularity */ + Popularity = "popularity", + /** Relevance */ + Relevance = "relevance" +} + +/** + * Defines values for OrderBy. \ + * {@link KnownOrderBy} can be used interchangeably with OrderBy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **popularity** \ + * **relevance** + */ +export type OrderBy = string; + +/** Known values of {@link Reason} that the service accepts. */ +export enum KnownReason { + /** Invalid */ + Invalid = "Invalid", + /** AlreadyExists */ + AlreadyExists = "AlreadyExists" +} + +/** + * Defines values for Reason. \ + * {@link KnownReason} can be used interchangeably with Reason, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **AlreadyExists** + */ +export type Reason = string; + +/** Known values of {@link PackageStatus} that the service accepts. */ +export enum KnownPackageStatus { + /** Unknown */ + Unknown = "Unknown", + /** Registered */ + Registered = "Registered", + /** Ready */ + Ready = "Ready", + /** Error */ + Error = "Error", + /** ValidatingPackage */ + ValidatingPackage = "ValidatingPackage", + /** PreValidationCheckPass */ + PreValidationCheckPass = "PreValidationCheckPass", + /** Deleted */ + Deleted = "Deleted", + /** ValidationLongerThanUsual */ + ValidationLongerThanUsual = "ValidationLongerThanUsual", + /** VerifyingPackage */ + VerifyingPackage = "VerifyingPackage" +} + +/** + * Defines values for PackageStatus. \ + * {@link KnownPackageStatus} can be used interchangeably with PackageStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Registered** \ + * **Ready** \ + * **Error** \ + * **ValidatingPackage** \ + * **PreValidationCheckPass** \ + * **Deleted** \ + * **ValidationLongerThanUsual** \ + * **VerifyingPackage** + */ +export type PackageStatus = string; + +/** Known values of {@link ExecutionStatus} that the service accepts. */ +export enum KnownExecutionStatus { + /** None */ + None = "None", + /** InProgress */ + InProgress = "InProgress", + /** Processing */ + Processing = "Processing", + /** Completed */ + Completed = "Completed", + /** NotExecuted */ + NotExecuted = "NotExecuted", + /** Incomplete */ + Incomplete = "Incomplete", + /** Failed */ + Failed = "Failed", + /** Succeeded */ + Succeeded = "Succeeded" +} + +/** + * Defines values for ExecutionStatus. \ + * {@link KnownExecutionStatus} can be used interchangeably with ExecutionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **InProgress** \ + * **Processing** \ + * **Completed** \ + * **NotExecuted** \ + * **Incomplete** \ + * **Failed** \ + * **Succeeded** + */ +export type ExecutionStatus = string; + +/** Known values of {@link TestStatus} that the service accepts. */ +export enum KnownTestStatus { + /** None */ + None = "None", + /** TestExecutionInProgress */ + TestExecutionInProgress = "TestExecutionInProgress", + /** DataProcessing */ + DataProcessing = "DataProcessing", + /** TestFailure */ + TestFailure = "TestFailure", + /** UpdateFailure */ + UpdateFailure = "UpdateFailure", + /** TestAndUpdateFailure */ + TestAndUpdateFailure = "TestAndUpdateFailure", + /** InfrastructureFailure */ + InfrastructureFailure = "InfrastructureFailure", + /** Completed */ + Completed = "Completed" +} + +/** + * Defines values for TestStatus. \ + * {@link KnownTestStatus} can be used interchangeably with TestStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **TestExecutionInProgress** \ + * **DataProcessing** \ + * **TestFailure** \ + * **UpdateFailure** \ + * **TestAndUpdateFailure** \ + * **InfrastructureFailure** \ + * **Completed** + */ +export type TestStatus = string; + +/** Known values of {@link Grade} that the service accepts. */ +export enum KnownGrade { + /** None */ + None = "None", + /** NotAvailable */ + NotAvailable = "NotAvailable", + /** Pass */ + Pass = "Pass", + /** Fail */ + Fail = "Fail" +} + +/** + * Defines values for Grade. \ + * {@link KnownGrade} can be used interchangeably with Grade, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **NotAvailable** \ + * **Pass** \ + * **Fail** + */ +export type Grade = string; + +/** Known values of {@link AnalysisStatus} that the service accepts. */ +export enum KnownAnalysisStatus { + /** None */ + None = "None", + /** Completed */ + Completed = "Completed", + /** InProgress */ + InProgress = "InProgress", + /** Failed */ + Failed = "Failed", + /** Succeeded */ + Succeeded = "Succeeded", + /** Available */ + Available = "Available", + /** NotAvailable */ + NotAvailable = "NotAvailable" +} + +/** + * Defines values for AnalysisStatus. \ + * {@link KnownAnalysisStatus} can be used interchangeably with AnalysisStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Completed** \ + * **InProgress** \ + * **Failed** \ + * **Succeeded** \ + * **Available** \ + * **NotAvailable** + */ +export type AnalysisStatus = string; + +/** Known values of {@link Type} that the service accepts. */ +export enum KnownType { + /** SecurityUpdate */ + SecurityUpdate = "SecurityUpdate", + /** FeatureUpdate */ + FeatureUpdate = "FeatureUpdate", + /** InplaceUpgrade */ + InplaceUpgrade = "InplaceUpgrade" +} + +/** + * Defines values for Type. \ + * {@link KnownType} can be used interchangeably with Type, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SecurityUpdate** \ + * **FeatureUpdate** \ + * **InplaceUpgrade** + */ +export type Type = string; + +/** Known values of {@link AnalysisResultType} that the service accepts. */ +export enum KnownAnalysisResultType { + /** ScriptExecution */ + ScriptExecution = "ScriptExecution", + /** Reliability */ + Reliability = "Reliability", + /** CPUUtilization */ + CPUUtilization = "CPUUtilization", + /** MemoryUtilization */ + MemoryUtilization = "MemoryUtilization", + /** CPURegression */ + CPURegression = "CPURegression", + /** MemoryRegression */ + MemoryRegression = "MemoryRegression", + /** TestAnalysis */ + TestAnalysis = "TestAnalysis" +} + +/** + * Defines values for AnalysisResultType. \ + * {@link KnownAnalysisResultType} can be used interchangeably with AnalysisResultType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ScriptExecution** \ + * **Reliability** \ + * **CPUUtilization** \ + * **MemoryUtilization** \ + * **CPURegression** \ + * **MemoryRegression** \ + * **TestAnalysis** + */ +export type AnalysisResultType = string; + +/** Known values of {@link AnalysisResultName} that the service accepts. */ +export enum KnownAnalysisResultName { + /** ScriptExecution */ + ScriptExecution = "scriptExecution", + /** Reliability */ + Reliability = "reliability", + /** MemoryUtilization */ + MemoryUtilization = "memoryUtilization", + /** CpuUtilization */ + CpuUtilization = "cpuUtilization", + /** MemoryRegression */ + MemoryRegression = "memoryRegression", + /** CpuRegression */ + CpuRegression = "cpuRegression", + /** TestAnalysis */ + TestAnalysis = "testAnalysis" +} + +/** + * Defines values for AnalysisResultName. \ + * {@link KnownAnalysisResultName} can be used interchangeably with AnalysisResultName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **scriptExecution** \ + * **reliability** \ + * **memoryUtilization** \ + * **cpuUtilization** \ + * **memoryRegression** \ + * **cpuRegression** \ + * **testAnalysis** + */ +export type AnalysisResultName = string; + +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system" +} + +/** + * Defines values for Origin. \ + * {@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** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal" +} + +/** + * Defines values for ActionType. \ + * {@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** + */ +export type ActionType = string; + +/** Known values of {@link CredentialType} that the service accepts. */ +export enum KnownCredentialType { + /** Username password credential for intune enrollment. */ + IntuneAccount = "IntuneAccount" +} + +/** + * Defines values for CredentialType. \ + * {@link KnownCredentialType} can be used interchangeably with CredentialType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IntuneAccount**: Username password credential for intune enrollment. + */ +export type CredentialType = string; + +/** Known values of {@link TestAnalysisStatus} that the service accepts. */ +export enum KnownTestAnalysisStatus { + /** None */ + None = "None", + /** Analyzing */ + Analyzing = "Analyzing", + /** Completed */ + Completed = "Completed", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for TestAnalysisStatus. \ + * {@link KnownTestAnalysisStatus} can be used interchangeably with TestAnalysisStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Analyzing** \ + * **Completed** \ + * **Failed** + */ +export type TestAnalysisStatus = string; + +/** Known values of {@link Category} that the service accepts. */ +export enum KnownCategory { + /** None */ + None = "None", + /** Unidentified */ + Unidentified = "Unidentified", + /** Package */ + Package = "Package", + /** OSUpdate */ + OSUpdate = "OSUpdate", + /** Infrastructure */ + Infrastructure = "Infrastructure" +} + +/** + * Defines values for Category. \ + * {@link KnownCategory} can be used interchangeably with Category, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Unidentified** \ + * **Package** \ + * **OSUpdate** \ + * **Infrastructure** + */ +export type Category = string; + +/** Optional parameters. */ +export interface ActionRequestsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ActionRequestsGetResponse = ActionRequest; + +/** Optional parameters. */ +export interface ActionRequestsPutOptionalParams + extends coreClient.OperationOptions { + actionRequest?: ActionRequest; +} + +/** Contains response data for the put operation. */ +export type ActionRequestsPutResponse = ActionRequest; + +/** Optional parameters. */ +export interface ActionRequestsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ActionRequestsListOptionalParams + extends coreClient.OperationOptions { + requestType?: string; + /** How many of the sorted items to consider including in the result set. */ + top?: number; +} + +/** Contains response data for the list operation. */ +export type ActionRequestsListResponse = ActionRequests; + +/** Optional parameters. */ +export interface ActionRequestsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ActionRequestsListNextResponse = ActionRequests; + +/** Optional parameters. */ +export interface ChatSessionsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ChatSessionsListResponse = ChatSessionResourceListResult; + +/** Optional parameters. */ +export interface ChatSessionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ChatSessionsGetResponse = ChatSessionResource; + +/** Optional parameters. */ +export interface ChatSessionsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ChatSessionsListNextResponse = ChatSessionResourceListResult; + +/** Optional parameters. */ +export interface ChatSessionChatOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the chat operation. */ +export type ChatSessionChatResponse = ChatResponse; + +/** Optional parameters. */ +export interface CustomImagesListByTestBaseAccountOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccount operation. */ +export type CustomImagesListByTestBaseAccountResponse = CustomImageListResult; + +/** Optional parameters. */ +export interface CustomImagesCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type CustomImagesCreateResponse = CustomImageResource; + +/** Optional parameters. */ +export interface CustomImagesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type CustomImagesDeleteResponse = CustomImagesDeleteHeaders; + +/** Optional parameters. */ +export interface CustomImagesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type CustomImagesGetResponse = CustomImageResource; + +/** Optional parameters. */ +export interface CustomImagesCheckImageNameAvailabilityOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the checkImageNameAvailability operation. */ +export type CustomImagesCheckImageNameAvailabilityResponse = VerificationResult; + +/** Optional parameters. */ +export interface CustomImagesListByTestBaseAccountNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccountNext operation. */ +export type CustomImagesListByTestBaseAccountNextResponse = CustomImageListResult; + +/** Optional parameters. */ +export interface ImageDefinitionsListByTestBaseAccountOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccount operation. */ +export type ImageDefinitionsListByTestBaseAccountResponse = ImageDefinitionsListResult; + +/** Optional parameters. */ +export interface ImageDefinitionsCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type ImageDefinitionsCreateResponse = ImageDefinitionResource; + +/** Optional parameters. */ +export interface ImageDefinitionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ImageDefinitionsGetResponse = ImageDefinitionResource; + +/** Optional parameters. */ +export interface ImageDefinitionsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ImageDefinitionsListByTestBaseAccountNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccountNext operation. */ +export type ImageDefinitionsListByTestBaseAccountNextResponse = ImageDefinitionsListResult; + +/** Optional parameters. */ +export interface VHDsListByTestBaseAccountOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccount operation. */ +export type VHDsListByTestBaseAccountResponse = VHDListResult; + +/** Optional parameters. */ +export interface VHDsDeleteOptionalParams extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface VHDsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type VHDsGetResponse = VHDResource; + +/** Optional parameters. */ +export interface VHDsListByTestBaseAccountNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccountNext operation. */ +export type VHDsListByTestBaseAccountNextResponse = VHDListResult; + +/** Optional parameters. */ +export interface DraftPackagesListByTestBaseAccountOptionalParams + extends coreClient.OperationOptions { + /** Parameter used to filter draft packages by linked Test Base Package. */ + packageName?: string; + /** Parameter used to filter draft packages by editPackage property. */ + editPackage?: boolean; +} + +/** Contains response data for the listByTestBaseAccount operation. */ +export type DraftPackagesListByTestBaseAccountResponse = DraftPackageListResult; + +/** Optional parameters. */ +export interface DraftPackagesCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type DraftPackagesCreateResponse = DraftPackageResource; + +/** Optional parameters. */ +export interface DraftPackagesUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type DraftPackagesUpdateResponse = DraftPackageResource; + +/** Optional parameters. */ +export interface DraftPackagesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface DraftPackagesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DraftPackagesGetResponse = DraftPackageResource; + +/** Optional parameters. */ +export interface DraftPackagesGetPathOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getPath operation. */ +export type DraftPackagesGetPathResponse = DraftPackageGetPathResponse; + +/** Optional parameters. */ +export interface DraftPackagesCopyFromPackageOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the copyFromPackage operation. */ +export type DraftPackagesCopyFromPackageResponse = DraftPackagesCopyFromPackageHeaders; + +/** Optional parameters. */ +export interface DraftPackagesExtractFileOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the extractFile operation. */ +export type DraftPackagesExtractFileResponse = DraftPackagesExtractFileHeaders; + +/** Optional parameters. */ +export interface DraftPackagesGenerateFoldersAndScriptsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the generateFoldersAndScripts operation. */ +export type DraftPackagesGenerateFoldersAndScriptsResponse = DraftPackagesGenerateFoldersAndScriptsHeaders; + +/** Optional parameters. */ +export interface DraftPackagesListByTestBaseAccountNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccountNext operation. */ +export type DraftPackagesListByTestBaseAccountNextResponse = DraftPackageListResult; + +/** Optional parameters. */ +export interface FreeHourBalancesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type FreeHourBalancesListResponse = FreeHourBalancesListResult; + +/** Optional parameters. */ +export interface FreeHourBalancesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FreeHourBalancesGetResponse = FreeHourBalanceResource; + +/** Optional parameters. */ +export interface FreeHourBalancesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type FreeHourBalancesListNextResponse = FreeHourBalancesListResult; + +/** Optional parameters. */ +export interface SkusListOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SkusListResponse = TestBaseAccountSKUListResult; + +/** Optional parameters. */ +export interface SkusListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SkusListNextResponse = TestBaseAccountSKUListResult; + +/** Optional parameters. */ +export interface TestBaseAccountsListBySubscriptionOptionalParams + extends coreClient.OperationOptions { + /** The flag indicating if we need to include the Test Base Accounts which were soft deleted before. */ + getDeleted?: boolean; +} + +/** Contains response data for the listBySubscription operation. */ +export type TestBaseAccountsListBySubscriptionResponse = TestBaseAccountListResult; + +/** Optional parameters. */ +export interface TestBaseAccountsListByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** The flag indicating if we need to include the Test Base Accounts which were soft deleted before. */ + getDeleted?: boolean; +} + +/** Contains response data for the listByResourceGroup operation. */ +export type TestBaseAccountsListByResourceGroupResponse = TestBaseAccountListResult; + +/** Optional parameters. */ +export interface TestBaseAccountsCreateOptionalParams + extends coreClient.OperationOptions { + /** The flag indicating if we would like to restore the Test Base Accounts which were soft deleted before. */ + restore?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type TestBaseAccountsCreateResponse = TestBaseAccountResource; + +/** Optional parameters. */ +export interface TestBaseAccountsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type TestBaseAccountsUpdateResponse = TestBaseAccountResource; + +/** Optional parameters. */ +export interface TestBaseAccountsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface TestBaseAccountsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type TestBaseAccountsGetResponse = TestBaseAccountResource; + +/** Optional parameters. */ +export interface TestBaseAccountsOffboardOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface TestBaseAccountsGetFileUploadUrlOptionalParams + extends coreClient.OperationOptions { + /** Parameters supplied to the Test Base Account GetFileUploadURL operation. */ + parameters?: GetFileUploadURLParameters; +} + +/** Contains response data for the getFileUploadUrl operation. */ +export type TestBaseAccountsGetFileUploadUrlResponse = FileUploadURLResponse; + +/** Optional parameters. */ +export interface TestBaseAccountsCheckPackageNameAvailabilityOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the checkPackageNameAvailability operation. */ +export type TestBaseAccountsCheckPackageNameAvailabilityResponse = CheckNameAvailabilityResult; + +/** Optional parameters. */ +export interface TestBaseAccountsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type TestBaseAccountsListBySubscriptionNextResponse = TestBaseAccountListResult; + +/** Optional parameters. */ +export interface TestBaseAccountsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type TestBaseAccountsListByResourceGroupNextResponse = TestBaseAccountListResult; + +/** Optional parameters. */ +export interface UsageListOptionalParams extends coreClient.OperationOptions { + /** Odata filter */ + filter?: string; +} + +/** Contains response data for the list operation. */ +export type UsageListResponse = TestBaseAccountUsageDataList; + +/** Optional parameters. */ +export interface UsageListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type UsageListNextResponse = TestBaseAccountUsageDataList; + +/** Optional parameters. */ +export interface AvailableOSListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type AvailableOSListResponse = AvailableOSListResult; + +/** Optional parameters. */ +export interface AvailableOSGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AvailableOSGetResponse = AvailableOSResource; + +/** Optional parameters. */ +export interface AvailableOSListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type AvailableOSListNextResponse = AvailableOSListResult; + +/** Optional parameters. */ +export interface FeatureUpdateSupportedOsesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type FeatureUpdateSupportedOsesListResponse = FeatureUpdateSupportedOsesResult; + +/** Optional parameters. */ +export interface FeatureUpdateSupportedOsesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type FeatureUpdateSupportedOsesListNextResponse = FeatureUpdateSupportedOsesResult; + +/** Optional parameters. */ +export interface FlightingRingsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type FlightingRingsListResponse = FlightingRingListResult; + +/** Optional parameters. */ +export interface FlightingRingsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FlightingRingsGetResponse = FlightingRingResource; + +/** Optional parameters. */ +export interface FlightingRingsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type FlightingRingsListNextResponse = FlightingRingListResult; + +/** Optional parameters. */ +export interface FirstPartyAppsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type FirstPartyAppsListResponse = FirstPartyAppListResult; + +/** Optional parameters. */ +export interface FirstPartyAppsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FirstPartyAppsGetResponse = FirstPartyAppResource; + +/** Optional parameters. */ +export interface FirstPartyAppsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type FirstPartyAppsListNextResponse = FirstPartyAppListResult; + +/** Optional parameters. */ +export interface GalleryAppsListOptionalParams + extends coreClient.OperationOptions { + /** How many of the sorted items to consider including in the result set. */ + top?: number; + /** The keywords which listed results should be related to. */ + keyword?: string; + /** The type of the gallery application. */ + applicationType?: ApplicationType; + /** The order of result list. */ + orderBy?: OrderBy; +} + +/** Contains response data for the list operation. */ +export type GalleryAppsListResponse = GalleryAppListResult; + +/** Optional parameters. */ +export interface GalleryAppsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type GalleryAppsGetResponse = GalleryAppResource; + +/** Optional parameters. */ +export interface GalleryAppsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type GalleryAppsListNextResponse = GalleryAppListResult; + +/** Optional parameters. */ +export interface GalleryAppSkusListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type GalleryAppSkusListResponse = GalleryAppSkuListResult; + +/** Optional parameters. */ +export interface GalleryAppSkusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type GalleryAppSkusGetResponse = GalleryAppSkuResource; + +/** Optional parameters. */ +export interface GalleryAppSkusListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type GalleryAppSkusListNextResponse = GalleryAppSkuListResult; + +/** Optional parameters. */ +export interface TestTypesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type TestTypesListResponse = TestTypeListResult; + +/** Optional parameters. */ +export interface TestTypesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type TestTypesGetResponse = TestTypeResource; + +/** Optional parameters. */ +export interface TestTypesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type TestTypesListNextResponse = TestTypeListResult; + +/** Optional parameters. */ +export interface PackagesListByTestBaseAccountOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccount operation. */ +export type PackagesListByTestBaseAccountResponse = PackageListResult; + +/** Optional parameters. */ +export interface PackagesCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type PackagesCreateResponse = PackageResource; + +/** Optional parameters. */ +export interface PackagesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type PackagesUpdateResponse = PackageResource; + +/** Optional parameters. */ +export interface PackagesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PackagesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PackagesGetResponse = PackageResource; + +/** Optional parameters. */ +export interface PackagesHardDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PackagesGetDownloadURLOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getDownloadURL operation. */ +export type PackagesGetDownloadURLResponse = DownloadURLResponse; + +/** Optional parameters. */ +export interface PackagesRunTestOptionalParams + extends coreClient.OperationOptions { + /** The parameters supplied to the Test Base Package to start a Test Run. */ + parameters?: PackageRunTestParameters; +} + +/** Contains response data for the runTest operation. */ +export type PackagesRunTestResponse = PackagesRunTestHeaders; + +/** Optional parameters. */ +export interface PackagesListByTestBaseAccountNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccountNext operation. */ +export type PackagesListByTestBaseAccountNextResponse = PackageListResult; + +/** Optional parameters. */ +export interface TestSummariesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type TestSummariesListResponse = TestSummaryListResult; + +/** Optional parameters. */ +export interface TestSummariesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type TestSummariesGetResponse = TestSummaryResource; + +/** Optional parameters. */ +export interface TestSummariesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type TestSummariesListNextResponse = TestSummaryListResult; + +/** Optional parameters. */ +export interface TestResultsListOptionalParams + extends coreClient.OperationOptions { + /** Odata filter */ + filter?: string; +} + +/** Contains response data for the list operation. */ +export type TestResultsListResponse = TestResultListResult; + +/** Optional parameters. */ +export interface TestResultsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type TestResultsGetResponse = TestResultResource; + +/** Optional parameters. */ +export interface TestResultsGetDownloadURLOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getDownloadURL operation. */ +export type TestResultsGetDownloadURLResponse = DownloadURLResponse; + +/** Optional parameters. */ +export interface TestResultsGetVideoDownloadURLOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getVideoDownloadURL operation. */ +export type TestResultsGetVideoDownloadURLResponse = DownloadURLResponse; + +/** Optional parameters. */ +export interface TestResultsGetConsoleLogDownloadURLOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getConsoleLogDownloadURL operation. */ +export type TestResultsGetConsoleLogDownloadURLResponse = DownloadURLResponse; + +/** Optional parameters. */ +export interface TestResultsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type TestResultsListNextResponse = TestResultListResult; + +/** Optional parameters. */ +export interface OSUpdatesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OSUpdatesListResponse = OSUpdateListResult; + +/** Optional parameters. */ +export interface OSUpdatesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type OSUpdatesGetResponse = OSUpdateResource; + +/** Optional parameters. */ +export interface OSUpdatesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OSUpdatesListNextResponse = OSUpdateListResult; + +/** Optional parameters. */ +export interface FavoriteProcessesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type FavoriteProcessesListResponse = FavoriteProcessListResult; + +/** Optional parameters. */ +export interface FavoriteProcessesCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type FavoriteProcessesCreateResponse = FavoriteProcessResource; + +/** Optional parameters. */ +export interface FavoriteProcessesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface FavoriteProcessesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FavoriteProcessesGetResponse = FavoriteProcessResource; + +/** Optional parameters. */ +export interface FavoriteProcessesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type FavoriteProcessesListNextResponse = FavoriteProcessListResult; + +/** Optional parameters. */ +export interface AnalysisResultsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type AnalysisResultsListResponse = AnalysisResultListResult; + +/** Optional parameters. */ +export interface AnalysisResultsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AnalysisResultsGetResponse = AnalysisResultSingletonResource; + +/** Optional parameters. */ +export interface EmailEventsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type EmailEventsListResponse = EmailEventListResult; + +/** Optional parameters. */ +export interface EmailEventsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type EmailEventsGetResponse = EmailEventResource; + +/** Optional parameters. */ +export interface EmailEventsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type EmailEventsListNextResponse = EmailEventListResult; + +/** Optional parameters. */ +export interface CustomerEventsListByTestBaseAccountOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccount operation. */ +export type CustomerEventsListByTestBaseAccountResponse = CustomerEventListResult; + +/** Optional parameters. */ +export interface CustomerEventsCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type CustomerEventsCreateResponse = CustomerEventResource; + +/** Optional parameters. */ +export interface CustomerEventsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface CustomerEventsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type CustomerEventsGetResponse = CustomerEventResource; + +/** Optional parameters. */ +export interface CustomerEventsListByTestBaseAccountNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccountNext operation. */ +export type CustomerEventsListByTestBaseAccountNextResponse = CustomerEventListResult; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + +/** Optional parameters. */ +export interface BillingHubServiceGetFreeHourBalanceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getFreeHourBalance operation. */ +export type BillingHubServiceGetFreeHourBalanceResponse = BillingHubGetFreeHourBalanceResponse; + +/** Optional parameters. */ +export interface BillingHubServiceGetUsageOptionalParams + extends coreClient.OperationOptions { + getUsageRequest?: BillingHubGetUsageRequest; +} + +/** Contains response data for the getUsage operation. */ +export type BillingHubServiceGetUsageResponse = BillingHubGetUsageResponse; + +/** Optional parameters. */ +export interface AvailableInplaceUpgradeOSListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type AvailableInplaceUpgradeOSListResponse = AvailableInplaceUpgradeOSListResult; + +/** Optional parameters. */ +export interface AvailableInplaceUpgradeOSGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AvailableInplaceUpgradeOSGetResponse = AvailableInplaceUpgradeOSResource; + +/** Optional parameters. */ +export interface AvailableInplaceUpgradeOSListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type AvailableInplaceUpgradeOSListNextResponse = AvailableInplaceUpgradeOSListResult; + +/** Optional parameters. */ +export interface CredentialListByTestBaseAccountOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccount operation. */ +export type CredentialListByTestBaseAccountResponse = CredentialListResult; + +/** Optional parameters. */ +export interface CredentialGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type CredentialGetResponse = CredentialResource; + +/** Optional parameters. */ +export interface CredentialListByTestBaseAccountNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByTestBaseAccountNext operation. */ +export type CredentialListByTestBaseAccountNextResponse = CredentialListResult; + +/** Optional parameters. */ +export interface CredentialsCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type CredentialsCreateResponse = CredentialResource; + +/** Optional parameters. */ +export interface CredentialsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type CredentialsUpdateResponse = CredentialResource; + +/** Optional parameters. */ +export interface CredentialsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface TestBaseOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/testbase/arm-testbase/src/models/mappers.ts b/sdk/testbase/arm-testbase/src/models/mappers.ts new file mode 100644 index 000000000000..f6b4001a2bc0 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/models/mappers.ts @@ -0,0 +1,6123 @@ +/* + * 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 PreReleaseAccessRequestSpec: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PreReleaseAccessRequestSpec", + modelProperties: { + organizationName: { + serializedName: "organizationName", + type: { + name: "String" + } + }, + email: { + serializedName: "email", + type: { + name: "String" + } + }, + engagements: { + serializedName: "engagements", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + streetAddress: { + serializedName: "streetAddress", + type: { + name: "String" + } + }, + city: { + serializedName: "city", + type: { + name: "String" + } + }, + stateOrProvince: { + serializedName: "stateOrProvince", + type: { + name: "String" + } + }, + zipCode: { + serializedName: "zipCode", + type: { + name: "String" + } + }, + countryAndRegion: { + serializedName: "countryAndRegion", + type: { + name: "String" + } + }, + companyWebsite: { + serializedName: "companyWebsite", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const ActionRequests: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ActionRequests", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ActionRequest" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ChatSessionResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ChatSessionResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ChatSessionResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ChatRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ChatRequest", + modelProperties: { + question: { + serializedName: "question", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ChatResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ChatResponse", + modelProperties: { + question: { + serializedName: "properties.question", + required: true, + type: { + name: "String" + } + }, + answer: { + serializedName: "properties.answer", + required: true, + type: { + name: "String" + } + }, + citations: { + serializedName: "properties.citations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AnswerCitation" + } + } + } + }, + usage: { + serializedName: "properties.usage", + required: true, + readOnly: true, + type: { + name: "Number" + } + }, + limit: { + serializedName: "properties.limit", + required: true, + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const AnswerCitation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AnswerCitation", + modelProperties: { + title: { + serializedName: "title", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + type: { + name: "String" + } + }, + chunkIndex: { + serializedName: "chunkIndex", + type: { + name: "Number" + } + } + } + } +}; + +export const CustomImageListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomImageListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CustomImageResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ImageValidationResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImageValidationResults", + modelProperties: { + results: { + serializedName: "results", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VerificationResult" + } + } + } + } + } + } +}; + +export const VerificationResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VerificationResult", + modelProperties: { + verificationName: { + serializedName: "verificationName", + type: { + name: "String" + } + }, + result: { + serializedName: "result", + required: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ImageNameCheckAvailabilityParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImageNameCheckAvailabilityParameters", + modelProperties: { + definitionName: { + serializedName: "definitionName", + required: true, + type: { + name: "String" + } + }, + versionName: { + serializedName: "versionName", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ImageDefinitionsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImageDefinitionsListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageDefinitionResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VHDListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VHDListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VHDResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DraftPackageListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraftPackageListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DraftPackageResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DraftPackageIntuneAppMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraftPackageIntuneAppMetadata", + modelProperties: { + intuneApp: { + serializedName: "intuneApp", + type: { + name: "Composite", + className: "DraftPackageIntuneAppMetadataItem" + } + }, + intuneAppDependencies: { + serializedName: "intuneAppDependencies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DraftPackageIntuneAppMetadataItem" + } + } + } + } + } + } +}; + +export const DraftPackageIntuneAppMetadataItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraftPackageIntuneAppMetadataItem", + modelProperties: { + appName: { + serializedName: "appName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + appId: { + serializedName: "appId", + type: { + name: "String" + } + }, + publisher: { + serializedName: "publisher", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + owner: { + serializedName: "owner", + type: { + name: "String" + } + }, + createDate: { + serializedName: "createDate", + type: { + name: "DateTime" + } + }, + dependentAppCount: { + serializedName: "dependentAppCount", + type: { + name: "Number" + } + }, + installCommand: { + serializedName: "installCommand", + type: { + name: "String" + } + }, + uninstallCommand: { + serializedName: "uninstallCommand", + type: { + name: "String" + } + }, + lastProcessed: { + serializedName: "lastProcessed", + type: { + name: "Number" + } + }, + dependencyIds: { + serializedName: "dependencyIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + setupFile: { + serializedName: "setupFile", + type: { + name: "String" + } + }, + minimumSupportedOS: { + serializedName: "minimumSupportedOS", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + expectedExitCodes: { + serializedName: "expectedExitCodes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const HighlightedFile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HighlightedFile", + modelProperties: { + path: { + serializedName: "path", + required: true, + type: { + name: "String" + } + }, + visited: { + defaultValue: false, + serializedName: "visited", + type: { + name: "Boolean" + } + }, + sections: { + serializedName: "sections", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TabState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TabState", + modelProperties: { + currentTab: { + serializedName: "currentTab", + type: { + name: "String" + } + }, + visitedTabs: { + serializedName: "visitedTabs", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TargetOSInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TargetOSInfo", + modelProperties: { + osUpdateType: { + serializedName: "osUpdateType", + required: true, + type: { + name: "String" + } + }, + targetOSs: { + serializedName: "targetOSs", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + insiderChannelIds: { + serializedName: "insiderChannelIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + baselineOSs: { + serializedName: "baselineOSs", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + targetOSImageIds: { + serializedName: "targetOSImageIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const InplaceUpgradeOSInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InplaceUpgradeOSInfo", + modelProperties: { + baselineOS: { + serializedName: "baselineOS", + type: { + name: "Composite", + className: "OsProperties" + } + }, + targetOS: { + serializedName: "targetOS", + type: { + name: "String" + } + } + } + } +}; + +export const OsProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OsProperties", + modelProperties: { + osName: { + serializedName: "osName", + type: { + name: "String" + } + }, + customImageId: { + serializedName: "customImageId", + type: { + name: "String" + } + }, + customImageDisplayName: { + serializedName: "customImageDisplayName", + readOnly: true, + type: { + name: "String" + } + }, + releaseProperties: { + serializedName: "releaseProperties", + type: { + name: "Composite", + className: "ReleaseProperties" + } + } + } + } +}; + +export const ReleaseProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReleaseProperties", + modelProperties: { + releaseName: { + serializedName: "releaseName", + type: { + name: "String" + } + }, + buildNumber: { + serializedName: "buildNumber", + type: { + name: "String" + } + }, + buildRevision: { + serializedName: "buildRevision", + type: { + name: "String" + } + }, + releaseVersionDate: { + serializedName: "releaseVersionDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const FirstPartyAppDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FirstPartyAppDefinition", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + architecture: { + serializedName: "architecture", + type: { + name: "String" + } + }, + channel: { + serializedName: "channel", + type: { + name: "String" + } + }, + ring: { + serializedName: "ring", + type: { + name: "String" + } + }, + interopExecutionMode: { + defaultValue: "firstPartyAppWithTests", + serializedName: "interopExecutionMode", + type: { + name: "String" + } + } + } + } +}; + +export const GalleryAppDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryAppDefinition", + modelProperties: { + skuId: { + serializedName: "skuId", + required: true, + type: { + name: "String" + } + }, + isConsented: { + defaultValue: false, + serializedName: "isConsented", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Test: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Test", + modelProperties: { + testType: { + serializedName: "testType", + required: true, + type: { + name: "String" + } + }, + validationRunStatus: { + serializedName: "validationRunStatus", + readOnly: true, + type: { + name: "String" + } + }, + validationResultId: { + serializedName: "validationResultId", + readOnly: true, + type: { + name: "String" + } + }, + isActive: { + serializedName: "isActive", + type: { + name: "Boolean" + } + }, + commands: { + serializedName: "commands", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Command" + } + } + } + } + } + } +}; + +export const Command: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Command", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + action: { + serializedName: "action", + required: true, + type: { + name: "String" + } + }, + contentType: { + serializedName: "contentType", + required: true, + type: { + name: "String" + } + }, + content: { + serializedName: "content", + required: true, + type: { + name: "String" + } + }, + runElevated: { + serializedName: "runElevated", + type: { + name: "Boolean" + } + }, + restartAfter: { + serializedName: "restartAfter", + type: { + name: "Boolean" + } + }, + maxRunTime: { + serializedName: "maxRunTime", + type: { + name: "Number" + } + }, + runAsInteractive: { + serializedName: "runAsInteractive", + type: { + name: "Boolean" + } + }, + alwaysRun: { + serializedName: "alwaysRun", + type: { + name: "Boolean" + } + }, + applyUpdateBefore: { + serializedName: "applyUpdateBefore", + type: { + name: "Boolean" + } + }, + install1PAppBefore: { + serializedName: "install1PAppBefore", + type: { + name: "Boolean" + } + }, + preUpgrade: { + serializedName: "preUpgrade", + type: { + name: "Boolean" + } + }, + postUpgrade: { + serializedName: "postUpgrade", + type: { + name: "Boolean" + } + }, + enrollIntuneBefore: { + serializedName: "enrollIntuneBefore", + type: { + name: "Boolean" + } + } + } + } +}; + +export const IntuneEnrollmentMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IntuneEnrollmentMetadata", + modelProperties: { + appList: { + serializedName: "appList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrolledIntuneApp" + } + } + } + }, + credentialId: { + serializedName: "credentialId", + type: { + name: "String" + } + }, + expectedDeploymentDurationInMinute: { + serializedName: "expectedDeploymentDurationInMinute", + type: { + name: "Number" + } + } + } + } +}; + +export const EnrolledIntuneApp: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnrolledIntuneApp", + modelProperties: { + appName: { + serializedName: "appName", + required: true, + type: { + name: "String" + } + }, + appId: { + serializedName: "appId", + required: true, + type: { + name: "String" + } + }, + expectedInstallationPath: { + serializedName: "expectedInstallationPath", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const DraftPackageUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraftPackageUpdateParameters", + modelProperties: { + applicationName: { + serializedName: "properties.applicationName", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + appFileName: { + serializedName: "properties.appFileName", + type: { + name: "String" + } + }, + sourceType: { + serializedName: "properties.sourceType", + type: { + name: "String" + } + }, + useSample: { + serializedName: "properties.useSample", + type: { + name: "Boolean" + } + }, + comments: { + serializedName: "properties.comments", + type: { + name: "String" + } + }, + intuneMetadata: { + serializedName: "properties.intuneMetadata", + type: { + name: "Composite", + className: "DraftPackageIntuneAppMetadata" + } + }, + highlightedFiles: { + serializedName: "properties.highlightedFiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HighlightedFile" + } + } + } + }, + packageTags: { + serializedName: "properties.packageTags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + packageId: { + serializedName: "properties.packageId", + type: { + name: "String" + } + }, + useAutofill: { + serializedName: "properties.useAutofill", + type: { + name: "Boolean" + } + }, + executableLaunchCommand: { + serializedName: "properties.executableLaunchCommand", + type: { + name: "String" + } + }, + processName: { + serializedName: "properties.processName", + type: { + name: "String" + } + }, + tabState: { + serializedName: "properties.tabState", + type: { + name: "Composite", + className: "TabState" + } + }, + testTypes: { + serializedName: "properties.testTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + targetOSList: { + serializedName: "properties.targetOSList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TargetOSInfo" + } + } + } + }, + inplaceUpgradeOSPair: { + serializedName: "properties.inplaceUpgradeOSPair", + type: { + name: "Composite", + className: "InplaceUpgradeOSInfo" + } + }, + flightingRing: { + serializedName: "properties.flightingRing", + type: { + name: "String" + } + }, + firstPartyApps: { + serializedName: "properties.firstPartyApps", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FirstPartyAppDefinition" + } + } + } + }, + galleryApps: { + serializedName: "properties.galleryApps", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryAppDefinition" + } + } + } + }, + tests: { + serializedName: "properties.tests", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Test" + } + } + } + }, + intuneEnrollmentMetadata: { + serializedName: "properties.intuneEnrollmentMetadata", + type: { + name: "Composite", + className: "IntuneEnrollmentMetadata" + } + } + } + } +}; + +export const DraftPackageGetPathResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraftPackageGetPathResponse", + modelProperties: { + baseUrl: { + serializedName: "baseUrl", + readOnly: true, + type: { + name: "String" + } + }, + draftPackagePath: { + serializedName: "draftPackagePath", + readOnly: true, + type: { + name: "String" + } + }, + workingPath: { + serializedName: "workingPath", + readOnly: true, + type: { + name: "String" + } + }, + sasToken: { + serializedName: "sasToken", + readOnly: true, + type: { + name: "String" + } + }, + expirationTime: { + serializedName: "expirationTime", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const CopyFromPackageOperationParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CopyFromPackageOperationParameters", + modelProperties: { + packageId: { + serializedName: "packageId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ExtractFileOperationParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtractFileOperationParameters", + modelProperties: { + fileType: { + serializedName: "fileType", + type: { + name: "String" + } + }, + sourceFile: { + serializedName: "sourceFile", + required: true, + type: { + name: "String" + } + }, + intuneAppId: { + serializedName: "intuneAppId", + type: { + name: "String" + } + } + } + } +}; + +export const GenerateOperationParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GenerateOperationParameters", + modelProperties: { + forceGenerate: { + defaultValue: false, + serializedName: "forceGenerate", + type: { + name: "Boolean" + } + } + } + } +}; + +export const FreeHourBalancesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FreeHourBalancesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FreeHourBalanceResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const BillingHubGetFreeHourBalanceResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingHubGetFreeHourBalanceResponse", + modelProperties: { + totalRemainingFreeHours: { + serializedName: "totalRemainingFreeHours", + type: { + name: "Number" + } + }, + incrementEntries: { + serializedName: "incrementEntries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingHubFreeHourIncrementEntry" + } + } + } + } + } + } +}; + +export const BillingHubFreeHourIncrementEntry: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingHubFreeHourIncrementEntry", + modelProperties: { + freeHourType: { + serializedName: "freeHourType", + type: { + name: "String" + } + }, + freeHourStatus: { + serializedName: "freeHourStatus", + type: { + name: "String" + } + }, + createTimeStamp: { + serializedName: "createTimeStamp", + type: { + name: "DateTime" + } + }, + expirationTimeStamp: { + serializedName: "expirationTimeStamp", + type: { + name: "DateTime" + } + }, + incrementalFreeHours: { + serializedName: "incrementalFreeHours", + type: { + name: "Number" + } + }, + remainingFreeHours: { + serializedName: "remainingFreeHours", + type: { + name: "Number" + } + } + } + } +}; + +export const TestBaseAccountSKUListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountSKUListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TestBaseAccountSKU" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const TestBaseAccountSKU: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountSKU", + modelProperties: { + resourceType: { + serializedName: "resourceType", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + required: true, + type: { + name: "String" + } + }, + capabilities: { + serializedName: "capabilities", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TestBaseAccountSKUCapability" + } + } + } + }, + locations: { + serializedName: "locations", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TestBaseAccountSKUCapability: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountSKUCapability", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const TestBaseAccountListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TestBaseAccountResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SystemAssignedServiceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemAssignedServiceIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const TestBaseAccountUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountUpdateParameters", + modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "SystemAssignedServiceIdentity" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + sku: { + serializedName: "properties.sku", + type: { + name: "Composite", + className: "TestBaseAccountSKU" + } + } + } + } +}; + +export const TestBaseAccountUsageDataList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountUsageDataList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TestBaseAccountUsageData" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const TestBaseAccountUsageData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountUsageData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "Composite", + className: "TestBaseAccountUsageName" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + limit: { + serializedName: "limit", + type: { + name: "Number" + } + }, + currentValue: { + serializedName: "currentValue", + type: { + name: "Number" + } + } + } + } +}; + +export const TestBaseAccountUsageName: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountUsageName", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String" + } + }, + localizedValue: { + serializedName: "localizedValue", + type: { + name: "String" + } + } + } + } +}; + +export const GetFileUploadURLParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetFileUploadURLParameters", + modelProperties: { + blobName: { + serializedName: "blobName", + type: { + name: "String" + } + }, + resourceType: { + serializedName: "resourceType", + type: { + name: "String" + } + } + } + } +}; + +export const FileUploadURLResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileUploadURLResponse", + modelProperties: { + uploadUrl: { + serializedName: "uploadUrl", + readOnly: true, + type: { + name: "String" + } + }, + blobPath: { + serializedName: "blobPath", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AvailableOSListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableOSListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailableOSResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FeatureUpdateSupportedOsesResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FeatureUpdateSupportedOsesResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FeatureUpdateSupportedOsesResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FlightingRingListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlightingRingListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FlightingRingResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FirstPartyAppListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FirstPartyAppListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FirstPartyAppResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GalleryAppListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryAppListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryAppResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GalleryAppSkuListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryAppSkuListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryAppSkuResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GalleryAppSkuProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryAppSkuProperties", + uberParent: "GalleryAppSkuProperties", + polymorphicDiscriminator: { + serializedName: "applicationType", + clientName: "applicationType" + }, + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + applicationType: { + serializedName: "applicationType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const TestTypeListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestTypeListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TestTypeResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PackageCheckNameAvailabilityParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackageCheckNameAvailabilityParameters", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + applicationName: { + serializedName: "applicationName", + required: true, + type: { + name: "String" + } + }, + version: { + serializedName: "version", + required: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CheckNameAvailabilityResult", + modelProperties: { + nameAvailable: { + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PackageListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackageListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PackageValidationResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackageValidationResult", + modelProperties: { + validationName: { + serializedName: "validationName", + readOnly: true, + type: { + name: "String" + } + }, + isValid: { + serializedName: "isValid", + readOnly: true, + type: { + name: "Boolean" + } + }, + errors: { + serializedName: "errors", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PackageUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackageUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + draftPackageId: { + serializedName: "properties.draftPackageId", + type: { + name: "String" + } + }, + isEnabled: { + serializedName: "properties.isEnabled", + type: { + name: "Boolean" + } + }, + blobPath: { + serializedName: "properties.blobPath", + type: { + name: "String" + } + }, + targetOSList: { + serializedName: "properties.targetOSList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TargetOSInfo" + } + } + } + }, + inplaceUpgradeOSPair: { + serializedName: "properties.inplaceUpgradeOSPair", + type: { + name: "Composite", + className: "InplaceUpgradeOSInfo" + } + }, + flightingRing: { + serializedName: "properties.flightingRing", + type: { + name: "String" + } + }, + firstPartyApps: { + serializedName: "properties.firstPartyApps", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FirstPartyAppDefinition" + } + } + } + }, + tests: { + serializedName: "properties.tests", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Test" + } + } + } + }, + intuneEnrollmentMetadata: { + serializedName: "properties.intuneEnrollmentMetadata", + type: { + name: "Composite", + className: "IntuneEnrollmentMetadata" + } + } + } + } +}; + +export const DownloadURLResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DownloadURLResponse", + modelProperties: { + downloadUrl: { + serializedName: "downloadUrl", + readOnly: true, + type: { + name: "String" + } + }, + expirationTime: { + serializedName: "expirationTime", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const PackageRunTestParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackageRunTestParameters", + modelProperties: { + testType: { + serializedName: "testType", + type: { + name: "String" + } + }, + osUpdateType: { + serializedName: "osUpdateType", + type: { + name: "String" + } + }, + osName: { + serializedName: "osName", + type: { + name: "String" + } + }, + releaseName: { + serializedName: "releaseName", + type: { + name: "String" + } + }, + flightingRing: { + serializedName: "flightingRing", + type: { + name: "String" + } + }, + customImageId: { + serializedName: "customImageId", + type: { + name: "String" + } + } + } + } +}; + +export const TestSummaryListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestSummaryListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TestSummaryResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OSUpdatesTestSummary: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSUpdatesTestSummary", + modelProperties: { + executionStatus: { + serializedName: "executionStatus", + type: { + name: "String" + } + }, + testStatus: { + serializedName: "testStatus", + type: { + name: "String" + } + }, + grade: { + serializedName: "grade", + type: { + name: "String" + } + }, + testRunTime: { + serializedName: "testRunTime", + type: { + name: "String" + } + }, + osUpdateTestSummaries: { + serializedName: "osUpdateTestSummaries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OSUpdateTestSummary" + } + } + } + } + } + } +}; + +export const OSUpdateTestSummary: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSUpdateTestSummary", + modelProperties: { + osName: { + serializedName: "osName", + type: { + name: "String" + } + }, + customImageId: { + serializedName: "customImageId", + type: { + name: "String" + } + }, + customImageDisplayName: { + serializedName: "customImageDisplayName", + type: { + name: "String" + } + }, + releaseName: { + serializedName: "releaseName", + type: { + name: "String" + } + }, + buildVersion: { + serializedName: "buildVersion", + type: { + name: "String" + } + }, + buildRevision: { + serializedName: "buildRevision", + type: { + name: "String" + } + }, + releaseVersionDate: { + serializedName: "releaseVersionDate", + type: { + name: "DateTime" + } + }, + flightingRing: { + serializedName: "flightingRing", + type: { + name: "String" + } + }, + executionStatus: { + serializedName: "executionStatus", + type: { + name: "String" + } + }, + testStatus: { + serializedName: "testStatus", + type: { + name: "String" + } + }, + grade: { + serializedName: "grade", + type: { + name: "String" + } + }, + testRunTime: { + serializedName: "testRunTime", + type: { + name: "String" + } + }, + testType: { + serializedName: "testType", + type: { + name: "String" + } + }, + inplaceUpgradeBaselineProperties: { + serializedName: "inplaceUpgradeBaselineProperties", + type: { + name: "Composite", + className: "OsProperties" + } + } + } + } +}; + +export const TestResultListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestResultListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TestResultResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const TestResultAnalysisSummary: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestResultAnalysisSummary", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + analysisStatus: { + serializedName: "analysisStatus", + type: { + name: "String" + } + }, + grade: { + serializedName: "grade", + type: { + name: "String" + } + } + } + } +}; + +export const InplaceUpgradeProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InplaceUpgradeProperties", + modelProperties: { + upgradeStartTime: { + serializedName: "upgradeStartTime", + type: { + name: "DateTime" + } + }, + upgradeEndTime: { + serializedName: "upgradeEndTime", + type: { + name: "DateTime" + } + }, + customImageId: { + serializedName: "customImageId", + type: { + name: "String" + } + }, + customImageDisplayName: { + serializedName: "customImageDisplayName", + type: { + name: "String" + } + }, + baselineOsName: { + serializedName: "baselineOsName", + type: { + name: "String" + } + }, + baselineReleaseName: { + serializedName: "baselineReleaseName", + type: { + name: "String" + } + }, + baselineBuildNumber: { + serializedName: "baselineBuildNumber", + type: { + name: "String" + } + }, + baselineBuildRevision: { + serializedName: "baselineBuildRevision", + type: { + name: "String" + } + }, + baselineKbNumber: { + serializedName: "baselineKbNumber", + type: { + name: "String" + } + }, + baselineReleaseVersionDate: { + serializedName: "baselineReleaseVersionDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const TestResultFirstPartyAppDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestResultFirstPartyAppDefinition", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + architecture: { + serializedName: "architecture", + type: { + name: "String" + } + }, + channel: { + serializedName: "channel", + type: { + name: "String" + } + }, + ring: { + serializedName: "ring", + type: { + name: "String" + } + } + } + } +}; + +export const OSUpdateListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSUpdateListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OSUpdateResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FavoriteProcessListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FavoriteProcessListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FavoriteProcessResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AnalysisResultListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AnalysisResultListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AnalysisResultSingletonResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AnalysisResultSingletonResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AnalysisResultSingletonResourceProperties", + uberParent: "AnalysisResultSingletonResourceProperties", + polymorphicDiscriminator: { + serializedName: "analysisResultType", + clientName: "analysisResultType" + }, + modelProperties: { + grade: { + serializedName: "grade", + type: { + name: "String" + } + }, + analysisResultType: { + serializedName: "analysisResultType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const TestResultConsoleLogDownloadURLParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestResultConsoleLogDownloadURLParameters", + modelProperties: { + logFileName: { + serializedName: "logFileName", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const EmailEventListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EmailEventListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EmailEventResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CustomerEventListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomerEventListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CustomerEventResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NotificationEventReceiver: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NotificationEventReceiver", + modelProperties: { + receiverType: { + serializedName: "receiverType", + type: { + name: "String" + } + }, + receiverValue: { + serializedName: "receiverValue", + type: { + name: "Composite", + className: "NotificationReceiverValue" + } + } + } + } +}; + +export const NotificationReceiverValue: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NotificationReceiverValue", + modelProperties: { + userObjectReceiverValue: { + serializedName: "userObjectReceiverValue", + type: { + name: "Composite", + className: "UserObjectReceiverValue" + } + }, + subscriptionReceiverValue: { + serializedName: "subscriptionReceiverValue", + type: { + name: "Composite", + className: "SubscriptionReceiverValue" + } + }, + distributionGroupListReceiverValue: { + serializedName: "distributionGroupListReceiverValue", + type: { + name: "Composite", + className: "DistributionGroupListReceiverValue" + } + } + } + } +}; + +export const UserObjectReceiverValue: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserObjectReceiverValue", + modelProperties: { + userObjectIds: { + serializedName: "userObjectIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SubscriptionReceiverValue: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SubscriptionReceiverValue", + modelProperties: { + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + subscriptionName: { + serializedName: "subscriptionName", + type: { + name: "String" + } + }, + role: { + serializedName: "role", + type: { + name: "String" + } + } + } + } +}; + +export const DistributionGroupListReceiverValue: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DistributionGroupListReceiverValue", + modelProperties: { + distributionGroups: { + serializedName: "distributionGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + actionType: { + serializedName: "actionType", + 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 BillingHubGetUsageRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingHubGetUsageRequest", + modelProperties: { + startTimeStamp: { + serializedName: "startTimeStamp", + required: true, + type: { + name: "DateTime" + } + }, + endTimeStamp: { + serializedName: "endTimeStamp", + required: true, + type: { + name: "DateTime" + } + }, + pageSize: { + serializedName: "pageSize", + type: { + name: "Number" + } + }, + pageIndex: { + serializedName: "pageIndex", + type: { + name: "Number" + } + } + } + } +}; + +export const BillingHubGetUsageResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingHubGetUsageResponse", + modelProperties: { + totalUsedFreeHours: { + serializedName: "totalUsedFreeHours", + type: { + name: "Number" + } + }, + totalUsedBillableHours: { + serializedName: "totalUsedBillableHours", + type: { + name: "Number" + } + }, + totalCharges: { + serializedName: "totalCharges", + type: { + name: "Number" + } + }, + packageUsageEntries: { + serializedName: "packageUsageEntries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingHubPackageUsage" + } + } + } + }, + nextRequest: { + serializedName: "nextRequest", + type: { + name: "Composite", + className: "BillingHubGetUsageRequest" + } + } + } + } +}; + +export const BillingHubPackageUsage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingHubPackageUsage", + modelProperties: { + applicationName: { + serializedName: "applicationName", + type: { + name: "String" + } + }, + applicationVersion: { + serializedName: "applicationVersion", + type: { + name: "String" + } + }, + azureResourceUri: { + serializedName: "azureResourceUri", + type: { + name: "String" + } + }, + totalUsedFreeHours: { + serializedName: "totalUsedFreeHours", + type: { + name: "Number" + } + }, + totalUsedBillableHours: { + serializedName: "totalUsedBillableHours", + type: { + name: "Number" + } + }, + totalCharges: { + serializedName: "totalCharges", + type: { + name: "Number" + } + }, + usageEntriesGroupedByUpdateType: { + serializedName: "usageEntriesGroupedByUpdateType", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingHubUsageGroupedByUpdateType" + } + } + } + } + } + } +}; + +export const BillingHubUsageGroupedByUpdateType: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingHubUsageGroupedByUpdateType", + modelProperties: { + updateType: { + serializedName: "updateType", + type: { + name: "String" + } + }, + totalUsedFreeHours: { + serializedName: "totalUsedFreeHours", + type: { + name: "Number" + } + }, + totalUsedBillableHours: { + serializedName: "totalUsedBillableHours", + type: { + name: "Number" + } + }, + totalCharges: { + serializedName: "totalCharges", + type: { + name: "Number" + } + }, + usageGroups: { + serializedName: "usageGroups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingHubUsageGroup" + } + } + } + } + } + } +}; + +export const BillingHubUsageGroup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingHubUsageGroup", + modelProperties: { + totalUsedFreeHours: { + serializedName: "totalUsedFreeHours", + type: { + name: "Number" + } + }, + totalUsedBillableHours: { + serializedName: "totalUsedBillableHours", + type: { + name: "Number" + } + }, + totalCharges: { + serializedName: "totalCharges", + type: { + name: "Number" + } + }, + releaseBuildRevision: { + serializedName: "releaseBuildRevision", + type: { + name: "Number" + } + }, + releaseBuildNumber: { + serializedName: "releaseBuildNumber", + type: { + name: "Number" + } + }, + releaseBuildDate: { + serializedName: "releaseBuildDate", + type: { + name: "DateTime" + } + }, + osBuild: { + serializedName: "osBuild", + type: { + name: "String" + } + }, + release: { + serializedName: "release", + type: { + name: "String" + } + }, + testType: { + serializedName: "testType", + type: { + name: "String" + } + }, + productFamily: { + serializedName: "productFamily", + type: { + name: "String" + } + }, + executionUsageDetails: { + serializedName: "executionUsageDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingHubExecutionUsageDetail" + } + } + } + } + } + } +}; + +export const BillingHubExecutionUsageDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingHubExecutionUsageDetail", + modelProperties: { + applicationName: { + serializedName: "applicationName", + type: { + name: "String" + } + }, + applicationVersion: { + serializedName: "applicationVersion", + type: { + name: "String" + } + }, + executionRequestId: { + serializedName: "executionRequestId", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "String" + } + }, + meterId: { + serializedName: "meterId", + type: { + name: "String" + } + }, + startTimeStamp: { + serializedName: "startTimeStamp", + type: { + name: "DateTime" + } + }, + endTimeStamp: { + serializedName: "endTimeStamp", + type: { + name: "DateTime" + } + }, + osBuild: { + serializedName: "osBuild", + type: { + name: "String" + } + }, + release: { + serializedName: "release", + type: { + name: "String" + } + }, + testType: { + serializedName: "testType", + type: { + name: "String" + } + }, + updateType: { + serializedName: "updateType", + type: { + name: "String" + } + }, + usedFreeHours: { + serializedName: "usedFreeHours", + type: { + name: "Number" + } + }, + usedBillableHours: { + serializedName: "usedBillableHours", + type: { + name: "Number" + } + }, + billedCharges: { + serializedName: "billedCharges", + type: { + name: "Number" + } + } + } + } +}; + +export const AvailableInplaceUpgradeOSListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableInplaceUpgradeOSListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailableInplaceUpgradeOSResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CredentialListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CredentialListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CredentialResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CredentialProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CredentialProperties", + uberParent: "CredentialProperties", + polymorphicDiscriminator: { + serializedName: "credentialType", + clientName: "credentialType" + }, + modelProperties: { + credentialType: { + serializedName: "credentialType", + required: true, + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ImageDefinitionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImageDefinitionListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageDefinitionResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GetImageDefinitionParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetImageDefinitionParameters", + modelProperties: { + definitionName: { + serializedName: "definitionName", + type: { + name: "String" + } + } + } + } +}; + +export const ScriptExecutionResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScriptExecutionResult", + modelProperties: { + scriptName: { + serializedName: "scriptName", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + exitCode: { + serializedName: "exitCode", + type: { + name: "Number" + } + }, + timedOut: { + serializedName: "timedOut", + type: { + name: "Boolean" + } + }, + stdoutLogFileName: { + serializedName: "stdoutLogFileName", + type: { + name: "String" + } + }, + stderrLogFileName: { + serializedName: "stderrLogFileName", + type: { + name: "String" + } + } + } + } +}; + +export const ReliabilityResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReliabilityResult", + modelProperties: { + fileName: { + serializedName: "fileName", + type: { + name: "String" + } + }, + launchCount: { + serializedName: "launchCount", + type: { + name: "Number" + } + }, + crashCount: { + serializedName: "crashCount", + type: { + name: "Number" + } + }, + hangCount: { + serializedName: "hangCount", + type: { + name: "Number" + } + }, + regressionGrade: { + serializedName: "regressionGrade", + type: { + name: "String" + } + }, + crashRegressionGrade: { + serializedName: "crashRegressionGrade", + type: { + name: "String" + } + }, + crashRegressionTestDetails: { + serializedName: "crashRegressionTestDetails", + type: { + name: "Composite", + className: "RegressionTestDetails" + } + }, + hangRegressionGrade: { + serializedName: "hangRegressionGrade", + type: { + name: "String" + } + }, + hangRegressionTestDetails: { + serializedName: "hangRegressionTestDetails", + type: { + name: "Composite", + className: "RegressionTestDetails" + } + } + } + } +}; + +export const RegressionTestDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegressionTestDetails", + modelProperties: { + diff: { + serializedName: "diff", + type: { + name: "Number" + } + }, + isRegressed: { + serializedName: "isRegressed", + type: { + name: "Boolean" + } + } + } + } +}; + +export const UtilizationResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UtilizationResult", + modelProperties: { + process: { + serializedName: "process", + type: { + name: "String" + } + }, + upperBound: { + serializedName: "upperBound", + type: { + name: "Composite", + className: "UtilizationBound" + } + }, + lowerBound: { + serializedName: "lowerBound", + type: { + name: "Composite", + className: "UtilizationBound" + } + }, + utilization: { + serializedName: "utilization", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UtilizationEntry" + } + } + } + } + } + } +}; + +export const UtilizationBound: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UtilizationBound", + modelProperties: { + percentile: { + serializedName: "percentile", + type: { + name: "Number" + } + }, + value: { + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const UtilizationEntry: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UtilizationEntry", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + value: { + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const RegressionResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegressionResult", + modelProperties: { + fileName: { + serializedName: "fileName", + type: { + name: "String" + } + }, + grade: { + serializedName: "grade", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "String" + } + }, + diff: { + serializedName: "diff", + type: { + name: "Number" + } + }, + isRegressed: { + serializedName: "isRegressed", + type: { + name: "Boolean" + } + } + } + } +}; + +export const TestAnalysisResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestAnalysisResult", + modelProperties: { + blobData: { + serializedName: "blobData", + type: { + name: "String" + } + }, + testAnalysisStatus: { + serializedName: "testAnalysisStatus", + type: { + name: "String" + } + }, + identifiedFailures: { + serializedName: "identifiedFailures", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IdentifiedFailure" + } + } + } + } + } + } +}; + +export const IdentifiedFailure: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IdentifiedFailure", + modelProperties: { + failureId: { + serializedName: "failureId", + type: { + name: "String" + } + }, + category: { + serializedName: "category", + type: { + name: "String" + } + }, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + }, + guidance: { + serializedName: "guidance", + type: { + name: "String" + } + } + } + } +}; + +export const BillingHubUsage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingHubUsage", + modelProperties: { + applicationName: { + serializedName: "applicationName", + type: { + name: "String" + } + }, + applicationVersion: { + serializedName: "applicationVersion", + type: { + name: "String" + } + }, + azureResourceUri: { + serializedName: "azureResourceUri", + type: { + name: "String" + } + }, + totalUsedFreeHours: { + serializedName: "totalUsedFreeHours", + type: { + name: "Number" + } + }, + totalUsedBillableHours: { + serializedName: "totalUsedBillableHours", + type: { + name: "Number" + } + }, + totalCharges: { + serializedName: "totalCharges", + type: { + name: "Number" + } + }, + usageGroups: { + serializedName: "usageGroups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingHubUsageGroup" + } + } + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const WingetAppSkuProperties: coreClient.CompositeMapper = { + serializedName: "Winget", + type: { + name: "Composite", + className: "WingetAppSkuProperties", + uberParent: "GalleryAppSkuProperties", + polymorphicDiscriminator: + GalleryAppSkuProperties.type.polymorphicDiscriminator, + modelProperties: { + ...GalleryAppSkuProperties.type.modelProperties, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + license: { + serializedName: "license", + type: { + name: "String" + } + }, + licenseUrl: { + serializedName: "licenseUrl", + type: { + name: "String" + } + } + } + } +}; + +export const ScriptExecutionResultSingletonResourceProperties: coreClient.CompositeMapper = { + serializedName: "ScriptExecution", + type: { + name: "Composite", + className: "ScriptExecutionResultSingletonResourceProperties", + uberParent: "AnalysisResultSingletonResourceProperties", + polymorphicDiscriminator: + AnalysisResultSingletonResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...AnalysisResultSingletonResourceProperties.type.modelProperties, + scriptExecutionResults: { + serializedName: "scriptExecutionResults", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScriptExecutionResult" + } + } + } + } + } + } +}; + +export const ReliabilityResultSingletonResourceProperties: coreClient.CompositeMapper = { + serializedName: "Reliability", + type: { + name: "Composite", + className: "ReliabilityResultSingletonResourceProperties", + uberParent: "AnalysisResultSingletonResourceProperties", + polymorphicDiscriminator: + AnalysisResultSingletonResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...AnalysisResultSingletonResourceProperties.type.modelProperties, + reliabilityResults: { + serializedName: "reliabilityResults", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReliabilityResult" + } + } + } + }, + inplaceUpgradeBaselineReliabilityResults: { + serializedName: "inplaceUpgradeBaselineReliabilityResults", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReliabilityResult" + } + } + } + } + } + } +}; + +export const CPUUtilizationResultSingletonResourceProperties: coreClient.CompositeMapper = { + serializedName: "CPUUtilization", + type: { + name: "Composite", + className: "CPUUtilizationResultSingletonResourceProperties", + uberParent: "AnalysisResultSingletonResourceProperties", + polymorphicDiscriminator: + AnalysisResultSingletonResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...AnalysisResultSingletonResourceProperties.type.modelProperties, + cpuUtilizationResults: { + serializedName: "cpuUtilizationResults", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UtilizationResult" + } + } + } + } + } + } +}; + +export const MemoryUtilizationResultSingletonResourceProperties: coreClient.CompositeMapper = { + serializedName: "MemoryUtilization", + type: { + name: "Composite", + className: "MemoryUtilizationResultSingletonResourceProperties", + uberParent: "AnalysisResultSingletonResourceProperties", + polymorphicDiscriminator: + AnalysisResultSingletonResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...AnalysisResultSingletonResourceProperties.type.modelProperties, + memoryUtilizationResults: { + serializedName: "memoryUtilizationResults", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UtilizationResult" + } + } + } + } + } + } +}; + +export const CPURegressionResultSingletonResourceProperties: coreClient.CompositeMapper = { + serializedName: "CPURegression", + type: { + name: "Composite", + className: "CPURegressionResultSingletonResourceProperties", + uberParent: "AnalysisResultSingletonResourceProperties", + polymorphicDiscriminator: + AnalysisResultSingletonResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...AnalysisResultSingletonResourceProperties.type.modelProperties, + cpuRegressionResults: { + serializedName: "cpuRegressionResults", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegressionResult" + } + } + } + } + } + } +}; + +export const MemoryRegressionResultSingletonResourceProperties: coreClient.CompositeMapper = { + serializedName: "MemoryRegression", + type: { + name: "Composite", + className: "MemoryRegressionResultSingletonResourceProperties", + uberParent: "AnalysisResultSingletonResourceProperties", + polymorphicDiscriminator: + AnalysisResultSingletonResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...AnalysisResultSingletonResourceProperties.type.modelProperties, + memoryRegressionResults: { + serializedName: "memoryRegressionResults", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegressionResult" + } + } + } + } + } + } +}; + +export const TestAnalysisResultSingletonResourceProperties: coreClient.CompositeMapper = { + serializedName: "TestAnalysis", + type: { + name: "Composite", + className: "TestAnalysisResultSingletonResourceProperties", + uberParent: "AnalysisResultSingletonResourceProperties", + polymorphicDiscriminator: + AnalysisResultSingletonResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...AnalysisResultSingletonResourceProperties.type.modelProperties, + testAnalysisResult: { + serializedName: "testAnalysisResult", + type: { + name: "Composite", + className: "TestAnalysisResult" + } + } + } + } +}; + +export const IntuneSingletonResourceProperties: coreClient.CompositeMapper = { + serializedName: "IntuneAccount", + type: { + name: "Composite", + className: "IntuneSingletonResourceProperties", + uberParent: "CredentialProperties", + polymorphicDiscriminator: + CredentialProperties.type.polymorphicDiscriminator, + modelProperties: { + ...CredentialProperties.type.modelProperties, + userNameKeyVaultSecretPath: { + serializedName: "userNameKeyVaultSecretPath", + type: { + name: "String" + } + }, + passwordKeyVaultSecretPath: { + serializedName: "passwordKeyVaultSecretPath", + type: { + name: "String" + } + } + } + } +}; + +export const ActionRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ActionRequest", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + requestType: { + serializedName: "properties.requestType", + type: { + name: "String" + } + }, + preReleaseAccessRequestSpec: { + serializedName: "properties.preReleaseAccessRequestSpec", + type: { + name: "Composite", + className: "PreReleaseAccessRequestSpec" + } + }, + creationDate: { + serializedName: "properties.creationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ChatSessionResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ChatSessionResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CustomImageResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomImageResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + vhdId: { + serializedName: "properties.vhdId", + type: { + name: "String" + } + }, + definitionName: { + serializedName: "properties.definitionName", + type: { + name: "String" + } + }, + versionName: { + serializedName: "properties.versionName", + type: { + name: "String" + } + }, + source: { + defaultValue: "VHD", + serializedName: "properties.source", + type: { + name: "String" + } + }, + product: { + serializedName: "properties.product", + readOnly: true, + type: { + name: "String" + } + }, + release: { + serializedName: "properties.release", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + creationTime: { + serializedName: "properties.creationTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + validationResults: { + serializedName: "properties.validationResults", + type: { + name: "Composite", + className: "ImageValidationResults" + } + }, + osDiskImageSizeInGB: { + serializedName: "properties.osDiskImageSizeInGB", + readOnly: true, + type: { + name: "Number" + } + }, + releaseVersionDate: { + serializedName: "properties.releaseVersionDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + vhdFileName: { + serializedName: "properties.vhdFileName", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ImageDefinitionResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImageDefinitionResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + architecture: { + serializedName: "properties.architecture", + type: { + name: "String" + } + }, + osState: { + serializedName: "properties.osState", + type: { + name: "String" + } + }, + securityType: { + serializedName: "properties.securityType", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VHDResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VHDResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + path: { + serializedName: "properties.path", + readOnly: true, + type: { + name: "String" + } + }, + fileName: { + serializedName: "properties.fileName", + readOnly: true, + type: { + name: "String" + } + }, + fileSize: { + serializedName: "properties.fileSize", + readOnly: true, + type: { + name: "Number" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + creationTime: { + serializedName: "properties.creationTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DraftPackageResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraftPackageResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + applicationName: { + serializedName: "properties.applicationName", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + draftPackagePath: { + serializedName: "properties.draftPackagePath", + readOnly: true, + type: { + name: "String" + } + }, + workingPath: { + serializedName: "properties.workingPath", + readOnly: true, + type: { + name: "String" + } + }, + appFileName: { + serializedName: "properties.appFileName", + type: { + name: "String" + } + }, + sourceType: { + serializedName: "properties.sourceType", + type: { + name: "String" + } + }, + useSample: { + serializedName: "properties.useSample", + type: { + name: "Boolean" + } + }, + comments: { + serializedName: "properties.comments", + type: { + name: "String" + } + }, + intuneMetadata: { + serializedName: "properties.intuneMetadata", + type: { + name: "Composite", + className: "DraftPackageIntuneAppMetadata" + } + }, + highlightedFiles: { + serializedName: "properties.highlightedFiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HighlightedFile" + } + } + } + }, + packageTags: { + serializedName: "properties.packageTags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + editPackage: { + defaultValue: false, + serializedName: "properties.editPackage", + type: { + name: "Boolean" + } + }, + packageId: { + serializedName: "properties.packageId", + type: { + name: "String" + } + }, + useAutofill: { + serializedName: "properties.useAutofill", + type: { + name: "Boolean" + } + }, + executableLaunchCommand: { + serializedName: "properties.executableLaunchCommand", + type: { + name: "String" + } + }, + processName: { + serializedName: "properties.processName", + type: { + name: "String" + } + }, + tabState: { + serializedName: "properties.tabState", + type: { + name: "Composite", + className: "TabState" + } + }, + testTypes: { + serializedName: "properties.testTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + targetOSList: { + serializedName: "properties.targetOSList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TargetOSInfo" + } + } + } + }, + inplaceUpgradeOSPair: { + serializedName: "properties.inplaceUpgradeOSPair", + type: { + name: "Composite", + className: "InplaceUpgradeOSInfo" + } + }, + lastModifiedTime: { + serializedName: "properties.lastModifiedTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + flightingRing: { + serializedName: "properties.flightingRing", + type: { + name: "String" + } + }, + firstPartyApps: { + serializedName: "properties.firstPartyApps", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FirstPartyAppDefinition" + } + } + } + }, + galleryApps: { + serializedName: "properties.galleryApps", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryAppDefinition" + } + } + } + }, + tests: { + serializedName: "properties.tests", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Test" + } + } + } + }, + intuneEnrollmentMetadata: { + serializedName: "properties.intuneEnrollmentMetadata", + type: { + name: "Composite", + className: "IntuneEnrollmentMetadata" + } + } + } + } +}; + +export const FreeHourBalanceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FreeHourBalanceResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + totalRemainingFreeHours: { + serializedName: "properties.totalRemainingFreeHours", + type: { + name: "Number" + } + }, + incrementEntries: { + serializedName: "properties.incrementEntries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingHubFreeHourIncrementEntry" + } + } + } + } + } + } +}; + +export const AvailableOSResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableOSResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + osId: { + serializedName: "properties.osId", + type: { + name: "String" + } + }, + osName: { + serializedName: "properties.osName", + type: { + name: "String" + } + }, + osVersion: { + serializedName: "properties.osVersion", + type: { + name: "String" + } + }, + insiderChannel: { + serializedName: "properties.insiderChannel", + type: { + name: "String" + } + }, + osUpdateType: { + serializedName: "properties.osUpdateType", + type: { + name: "String" + } + }, + osPlatform: { + serializedName: "properties.osPlatform", + type: { + name: "String" + } + } + } + } +}; + +export const FeatureUpdateSupportedOsesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FeatureUpdateSupportedOsesResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + osId: { + serializedName: "properties.osId", + type: { + name: "String" + } + }, + osName: { + serializedName: "properties.osName", + type: { + name: "String" + } + }, + insiderChannel: { + serializedName: "properties.insiderChannel", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + displayText: { + serializedName: "properties.displayText", + type: { + name: "String" + } + }, + baselineProducts: { + serializedName: "properties.baselineProducts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + startTime: { + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + } + } + } +}; + +export const FlightingRingResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlightingRingResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + actualFlightingRingName: { + serializedName: "properties.actualFlightingRingName", + type: { + name: "String" + } + } + } + } +}; + +export const FirstPartyAppResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FirstPartyAppResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + mediaType: { + serializedName: "properties.mediaType", + type: { + name: "String" + } + }, + architecture: { + serializedName: "properties.architecture", + type: { + name: "String" + } + }, + channel: { + serializedName: "properties.channel", + type: { + name: "String" + } + }, + ring: { + serializedName: "properties.ring", + type: { + name: "String" + } + }, + supportedProducts: { + serializedName: "properties.supportedProducts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const GalleryAppResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryAppResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + applicationType: { + serializedName: "properties.applicationType", + type: { + name: "String" + } + }, + applicationId: { + serializedName: "properties.applicationId", + type: { + name: "String" + } + }, + applicationName: { + serializedName: "properties.applicationName", + type: { + name: "String" + } + }, + popularity: { + defaultValue: 0, + serializedName: "properties.popularity", + type: { + name: "Number" + } + } + } + } +}; + +export const GalleryAppSkuResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryAppSkuResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + applicationType: { + serializedName: "properties.applicationType", + type: { + name: "String" + } + } + } + } +}; + +export const TestTypeResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestTypeResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + actualTestTypeName: { + serializedName: "properties.actualTestTypeName", + type: { + name: "String" + } + } + } + } +}; + +export const TestSummaryResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestSummaryResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + testSummaryId: { + serializedName: "properties.testSummaryId", + type: { + name: "String" + } + }, + packageId: { + serializedName: "properties.packageId", + type: { + name: "String" + } + }, + applicationName: { + serializedName: "properties.applicationName", + type: { + name: "String" + } + }, + applicationVersion: { + serializedName: "properties.applicationVersion", + type: { + name: "String" + } + }, + executionStatus: { + serializedName: "properties.executionStatus", + type: { + name: "String" + } + }, + testStatus: { + serializedName: "properties.testStatus", + type: { + name: "String" + } + }, + grade: { + serializedName: "properties.grade", + type: { + name: "String" + } + }, + testRunTime: { + serializedName: "properties.testRunTime", + type: { + name: "String" + } + }, + featureUpdatesTestSummary: { + serializedName: "properties.featureUpdatesTestSummary", + type: { + name: "Composite", + className: "OSUpdatesTestSummary" + } + }, + securityUpdatesTestSummary: { + serializedName: "properties.securityUpdatesTestSummary", + type: { + name: "Composite", + className: "OSUpdatesTestSummary" + } + }, + inplaceUpgradesTestSummary: { + serializedName: "properties.inplaceUpgradesTestSummary", + type: { + name: "Composite", + className: "OSUpdatesTestSummary" + } + }, + packageTags: { + serializedName: "properties.packageTags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const TestResultResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestResultResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + baselineTestResultId: { + serializedName: "properties.baselineTestResultId", + type: { + name: "String" + } + }, + packageId: { + serializedName: "properties.packageId", + type: { + name: "String" + } + }, + applicationName: { + serializedName: "properties.applicationName", + type: { + name: "String" + } + }, + applicationVersion: { + serializedName: "properties.applicationVersion", + type: { + name: "String" + } + }, + osName: { + serializedName: "properties.osName", + type: { + name: "String" + } + }, + customImageId: { + serializedName: "properties.customImageId", + type: { + name: "String" + } + }, + customImageDisplayName: { + serializedName: "properties.customImageDisplayName", + type: { + name: "String" + } + }, + releaseName: { + serializedName: "properties.releaseName", + type: { + name: "String" + } + }, + releaseVersionDate: { + serializedName: "properties.releaseVersionDate", + type: { + name: "DateTime" + } + }, + flightingRing: { + serializedName: "properties.flightingRing", + type: { + name: "String" + } + }, + buildVersion: { + serializedName: "properties.buildVersion", + type: { + name: "String" + } + }, + buildRevision: { + serializedName: "properties.buildRevision", + type: { + name: "String" + } + }, + testType: { + serializedName: "properties.testType", + type: { + name: "String" + } + }, + testRunTime: { + serializedName: "properties.testRunTime", + type: { + name: "String" + } + }, + isDownloadDataAvailable: { + serializedName: "properties.isDownloadDataAvailable", + type: { + name: "Boolean" + } + }, + isVideoAvailable: { + serializedName: "properties.isVideoAvailable", + type: { + name: "Boolean" + } + }, + executionStatus: { + serializedName: "properties.executionStatus", + type: { + name: "String" + } + }, + testStatus: { + serializedName: "properties.testStatus", + type: { + name: "String" + } + }, + grade: { + serializedName: "properties.grade", + type: { + name: "String" + } + }, + kbNumber: { + serializedName: "properties.kbNumber", + type: { + name: "String" + } + }, + interopMediaType: { + serializedName: "properties.interopMediaType", + type: { + name: "String" + } + }, + interopMediaVersion: { + serializedName: "properties.interopMediaVersion", + type: { + name: "String" + } + }, + packageVersion: { + serializedName: "properties.packageVersion", + type: { + name: "String" + } + }, + analysisSummaries: { + serializedName: "properties.analysisSummaries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TestResultAnalysisSummary" + } + } + } + }, + inplaceUpgradeProperties: { + serializedName: "properties.inplaceUpgradeProperties", + type: { + name: "Composite", + className: "InplaceUpgradeProperties" + } + }, + testStartTime: { + serializedName: "properties.testStartTime", + type: { + name: "DateTime" + } + }, + testEndTime: { + serializedName: "properties.testEndTime", + type: { + name: "DateTime" + } + }, + firstPartyApps: { + serializedName: "properties.firstPartyApps", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TestResultFirstPartyAppDefinition" + } + } + } + } + } + } +}; + +export const OSUpdateResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSUpdateResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + osName: { + serializedName: "properties.osName", + type: { + name: "String" + } + }, + release: { + serializedName: "properties.release", + type: { + name: "String" + } + }, + flightingRing: { + serializedName: "properties.flightingRing", + type: { + name: "String" + } + }, + buildVersion: { + serializedName: "properties.buildVersion", + type: { + name: "String" + } + }, + buildRevision: { + serializedName: "properties.buildRevision", + type: { + name: "String" + } + }, + typePropertiesType: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + releaseVersionDate: { + serializedName: "properties.releaseVersionDate", + type: { + name: "DateTime" + } + }, + inplaceUpgradeBaselineProperties: { + serializedName: "properties.inplaceUpgradeBaselineProperties", + type: { + name: "Composite", + className: "OsProperties" + } + }, + customImageId: { + serializedName: "properties.customImageId", + type: { + name: "String" + } + }, + customImageDisplayName: { + serializedName: "properties.customImageDisplayName", + type: { + name: "String" + } + } + } + } +}; + +export const FavoriteProcessResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FavoriteProcessResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + actualProcessName: { + serializedName: "properties.actualProcessName", + type: { + name: "String" + } + } + } + } +}; + +export const AnalysisResultSingletonResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AnalysisResultSingletonResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + grade: { + serializedName: "properties.grade", + type: { + name: "String" + } + }, + analysisResultType: { + serializedName: "properties.analysisResultType", + type: { + name: "String" + } + } + } + } +}; + +export const EmailEventResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EmailEventResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + eventId: { + serializedName: "properties.eventId", + type: { + name: "String" + } + }, + eventName: { + serializedName: "properties.eventName", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + } + } + } +}; + +export const CustomerEventResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomerEventResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + eventName: { + serializedName: "properties.eventName", + type: { + name: "String" + } + }, + receivers: { + serializedName: "properties.receivers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NotificationEventReceiver" + } + } + } + } + } + } +}; + +export const AvailableInplaceUpgradeOSResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableInplaceUpgradeOSResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + sourceOsName: { + serializedName: "properties.sourceOsName", + type: { + name: "String" + } + }, + sourceOsReleases: { + serializedName: "properties.sourceOsReleases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReleaseProperties" + } + } + } + }, + supportedTargetOsNameList: { + serializedName: "properties.supportedTargetOsNameList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const CredentialResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CredentialResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + credentialType: { + serializedName: "properties.credentialType", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + } + } + } +}; + +export const TestBaseAccountResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "SystemAssignedServiceIdentity" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + sku: { + serializedName: "properties.sku", + type: { + name: "Composite", + className: "TestBaseAccountSKU" + } + }, + accessLevel: { + serializedName: "properties.accessLevel", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PackageResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackageResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + applicationName: { + serializedName: "properties.applicationName", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + draftPackageId: { + serializedName: "properties.draftPackageId", + type: { + name: "String" + } + }, + packageStatus: { + serializedName: "properties.packageStatus", + readOnly: true, + type: { + name: "String" + } + }, + isEnabled: { + serializedName: "properties.isEnabled", + readOnly: true, + type: { + name: "Boolean" + } + }, + blobPath: { + serializedName: "properties.blobPath", + type: { + name: "String" + } + }, + validationResults: { + serializedName: "properties.validationResults", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PackageValidationResult" + } + } + } + }, + testTypes: { + serializedName: "properties.testTypes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + targetOSList: { + serializedName: "properties.targetOSList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TargetOSInfo" + } + } + } + }, + inplaceUpgradeOSPair: { + serializedName: "properties.inplaceUpgradeOSPair", + type: { + name: "Composite", + className: "InplaceUpgradeOSInfo" + } + }, + lastModifiedTime: { + serializedName: "properties.lastModifiedTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + flightingRing: { + serializedName: "properties.flightingRing", + type: { + name: "String" + } + }, + firstPartyApps: { + serializedName: "properties.firstPartyApps", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FirstPartyAppDefinition" + } + } + } + }, + galleryApps: { + serializedName: "properties.galleryApps", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryAppDefinition" + } + } + } + }, + tests: { + serializedName: "properties.tests", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Test" + } + } + } + }, + intuneEnrollmentMetadata: { + serializedName: "properties.intuneEnrollmentMetadata", + type: { + name: "Composite", + className: "IntuneEnrollmentMetadata" + } + } + } + } +}; + +export const ChatSessionChatHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ChatSessionChatHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const CustomImagesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomImagesCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const CustomImagesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomImagesDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const DraftPackagesCopyFromPackageHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraftPackagesCopyFromPackageHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const DraftPackagesExtractFileHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraftPackagesExtractFileHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const DraftPackagesGenerateFoldersAndScriptsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DraftPackagesGenerateFoldersAndScriptsHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const TestBaseAccountsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountsCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const TestBaseAccountsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountsUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const TestBaseAccountsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const TestBaseAccountsOffboardHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TestBaseAccountsOffboardHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const PackagesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackagesCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const PackagesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackagesUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const PackagesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackagesDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const PackagesHardDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackagesHardDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const PackagesRunTestHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackagesRunTestHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const CustomerEventsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomerEventsCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const CustomerEventsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomerEventsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export let discriminators = { + GalleryAppSkuProperties: GalleryAppSkuProperties, + AnalysisResultSingletonResourceProperties: AnalysisResultSingletonResourceProperties, + CredentialProperties: CredentialProperties, + "GalleryAppSkuProperties.Winget": WingetAppSkuProperties, + "AnalysisResultSingletonResourceProperties.ScriptExecution": ScriptExecutionResultSingletonResourceProperties, + "AnalysisResultSingletonResourceProperties.Reliability": ReliabilityResultSingletonResourceProperties, + "AnalysisResultSingletonResourceProperties.CPUUtilization": CPUUtilizationResultSingletonResourceProperties, + "AnalysisResultSingletonResourceProperties.MemoryUtilization": MemoryUtilizationResultSingletonResourceProperties, + "AnalysisResultSingletonResourceProperties.CPURegression": CPURegressionResultSingletonResourceProperties, + "AnalysisResultSingletonResourceProperties.MemoryRegression": MemoryRegressionResultSingletonResourceProperties, + "AnalysisResultSingletonResourceProperties.TestAnalysis": TestAnalysisResultSingletonResourceProperties, + "CredentialProperties.IntuneAccount": IntuneSingletonResourceProperties +}; diff --git a/sdk/testbase/arm-testbase/src/models/parameters.ts b/sdk/testbase/arm-testbase/src/models/parameters.ts new file mode 100644 index 000000000000..27da76885b7d --- /dev/null +++ b/sdk/testbase/arm-testbase/src/models/parameters.ts @@ -0,0 +1,659 @@ +/* + * 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 { + ActionRequest as ActionRequestMapper, + ChatRequest as ChatRequestMapper, + CustomImageResource as CustomImageResourceMapper, + ImageNameCheckAvailabilityParameters as ImageNameCheckAvailabilityParametersMapper, + ImageDefinitionResource as ImageDefinitionResourceMapper, + DraftPackageResource as DraftPackageResourceMapper, + DraftPackageUpdateParameters as DraftPackageUpdateParametersMapper, + CopyFromPackageOperationParameters as CopyFromPackageOperationParametersMapper, + ExtractFileOperationParameters as ExtractFileOperationParametersMapper, + GenerateOperationParameters as GenerateOperationParametersMapper, + TestBaseAccountResource as TestBaseAccountResourceMapper, + TestBaseAccountUpdateParameters as TestBaseAccountUpdateParametersMapper, + GetFileUploadURLParameters as GetFileUploadURLParametersMapper, + PackageCheckNameAvailabilityParameters as PackageCheckNameAvailabilityParametersMapper, + PackageResource as PackageResourceMapper, + PackageUpdateParameters as PackageUpdateParametersMapper, + PackageRunTestParameters as PackageRunTestParametersMapper, + TestResultConsoleLogDownloadURLParameters as TestResultConsoleLogDownloadURLParametersMapper, + FavoriteProcessResource as FavoriteProcessResourceMapper, + CustomerEventResource as CustomerEventResourceMapper, + BillingHubGetUsageRequest as BillingHubGetUsageRequestMapper, + CredentialResource as CredentialResourceMapper +} from "../models/mappers"; + +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: "Uuid" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const testBaseAccountName: OperationURLParameter = { + parameterPath: "testBaseAccountName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9_]|([-. ][A-Za-z0-9]))+$") + }, + serializedName: "testBaseAccountName", + required: true, + type: { + name: "String" + } + } +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2023-11-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const actionRequestName: OperationURLParameter = { + parameterPath: "actionRequestName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9_]|([-. ][A-Za-z0-9]))+$") + }, + serializedName: "actionRequestName", + 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 actionRequest: OperationParameter = { + parameterPath: ["options", "actionRequest"], + mapper: ActionRequestMapper +}; + +export const requestType: OperationQueryParameter = { + parameterPath: ["options", "requestType"], + mapper: { + serializedName: "requestType", + type: { + name: "String" + } + } +}; + +export const top: OperationQueryParameter = { + parameterPath: ["options", "top"], + mapper: { + serializedName: "top", + type: { + name: "Number" + } + } +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const chatSessionName: OperationURLParameter = { + parameterPath: "chatSessionName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9_]|([-. ][A-Za-z0-9]))+$") + }, + serializedName: "chatSessionName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: ChatRequestMapper +}; + +export const parameters1: OperationParameter = { + parameterPath: "parameters", + mapper: CustomImageResourceMapper +}; + +export const customImageName: OperationURLParameter = { + parameterPath: "customImageName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9_]|([-. ][A-Za-z0-9]))+$") + }, + serializedName: "customImageName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters2: OperationParameter = { + parameterPath: "parameters", + mapper: ImageNameCheckAvailabilityParametersMapper +}; + +export const parameters3: OperationParameter = { + parameterPath: "parameters", + mapper: ImageDefinitionResourceMapper +}; + +export const imageDefinitionName: OperationURLParameter = { + parameterPath: "imageDefinitionName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9_]|([-. ][A-Za-z0-9]))+$") + }, + serializedName: "imageDefinitionName", + required: true, + type: { + name: "String" + } + } +}; + +export const vhdName: OperationURLParameter = { + parameterPath: "vhdName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9_.-]+$") + }, + serializedName: "vhdName", + required: true, + type: { + name: "String" + } + } +}; + +export const packageName: OperationQueryParameter = { + parameterPath: ["options", "packageName"], + mapper: { + serializedName: "packageName", + type: { + name: "String" + } + } +}; + +export const editPackage: OperationQueryParameter = { + parameterPath: ["options", "editPackage"], + mapper: { + serializedName: "editPackage", + type: { + name: "Boolean" + } + } +}; + +export const parameters4: OperationParameter = { + parameterPath: "parameters", + mapper: DraftPackageResourceMapper +}; + +export const draftPackageName: OperationURLParameter = { + parameterPath: "draftPackageName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9_]|([-. ][A-Za-z0-9]))+$") + }, + serializedName: "draftPackageName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters5: OperationParameter = { + parameterPath: "parameters", + mapper: DraftPackageUpdateParametersMapper +}; + +export const parameters6: OperationParameter = { + parameterPath: "parameters", + mapper: CopyFromPackageOperationParametersMapper +}; + +export const parameters7: OperationParameter = { + parameterPath: "parameters", + mapper: ExtractFileOperationParametersMapper +}; + +export const parameters8: OperationParameter = { + parameterPath: "parameters", + mapper: GenerateOperationParametersMapper +}; + +export const freeHourBalanceName: OperationURLParameter = { + parameterPath: "freeHourBalanceName", + mapper: { + serializedName: "freeHourBalanceName", + required: true, + type: { + name: "String" + } + } +}; + +export const getDeleted: OperationQueryParameter = { + parameterPath: ["options", "getDeleted"], + mapper: { + serializedName: "getDeleted", + type: { + name: "Boolean" + } + } +}; + +export const parameters9: OperationParameter = { + parameterPath: "parameters", + mapper: TestBaseAccountResourceMapper +}; + +export const restore: OperationQueryParameter = { + parameterPath: ["options", "restore"], + mapper: { + serializedName: "restore", + type: { + name: "Boolean" + } + } +}; + +export const parameters10: OperationParameter = { + parameterPath: "parameters", + mapper: TestBaseAccountUpdateParametersMapper +}; + +export const parameters11: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: GetFileUploadURLParametersMapper +}; + +export const parameters12: OperationParameter = { + parameterPath: "parameters", + mapper: PackageCheckNameAvailabilityParametersMapper +}; + +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; + +export const osUpdateType: OperationQueryParameter = { + parameterPath: "osUpdateType", + mapper: { + serializedName: "osUpdateType", + required: true, + type: { + name: "String" + } + } +}; + +export const availableOSResourceName: OperationURLParameter = { + parameterPath: "availableOSResourceName", + mapper: { + serializedName: "availableOSResourceName", + required: true, + type: { + name: "String" + } + } +}; + +export const flightingRingResourceName: OperationURLParameter = { + parameterPath: "flightingRingResourceName", + mapper: { + serializedName: "flightingRingResourceName", + required: true, + type: { + name: "String" + } + } +}; + +export const firstPartyAppResourceName: OperationURLParameter = { + parameterPath: "firstPartyAppResourceName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9]|(-[A-Za-z0-9]))+$") + }, + serializedName: "firstPartyAppResourceName", + required: true, + type: { + name: "String" + } + } +}; + +export const keyword: OperationQueryParameter = { + parameterPath: ["options", "keyword"], + mapper: { + serializedName: "keyword", + type: { + name: "String" + } + } +}; + +export const applicationType: OperationQueryParameter = { + parameterPath: ["options", "applicationType"], + mapper: { + serializedName: "applicationType", + type: { + name: "String" + } + } +}; + +export const orderBy: OperationQueryParameter = { + parameterPath: ["options", "orderBy"], + mapper: { + defaultValue: "relevance", + serializedName: "orderBy", + type: { + name: "String" + } + } +}; + +export const galleryAppName: OperationURLParameter = { + parameterPath: "galleryAppName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9]|(-[A-Za-z0-9]))+$") + }, + serializedName: "galleryAppName", + required: true, + type: { + name: "String" + } + } +}; + +export const galleryAppSkuName: OperationURLParameter = { + parameterPath: "galleryAppSkuName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9]|(-[A-Za-z0-9]))+$") + }, + serializedName: "galleryAppSkuName", + required: true, + type: { + name: "String" + } + } +}; + +export const testTypeResourceName: OperationURLParameter = { + parameterPath: "testTypeResourceName", + mapper: { + serializedName: "testTypeResourceName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters13: OperationParameter = { + parameterPath: "parameters", + mapper: PackageResourceMapper +}; + +export const packageName1: OperationURLParameter = { + parameterPath: "packageName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9_]|([-. ][A-Za-z0-9]))+$") + }, + serializedName: "packageName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters14: OperationParameter = { + parameterPath: "parameters", + mapper: PackageUpdateParametersMapper +}; + +export const parameters15: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: PackageRunTestParametersMapper +}; + +export const testSummaryName: OperationURLParameter = { + parameterPath: "testSummaryName", + mapper: { + serializedName: "testSummaryName", + required: true, + type: { + name: "String" + } + } +}; + +export const testResultName: OperationURLParameter = { + parameterPath: "testResultName", + mapper: { + serializedName: "testResultName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters16: OperationParameter = { + parameterPath: "parameters", + mapper: TestResultConsoleLogDownloadURLParametersMapper +}; + +export const osUpdateResourceName: OperationURLParameter = { + parameterPath: "osUpdateResourceName", + mapper: { + serializedName: "osUpdateResourceName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters17: OperationParameter = { + parameterPath: "parameters", + mapper: FavoriteProcessResourceMapper +}; + +export const favoriteProcessResourceName: OperationURLParameter = { + parameterPath: "favoriteProcessResourceName", + mapper: { + serializedName: "favoriteProcessResourceName", + required: true, + type: { + name: "String" + } + } +}; + +export const analysisResultType: OperationQueryParameter = { + parameterPath: "analysisResultType", + mapper: { + serializedName: "analysisResultType", + required: true, + type: { + name: "String" + } + } +}; + +export const analysisResultName: OperationURLParameter = { + parameterPath: "analysisResultName", + mapper: { + serializedName: "analysisResultName", + required: true, + type: { + name: "String" + } + } +}; + +export const emailEventResourceName: OperationURLParameter = { + parameterPath: "emailEventResourceName", + mapper: { + serializedName: "emailEventResourceName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters18: OperationParameter = { + parameterPath: "parameters", + mapper: CustomerEventResourceMapper +}; + +export const customerEventName: OperationURLParameter = { + parameterPath: "customerEventName", + mapper: { + serializedName: "customerEventName", + required: true, + type: { + name: "String" + } + } +}; + +export const getUsageRequest: OperationParameter = { + parameterPath: ["options", "getUsageRequest"], + mapper: BillingHubGetUsageRequestMapper +}; + +export const availableInplaceUpgradeOSResourceName: OperationURLParameter = { + parameterPath: "availableInplaceUpgradeOSResourceName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9_]|(-{1,3}[A-Za-z0-9]))+$") + }, + serializedName: "availableInplaceUpgradeOSResourceName", + required: true, + type: { + name: "String" + } + } +}; + +export const credentialName: OperationURLParameter = { + parameterPath: "credentialName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-Za-z0-9]([A-Za-z0-9_]|([-. ][A-Za-z0-9]))+$") + }, + serializedName: "credentialName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters19: OperationParameter = { + parameterPath: "parameters", + mapper: CredentialResourceMapper +}; diff --git a/sdk/testbase/arm-testbase/src/operations/actionRequestsOperations.ts b/sdk/testbase/arm-testbase/src/operations/actionRequestsOperations.ts new file mode 100644 index 000000000000..fffbc0eccda1 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/actionRequestsOperations.ts @@ -0,0 +1,341 @@ +/* + * 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"; +import { ActionRequestsOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + ActionRequest, + ActionRequestsListNextOptionalParams, + ActionRequestsListOptionalParams, + ActionRequestsListResponse, + ActionRequestsGetOptionalParams, + ActionRequestsGetResponse, + ActionRequestsPutOptionalParams, + ActionRequestsPutResponse, + ActionRequestsDeleteOptionalParams, + ActionRequestsListNextResponse +} from "../models"; + +/// +/** Class containing ActionRequestsOperations operations. */ +export class ActionRequestsOperationsImpl implements ActionRequestsOperations { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class ActionRequestsOperations class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * List all action requests under the specified test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + options?: ActionRequestsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + 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, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: ActionRequestsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ActionRequestsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: ActionRequestsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Get the action request under the specified test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param actionRequestName + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + actionRequestName: string, + options?: ActionRequestsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, actionRequestName, options }, + getOperationSpec + ); + } + + /** + * Create (submit) an action request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param actionRequestName + * @param options The options parameters. + */ + put( + resourceGroupName: string, + testBaseAccountName: string, + actionRequestName: string, + options?: ActionRequestsPutOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, actionRequestName, options }, + putOperationSpec + ); + } + + /** + * Delete (revoke) an action request. Only requests in review can be deleted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param actionRequestName + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + actionRequestName: string, + options?: ActionRequestsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, actionRequestName, options }, + deleteOperationSpec + ); + } + + /** + * List all action requests under the specified test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + options?: ActionRequestsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: ActionRequestsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/actionRequests/{actionRequestName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ActionRequest + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.actionRequestName + ], + headerParameters: [Parameters.accept], + serializer +}; +const putOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/actionRequests/{actionRequestName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ActionRequest + }, + 201: { + bodyMapper: Mappers.ActionRequest + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.actionRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.actionRequestName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/actionRequests/{actionRequestName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.actionRequestName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/actionRequests", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ActionRequests + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.requestType, + Parameters.top + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ActionRequests + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/analysisResults.ts b/sdk/testbase/arm-testbase/src/operations/analysisResults.ts new file mode 100644 index 000000000000..afb455910794 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/analysisResults.ts @@ -0,0 +1,241 @@ +/* + * 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 { AnalysisResults } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + AnalysisResultSingletonResource, + AnalysisResultType, + AnalysisResultsListOptionalParams, + AnalysisResultsListResponse, + AnalysisResultName, + AnalysisResultsGetOptionalParams, + AnalysisResultsGetResponse +} from "../models"; + +/// +/** Class containing AnalysisResults operations. */ +export class AnalysisResultsImpl implements AnalysisResults { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class AnalysisResults class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists the Analysis Results of a Test Result. The result collection will only contain one element as + * all the data will be nested in a singleton object. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param analysisResultType The type of the Analysis Result of a Test Result. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + analysisResultType: AnalysisResultType, + options?: AnalysisResultsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + packageName, + testResultName, + analysisResultType, + 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, + testBaseAccountName, + packageName, + testResultName, + analysisResultType, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + analysisResultType: AnalysisResultType, + options?: AnalysisResultsListOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: AnalysisResultsListResponse; + result = await this._list( + resourceGroupName, + testBaseAccountName, + packageName, + testResultName, + analysisResultType, + options + ); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + analysisResultType: AnalysisResultType, + options?: AnalysisResultsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + packageName, + testResultName, + analysisResultType, + options + )) { + yield* page; + } + } + + /** + * Lists the Analysis Results of a Test Result. The result collection will only contain one element as + * all the data will be nested in a singleton object. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param analysisResultType The type of the Analysis Result of a Test Result. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + analysisResultType: AnalysisResultType, + options?: AnalysisResultsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + testResultName, + analysisResultType, + options + }, + listOperationSpec + ); + } + + /** + * Gets an Analysis Result of a Test Result by name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param analysisResultName The name of the Analysis Result of a Test Result. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + analysisResultName: AnalysisResultName, + options?: AnalysisResultsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + testResultName, + analysisResultName, + options + }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/testResults/{testResultName}/analysisResults", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AnalysisResultListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.analysisResultType], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1, + Parameters.testResultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/testResults/{testResultName}/analysisResults/{analysisResultName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AnalysisResultSingletonResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1, + Parameters.testResultName, + Parameters.analysisResultName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/availableInplaceUpgradeOS.ts b/sdk/testbase/arm-testbase/src/operations/availableInplaceUpgradeOS.ts new file mode 100644 index 000000000000..67c8018f51d5 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/availableInplaceUpgradeOS.ts @@ -0,0 +1,263 @@ +/* + * 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"; +import { AvailableInplaceUpgradeOS } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + AvailableInplaceUpgradeOSResource, + AvailableInplaceUpgradeOSListNextOptionalParams, + OsUpdateType, + AvailableInplaceUpgradeOSListOptionalParams, + AvailableInplaceUpgradeOSListResponse, + AvailableInplaceUpgradeOSGetOptionalParams, + AvailableInplaceUpgradeOSGetResponse, + AvailableInplaceUpgradeOSListNextResponse +} from "../models"; + +/// +/** Class containing AvailableInplaceUpgradeOS operations. */ +export class AvailableInplaceUpgradeOSImpl + implements AvailableInplaceUpgradeOS { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class AvailableInplaceUpgradeOS class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the available In-place Upgrade OSs to a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + osUpdateType: OsUpdateType, + options?: AvailableInplaceUpgradeOSListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + osUpdateType, + 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, + testBaseAccountName, + osUpdateType, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + osUpdateType: OsUpdateType, + options?: AvailableInplaceUpgradeOSListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AvailableInplaceUpgradeOSListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + osUpdateType, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + osUpdateType: OsUpdateType, + options?: AvailableInplaceUpgradeOSListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + osUpdateType, + options + )) { + yield* page; + } + } + + /** + * Lists all the available In-place Upgrade OSs to a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + osUpdateType: OsUpdateType, + options?: AvailableInplaceUpgradeOSListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, osUpdateType, options }, + listOperationSpec + ); + } + + /** + * Gets an available In-place Upgrade OS to run a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param availableInplaceUpgradeOSResourceName The resource name of an Available In-place Upgrade OS. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + availableInplaceUpgradeOSResourceName: string, + options?: AvailableInplaceUpgradeOSGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + availableInplaceUpgradeOSResourceName, + options + }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: AvailableInplaceUpgradeOSListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/availableInplaceUpgradeOSs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AvailableInplaceUpgradeOSListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.osUpdateType], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/availableInplaceUpgradeOSs/{availableInplaceUpgradeOSResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AvailableInplaceUpgradeOSResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.availableInplaceUpgradeOSResourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AvailableInplaceUpgradeOSListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/availableOS.ts b/sdk/testbase/arm-testbase/src/operations/availableOS.ts new file mode 100644 index 000000000000..42fc68c096c7 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/availableOS.ts @@ -0,0 +1,262 @@ +/* + * 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"; +import { AvailableOS } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + AvailableOSResource, + AvailableOSListNextOptionalParams, + OsUpdateType, + AvailableOSListOptionalParams, + AvailableOSListResponse, + AvailableOSGetOptionalParams, + AvailableOSGetResponse, + AvailableOSListNextResponse +} from "../models"; + +/// +/** Class containing AvailableOS operations. */ +export class AvailableOSImpl implements AvailableOS { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class AvailableOS class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the available OSs to run a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + osUpdateType: OsUpdateType, + options?: AvailableOSListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + osUpdateType, + 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, + testBaseAccountName, + osUpdateType, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + osUpdateType: OsUpdateType, + options?: AvailableOSListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AvailableOSListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + osUpdateType, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + osUpdateType: OsUpdateType, + options?: AvailableOSListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + osUpdateType, + options + )) { + yield* page; + } + } + + /** + * Lists all the available OSs to run a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + osUpdateType: OsUpdateType, + options?: AvailableOSListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, osUpdateType, options }, + listOperationSpec + ); + } + + /** + * Gets an available OS to run a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param availableOSResourceName The resource name of an Available OS. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + availableOSResourceName: string, + options?: AvailableOSGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + availableOSResourceName, + options + }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: AvailableOSListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/availableOSs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AvailableOSListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.osUpdateType], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/availableOSs/{availableOSResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AvailableOSResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.availableOSResourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AvailableOSListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/billingHubService.ts b/sdk/testbase/arm-testbase/src/operations/billingHubService.ts new file mode 100644 index 000000000000..5107aa3bd281 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/billingHubService.ts @@ -0,0 +1,113 @@ +/* + * 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 { BillingHubService } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + BillingHubServiceGetFreeHourBalanceOptionalParams, + BillingHubServiceGetFreeHourBalanceResponse, + BillingHubServiceGetUsageOptionalParams, + BillingHubServiceGetUsageResponse +} from "../models"; + +/** Class containing BillingHubService operations. */ +export class BillingHubServiceImpl implements BillingHubService { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class BillingHubService class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + getFreeHourBalance( + resourceGroupName: string, + testBaseAccountName: string, + options?: BillingHubServiceGetFreeHourBalanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + getFreeHourBalanceOperationSpec + ); + } + + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + getUsage( + resourceGroupName: string, + testBaseAccountName: string, + options?: BillingHubServiceGetUsageOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + getUsageOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getFreeHourBalanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/getFreeHourBalance", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.BillingHubGetFreeHourBalanceResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getUsageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/getUsage", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.BillingHubGetUsageResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.getUsageRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/chatSession.ts b/sdk/testbase/arm-testbase/src/operations/chatSession.ts new file mode 100644 index 000000000000..2b40d3c325a8 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/chatSession.ts @@ -0,0 +1,181 @@ +/* + * 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 { ChatSession } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ChatRequest, + ChatSessionChatOptionalParams, + ChatSessionChatResponse +} from "../models"; + +/** Class containing ChatSession operations. */ +export class ChatSessionImpl implements ChatSession { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class ChatSession class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Start a new chat turn. Ask a question and see the answer in response. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param chatSessionName The chat session name. + * @param parameters Payload to ask a question. + * @param options The options parameters. + */ + async beginChat( + resourceGroupName: string, + testBaseAccountName: string, + chatSessionName: string, + parameters: ChatRequest, + options?: ChatSessionChatOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ChatSessionChatResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + testBaseAccountName, + chatSessionName, + parameters, + options + }, + spec: chatOperationSpec + }); + const poller = await createHttpPoller< + ChatSessionChatResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Start a new chat turn. Ask a question and see the answer in response. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param chatSessionName The chat session name. + * @param parameters Payload to ask a question. + * @param options The options parameters. + */ + async beginChatAndWait( + resourceGroupName: string, + testBaseAccountName: string, + chatSessionName: string, + parameters: ChatRequest, + options?: ChatSessionChatOptionalParams + ): Promise { + const poller = await this.beginChat( + resourceGroupName, + testBaseAccountName, + chatSessionName, + parameters, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const chatOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/chatSessions/{chatSessionName}/chat", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ChatResponse + }, + 201: { + bodyMapper: Mappers.ChatResponse + }, + 202: { + bodyMapper: Mappers.ChatResponse + }, + 204: { + bodyMapper: Mappers.ChatResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.chatSessionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/chatSessions.ts b/sdk/testbase/arm-testbase/src/operations/chatSessions.ts new file mode 100644 index 000000000000..a5285b787004 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/chatSessions.ts @@ -0,0 +1,246 @@ +/* + * 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"; +import { ChatSessions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + ChatSessionResource, + ChatSessionsListNextOptionalParams, + ChatSessionsListOptionalParams, + ChatSessionsListResponse, + ChatSessionsGetOptionalParams, + ChatSessionsGetResponse, + ChatSessionsListNextResponse +} from "../models"; + +/// +/** Class containing ChatSessions operations. */ +export class ChatSessionsImpl implements ChatSessions { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class ChatSessions class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * List all chat sessions + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + options?: ChatSessionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + 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, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: ChatSessionsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ChatSessionsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: ChatSessionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * List all chat sessions + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + options?: ChatSessionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listOperationSpec + ); + } + + /** + * Get a chat session + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param chatSessionName The chat session name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + chatSessionName: string, + options?: ChatSessionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, chatSessionName, options }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: ChatSessionsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/chatSessions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ChatSessionResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/chatSessions/{chatSessionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ChatSessionResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.chatSessionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ChatSessionResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/credential.ts b/sdk/testbase/arm-testbase/src/operations/credential.ts new file mode 100644 index 000000000000..9f06706010d1 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/credential.ts @@ -0,0 +1,246 @@ +/* + * 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"; +import { Credential } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + CredentialResource, + CredentialListByTestBaseAccountNextOptionalParams, + CredentialListByTestBaseAccountOptionalParams, + CredentialListByTestBaseAccountResponse, + CredentialGetOptionalParams, + CredentialGetResponse, + CredentialListByTestBaseAccountNextResponse +} from "../models"; + +/// +/** Class containing Credential operations. */ +export class CredentialImpl implements Credential { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class Credential class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the Credentials under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: CredentialListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTestBaseAccountPagingAll( + resourceGroupName, + testBaseAccountName, + 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.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listByTestBaseAccountPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: CredentialListByTestBaseAccountOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CredentialListByTestBaseAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTestBaseAccount( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTestBaseAccountNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByTestBaseAccountPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: CredentialListByTestBaseAccountOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all the Credentials under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: CredentialListByTestBaseAccountOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listByTestBaseAccountOperationSpec + ); + } + + /** + * Gets a test base credential Resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param credentialName The credential resource name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + credentialName: string, + options?: CredentialGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, credentialName, options }, + getOperationSpec + ); + } + + /** + * ListByTestBaseAccountNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the ListByTestBaseAccount method. + * @param options The options parameters. + */ + private _listByTestBaseAccountNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: CredentialListByTestBaseAccountNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listByTestBaseAccountNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByTestBaseAccountOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/credentials", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CredentialListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/credentials/{credentialName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CredentialResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.credentialName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByTestBaseAccountNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CredentialListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/credentials.ts b/sdk/testbase/arm-testbase/src/operations/credentials.ts new file mode 100644 index 000000000000..b3be454ea97c --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/credentials.ts @@ -0,0 +1,185 @@ +/* + * 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 { Credentials } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + CredentialResource, + CredentialsCreateOptionalParams, + CredentialsCreateResponse, + CredentialsUpdateOptionalParams, + CredentialsUpdateResponse, + CredentialsDeleteOptionalParams +} from "../models"; + +/** Class containing Credentials operations. */ +export class CredentialsImpl implements Credentials { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class Credentials class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Creates or replaces a Test Base Credential. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param credentialName The credential resource name. + * @param parameters Parameters supplied to create a Test Base Credential. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + testBaseAccountName: string, + credentialName: string, + parameters: CredentialResource, + options?: CredentialsCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + credentialName, + parameters, + options + }, + createOperationSpec + ); + } + + /** + * Updates an existing test base credential. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param credentialName The credential resource name. + * @param parameters Parameters supplied to create a test base credential. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + testBaseAccountName: string, + credentialName: string, + parameters: CredentialResource, + options?: CredentialsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + credentialName, + parameters, + options + }, + updateOperationSpec + ); + } + + /** + * Deletes an existing test base credential. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param credentialName The credential resource name. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + credentialName: string, + options?: CredentialsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, credentialName, options }, + deleteOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/credentials/{credentialName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CredentialResource + }, + 201: { + bodyMapper: Mappers.CredentialResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters19, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.credentialName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/credentials/{credentialName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.CredentialResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters19, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.credentialName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/credentials/{credentialName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.credentialName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/customImages.ts b/sdk/testbase/arm-testbase/src/operations/customImages.ts new file mode 100644 index 000000000000..a6e7b6c77d48 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/customImages.ts @@ -0,0 +1,577 @@ +/* + * 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"; +import { CustomImages } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + CustomImageResource, + CustomImagesListByTestBaseAccountNextOptionalParams, + CustomImagesListByTestBaseAccountOptionalParams, + CustomImagesListByTestBaseAccountResponse, + CustomImagesCreateOptionalParams, + CustomImagesCreateResponse, + CustomImagesDeleteOptionalParams, + CustomImagesDeleteResponse, + CustomImagesGetOptionalParams, + CustomImagesGetResponse, + ImageNameCheckAvailabilityParameters, + CustomImagesCheckImageNameAvailabilityOptionalParams, + CustomImagesCheckImageNameAvailabilityResponse, + CustomImagesListByTestBaseAccountNextResponse +} from "../models"; + +/// +/** Class containing CustomImages operations. */ +export class CustomImagesImpl implements CustomImages { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class CustomImages class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the custom images under a test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: CustomImagesListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTestBaseAccountPagingAll( + resourceGroupName, + testBaseAccountName, + 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.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listByTestBaseAccountPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: CustomImagesListByTestBaseAccountOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CustomImagesListByTestBaseAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTestBaseAccount( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTestBaseAccountNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByTestBaseAccountPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: CustomImagesListByTestBaseAccountOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all the custom images under a test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: CustomImagesListByTestBaseAccountOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listByTestBaseAccountOperationSpec + ); + } + + /** + * Creates a test base custom image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customImageName The resource name of the test base custom image. + * @param parameters Parameters supplied to create a test base custom image. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + testBaseAccountName: string, + customImageName: string, + parameters: CustomImageResource, + options?: CustomImagesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + CustomImagesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + testBaseAccountName, + customImageName, + parameters, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + CustomImagesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates a test base custom image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customImageName The resource name of the test base custom image. + * @param parameters Parameters supplied to create a test base custom image. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + customImageName: string, + parameters: CustomImageResource, + options?: CustomImagesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + testBaseAccountName, + customImageName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a test base custom image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customImageName The resource name of the test base custom image. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + testBaseAccountName: string, + customImageName: string, + options?: CustomImagesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + CustomImagesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + testBaseAccountName, + customImageName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + CustomImagesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a test base custom image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customImageName The resource name of the test base custom image. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + testBaseAccountName: string, + customImageName: string, + options?: CustomImagesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + testBaseAccountName, + customImageName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets a test base custom image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customImageName The resource name of the test base custom image. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + customImageName: string, + options?: CustomImagesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, customImageName, options }, + getOperationSpec + ); + } + + /** + * Checks that the test vase custom image generated from VHD resource has valid and unique definition + * and version, return architecture and OS state of potential existing image definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to the test base custom image CheckAvailability operation. + * @param options The options parameters. + */ + checkImageNameAvailability( + resourceGroupName: string, + testBaseAccountName: string, + parameters: ImageNameCheckAvailabilityParameters, + options?: CustomImagesCheckImageNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, parameters, options }, + checkImageNameAvailabilityOperationSpec + ); + } + + /** + * ListByTestBaseAccountNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the ListByTestBaseAccount method. + * @param options The options parameters. + */ + private _listByTestBaseAccountNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: CustomImagesListByTestBaseAccountNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listByTestBaseAccountNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByTestBaseAccountOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/customImages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CustomImageListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/customImages/{customImageName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CustomImageResource + }, + 201: { + bodyMapper: Mappers.CustomImageResource + }, + 202: { + bodyMapper: Mappers.CustomImageResource + }, + 204: { + bodyMapper: Mappers.CustomImageResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.customImageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/customImages/{customImageName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.CustomImagesDeleteHeaders + }, + 201: { + headersMapper: Mappers.CustomImagesDeleteHeaders + }, + 202: { + headersMapper: Mappers.CustomImagesDeleteHeaders + }, + 204: { + headersMapper: Mappers.CustomImagesDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.customImageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/customImages/{customImageName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CustomImageResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.customImageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const checkImageNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/checkImageNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.VerificationResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByTestBaseAccountNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CustomImageListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/customerEvents.ts b/sdk/testbase/arm-testbase/src/operations/customerEvents.ts new file mode 100644 index 000000000000..a9f8be5aca55 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/customerEvents.ts @@ -0,0 +1,513 @@ +/* + * 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"; +import { CustomerEvents } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + CustomerEventResource, + CustomerEventsListByTestBaseAccountNextOptionalParams, + CustomerEventsListByTestBaseAccountOptionalParams, + CustomerEventsListByTestBaseAccountResponse, + CustomerEventsCreateOptionalParams, + CustomerEventsCreateResponse, + CustomerEventsDeleteOptionalParams, + CustomerEventsGetOptionalParams, + CustomerEventsGetResponse, + CustomerEventsListByTestBaseAccountNextResponse +} from "../models"; + +/// +/** Class containing CustomerEvents operations. */ +export class CustomerEventsImpl implements CustomerEvents { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class CustomerEvents class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all notification events subscribed under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: CustomerEventsListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTestBaseAccountPagingAll( + resourceGroupName, + testBaseAccountName, + 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.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listByTestBaseAccountPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: CustomerEventsListByTestBaseAccountOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CustomerEventsListByTestBaseAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTestBaseAccount( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTestBaseAccountNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByTestBaseAccountPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: CustomerEventsListByTestBaseAccountOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all notification events subscribed under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: CustomerEventsListByTestBaseAccountOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listByTestBaseAccountOperationSpec + ); + } + + /** + * Create or replace a Test Base Customer Event. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customerEventName The resource name of the Test Base Customer event. + * @param parameters Parameters supplied to create a Test Base CustomerEvent. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + testBaseAccountName: string, + customerEventName: string, + parameters: CustomerEventResource, + options?: CustomerEventsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + CustomerEventsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + testBaseAccountName, + customerEventName, + parameters, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + CustomerEventsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or replace a Test Base Customer Event. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customerEventName The resource name of the Test Base Customer event. + * @param parameters Parameters supplied to create a Test Base CustomerEvent. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + customerEventName: string, + parameters: CustomerEventResource, + options?: CustomerEventsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + testBaseAccountName, + customerEventName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a Test Base Customer Event. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customerEventName The resource name of the Test Base Customer event. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + testBaseAccountName: string, + customerEventName: string, + options?: CustomerEventsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + testBaseAccountName, + customerEventName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a Test Base Customer Event. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customerEventName The resource name of the Test Base Customer event. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + testBaseAccountName: string, + customerEventName: string, + options?: CustomerEventsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + testBaseAccountName, + customerEventName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets a Test Base CustomerEvent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customerEventName The resource name of the Test Base Customer event. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + customerEventName: string, + options?: CustomerEventsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, customerEventName, options }, + getOperationSpec + ); + } + + /** + * ListByTestBaseAccountNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the ListByTestBaseAccount method. + * @param options The options parameters. + */ + private _listByTestBaseAccountNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: CustomerEventsListByTestBaseAccountNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listByTestBaseAccountNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByTestBaseAccountOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/customerEvents", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CustomerEventListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/customerEvents/{customerEventName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CustomerEventResource + }, + 201: { + bodyMapper: Mappers.CustomerEventResource + }, + 202: { + bodyMapper: Mappers.CustomerEventResource + }, + 204: { + bodyMapper: Mappers.CustomerEventResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters18, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.customerEventName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/customerEvents/{customerEventName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.customerEventName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/customerEvents/{customerEventName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CustomerEventResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.customerEventName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByTestBaseAccountNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CustomerEventListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/draftPackages.ts b/sdk/testbase/arm-testbase/src/operations/draftPackages.ts new file mode 100644 index 000000000000..40ca42c5e35d --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/draftPackages.ts @@ -0,0 +1,886 @@ +/* + * 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"; +import { DraftPackages } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + DraftPackageResource, + DraftPackagesListByTestBaseAccountNextOptionalParams, + DraftPackagesListByTestBaseAccountOptionalParams, + DraftPackagesListByTestBaseAccountResponse, + DraftPackagesCreateOptionalParams, + DraftPackagesCreateResponse, + DraftPackageUpdateParameters, + DraftPackagesUpdateOptionalParams, + DraftPackagesUpdateResponse, + DraftPackagesDeleteOptionalParams, + DraftPackagesGetOptionalParams, + DraftPackagesGetResponse, + DraftPackagesGetPathOptionalParams, + DraftPackagesGetPathResponse, + CopyFromPackageOperationParameters, + DraftPackagesCopyFromPackageOptionalParams, + DraftPackagesCopyFromPackageResponse, + ExtractFileOperationParameters, + DraftPackagesExtractFileOptionalParams, + DraftPackagesExtractFileResponse, + GenerateOperationParameters, + DraftPackagesGenerateFoldersAndScriptsOptionalParams, + DraftPackagesGenerateFoldersAndScriptsResponse, + DraftPackagesListByTestBaseAccountNextResponse +} from "../models"; + +/// +/** Class containing DraftPackages operations. */ +export class DraftPackagesImpl implements DraftPackages { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class DraftPackages class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the draft packages under a test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: DraftPackagesListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTestBaseAccountPagingAll( + resourceGroupName, + testBaseAccountName, + 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.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listByTestBaseAccountPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: DraftPackagesListByTestBaseAccountOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DraftPackagesListByTestBaseAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTestBaseAccount( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTestBaseAccountNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByTestBaseAccountPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: DraftPackagesListByTestBaseAccountOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all the draft packages under a test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: DraftPackagesListByTestBaseAccountOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listByTestBaseAccountOperationSpec + ); + } + + /** + * Creates or replaces a Test Base Draft Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to create a Test Base Draft Package. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: DraftPackageResource, + options?: DraftPackagesCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + draftPackageName, + parameters, + options + }, + createOperationSpec + ); + } + + /** + * Updates an existing Test Base Draft Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to update a Test Base Draft Package. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: DraftPackageUpdateParameters, + options?: DraftPackagesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + draftPackageName, + parameters, + options + }, + updateOperationSpec + ); + } + + /** + * Deletes a Test Base Draft Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + options?: DraftPackagesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, draftPackageName, options }, + deleteOperationSpec + ); + } + + /** + * Gets a Test Base Draft Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + options?: DraftPackagesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, draftPackageName, options }, + getOperationSpec + ); + } + + /** + * Gets draft package path and temp working path with SAS. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param options The options parameters. + */ + getPath( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + options?: DraftPackagesGetPathOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, draftPackageName, options }, + getPathOperationSpec + ); + } + + /** + * Copy package file and metadata from a package to this draft package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package CopyFromPackage operation. + * @param options The options parameters. + */ + async beginCopyFromPackage( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: CopyFromPackageOperationParameters, + options?: DraftPackagesCopyFromPackageOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + DraftPackagesCopyFromPackageResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + testBaseAccountName, + draftPackageName, + parameters, + options + }, + spec: copyFromPackageOperationSpec + }); + const poller = await createHttpPoller< + DraftPackagesCopyFromPackageResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Copy package file and metadata from a package to this draft package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package CopyFromPackage operation. + * @param options The options parameters. + */ + async beginCopyFromPackageAndWait( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: CopyFromPackageOperationParameters, + options?: DraftPackagesCopyFromPackageOptionalParams + ): Promise { + const poller = await this.beginCopyFromPackage( + resourceGroupName, + testBaseAccountName, + draftPackageName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Performs extracting file operation for a Test Base Draft Package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package ExtractFile operation. + * @param options The options parameters. + */ + async beginExtractFile( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: ExtractFileOperationParameters, + options?: DraftPackagesExtractFileOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + DraftPackagesExtractFileResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + testBaseAccountName, + draftPackageName, + parameters, + options + }, + spec: extractFileOperationSpec + }); + const poller = await createHttpPoller< + DraftPackagesExtractFileResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Performs extracting file operation for a Test Base Draft Package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package ExtractFile operation. + * @param options The options parameters. + */ + async beginExtractFileAndWait( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: ExtractFileOperationParameters, + options?: DraftPackagesExtractFileOptionalParams + ): Promise { + const poller = await this.beginExtractFile( + resourceGroupName, + testBaseAccountName, + draftPackageName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Generates folders and scripts + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package Generate operation. + * @param options The options parameters. + */ + async beginGenerateFoldersAndScripts( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: GenerateOperationParameters, + options?: DraftPackagesGenerateFoldersAndScriptsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + DraftPackagesGenerateFoldersAndScriptsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + testBaseAccountName, + draftPackageName, + parameters, + options + }, + spec: generateFoldersAndScriptsOperationSpec + }); + const poller = await createHttpPoller< + DraftPackagesGenerateFoldersAndScriptsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Generates folders and scripts + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package Generate operation. + * @param options The options parameters. + */ + async beginGenerateFoldersAndScriptsAndWait( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: GenerateOperationParameters, + options?: DraftPackagesGenerateFoldersAndScriptsOptionalParams + ): Promise { + const poller = await this.beginGenerateFoldersAndScripts( + resourceGroupName, + testBaseAccountName, + draftPackageName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByTestBaseAccountNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the ListByTestBaseAccount method. + * @param options The options parameters. + */ + private _listByTestBaseAccountNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: DraftPackagesListByTestBaseAccountNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listByTestBaseAccountNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByTestBaseAccountOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/draftPackages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DraftPackageListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.packageName, + Parameters.editPackage + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/draftPackages/{draftPackageName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DraftPackageResource + }, + 201: { + bodyMapper: Mappers.DraftPackageResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.draftPackageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/draftPackages/{draftPackageName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DraftPackageResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.draftPackageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/draftPackages/{draftPackageName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.draftPackageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/draftPackages/{draftPackageName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DraftPackageResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.draftPackageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getPathOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/draftPackages/{draftPackageName}/getPath", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DraftPackageGetPathResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.draftPackageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const copyFromPackageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/draftPackages/{draftPackageName}/copyFromPackage", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.DraftPackagesCopyFromPackageHeaders + }, + 201: { + headersMapper: Mappers.DraftPackagesCopyFromPackageHeaders + }, + 202: { + headersMapper: Mappers.DraftPackagesCopyFromPackageHeaders + }, + 204: { + headersMapper: Mappers.DraftPackagesCopyFromPackageHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.draftPackageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const extractFileOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/draftPackages/{draftPackageName}/extractFile", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.DraftPackagesExtractFileHeaders + }, + 201: { + headersMapper: Mappers.DraftPackagesExtractFileHeaders + }, + 202: { + headersMapper: Mappers.DraftPackagesExtractFileHeaders + }, + 204: { + headersMapper: Mappers.DraftPackagesExtractFileHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.draftPackageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const generateFoldersAndScriptsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/draftPackages/{draftPackageName}/generateFoldersAndScripts", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.DraftPackagesGenerateFoldersAndScriptsHeaders + }, + 201: { + headersMapper: Mappers.DraftPackagesGenerateFoldersAndScriptsHeaders + }, + 202: { + headersMapper: Mappers.DraftPackagesGenerateFoldersAndScriptsHeaders + }, + 204: { + headersMapper: Mappers.DraftPackagesGenerateFoldersAndScriptsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters8, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.draftPackageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByTestBaseAccountNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DraftPackageListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/emailEvents.ts b/sdk/testbase/arm-testbase/src/operations/emailEvents.ts new file mode 100644 index 000000000000..12a5d05112bf --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/emailEvents.ts @@ -0,0 +1,251 @@ +/* + * 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"; +import { EmailEvents } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + EmailEventResource, + EmailEventsListNextOptionalParams, + EmailEventsListOptionalParams, + EmailEventsListResponse, + EmailEventsGetOptionalParams, + EmailEventsGetResponse, + EmailEventsListNextResponse +} from "../models"; + +/// +/** Class containing EmailEvents operations. */ +export class EmailEventsImpl implements EmailEvents { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class EmailEvents class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the email events of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + options?: EmailEventsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + 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, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: EmailEventsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: EmailEventsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: EmailEventsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all the email events of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + options?: EmailEventsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listOperationSpec + ); + } + + /** + * Gets a email event of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param emailEventResourceName The resource name of an email event. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + emailEventResourceName: string, + options?: EmailEventsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + emailEventResourceName, + options + }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: EmailEventsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/emailEvents", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailEventListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/emailEvents/{emailEventResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailEventResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.emailEventResourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EmailEventListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/favoriteProcesses.ts b/sdk/testbase/arm-testbase/src/operations/favoriteProcesses.ts new file mode 100644 index 000000000000..69ebdc2ce113 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/favoriteProcesses.ts @@ -0,0 +1,391 @@ +/* + * 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"; +import { FavoriteProcesses } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + FavoriteProcessResource, + FavoriteProcessesListNextOptionalParams, + FavoriteProcessesListOptionalParams, + FavoriteProcessesListResponse, + FavoriteProcessesCreateOptionalParams, + FavoriteProcessesCreateResponse, + FavoriteProcessesDeleteOptionalParams, + FavoriteProcessesGetOptionalParams, + FavoriteProcessesGetResponse, + FavoriteProcessesListNextResponse +} from "../models"; + +/// +/** Class containing FavoriteProcesses operations. */ +export class FavoriteProcessesImpl implements FavoriteProcesses { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class FavoriteProcesses class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists the favorite processes for a specific package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: FavoriteProcessesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + packageName, + 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, + testBaseAccountName, + packageName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: FavoriteProcessesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FavoriteProcessesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + packageName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + packageName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: FavoriteProcessesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + packageName, + options + )) { + yield* page; + } + } + + /** + * Lists the favorite processes for a specific package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: FavoriteProcessesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, packageName, options }, + listOperationSpec + ); + } + + /** + * Create or replace a favorite process for a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param favoriteProcessResourceName The resource name of a favorite process in a package. If the + * process name contains characters that are not allowed in Azure Resource Name, we use + * 'actualProcessName' in request body to submit the name. + * @param parameters Parameters supplied to create a favorite process in a package. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + favoriteProcessResourceName: string, + parameters: FavoriteProcessResource, + options?: FavoriteProcessesCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + favoriteProcessResourceName, + parameters, + options + }, + createOperationSpec + ); + } + + /** + * Deletes a favorite process for a specific package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param favoriteProcessResourceName The resource name of a favorite process in a package. If the + * process name contains characters that are not allowed in Azure Resource Name, we use + * 'actualProcessName' in request body to submit the name. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + favoriteProcessResourceName: string, + options?: FavoriteProcessesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + favoriteProcessResourceName, + options + }, + deleteOperationSpec + ); + } + + /** + * Gets a favorite process for a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param favoriteProcessResourceName The resource name of a favorite process in a package. If the + * process name contains characters that are not allowed in Azure Resource Name, we use + * 'actualProcessName' in request body to submit the name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + favoriteProcessResourceName: string, + options?: FavoriteProcessesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + favoriteProcessResourceName, + options + }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + nextLink: string, + options?: FavoriteProcessesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + nextLink, + options + }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/favoriteProcesses", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FavoriteProcessListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/favoriteProcesses/{favoriteProcessResourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.FavoriteProcessResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters17, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1, + Parameters.favoriteProcessResourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/favoriteProcesses/{favoriteProcessResourceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1, + Parameters.favoriteProcessResourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/favoriteProcesses/{favoriteProcessResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FavoriteProcessResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1, + Parameters.favoriteProcessResourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FavoriteProcessListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/featureUpdateSupportedOses.ts b/sdk/testbase/arm-testbase/src/operations/featureUpdateSupportedOses.ts new file mode 100644 index 000000000000..9ab9f2036d48 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/featureUpdateSupportedOses.ts @@ -0,0 +1,203 @@ +/* + * 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"; +import { FeatureUpdateSupportedOses } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + FeatureUpdateSupportedOsesResource, + FeatureUpdateSupportedOsesListNextOptionalParams, + FeatureUpdateSupportedOsesListOptionalParams, + FeatureUpdateSupportedOsesListResponse, + FeatureUpdateSupportedOsesListNextResponse +} from "../models"; + +/// +/** Class containing FeatureUpdateSupportedOses operations. */ +export class FeatureUpdateSupportedOsesImpl + implements FeatureUpdateSupportedOses { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class FeatureUpdateSupportedOses class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the available OSs to run a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FeatureUpdateSupportedOsesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + 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, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: FeatureUpdateSupportedOsesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FeatureUpdateSupportedOsesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: FeatureUpdateSupportedOsesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all the available OSs to run a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FeatureUpdateSupportedOsesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: FeatureUpdateSupportedOsesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/featureUpdateSupportedOses", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FeatureUpdateSupportedOsesResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FeatureUpdateSupportedOsesResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/firstPartyApps.ts b/sdk/testbase/arm-testbase/src/operations/firstPartyApps.ts new file mode 100644 index 000000000000..27446b303dad --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/firstPartyApps.ts @@ -0,0 +1,251 @@ +/* + * 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"; +import { FirstPartyApps } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + FirstPartyAppResource, + FirstPartyAppsListNextOptionalParams, + FirstPartyAppsListOptionalParams, + FirstPartyAppsListResponse, + FirstPartyAppsGetOptionalParams, + FirstPartyAppsGetResponse, + FirstPartyAppsListNextResponse +} from "../models"; + +/// +/** Class containing FirstPartyApps operations. */ +export class FirstPartyAppsImpl implements FirstPartyApps { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class FirstPartyApps class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all first party applications currently available for test runs under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FirstPartyAppsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + 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, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: FirstPartyAppsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FirstPartyAppsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: FirstPartyAppsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all first party applications currently available for test runs under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FirstPartyAppsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listOperationSpec + ); + } + + /** + * Gets a first party application to prepare a test run for a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param firstPartyAppResourceName The resource name of a first party application. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + firstPartyAppResourceName: string, + options?: FirstPartyAppsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + firstPartyAppResourceName, + options + }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: FirstPartyAppsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/firstPartyApps", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FirstPartyAppListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/firstPartyApps/{firstPartyAppResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FirstPartyAppResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.firstPartyAppResourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FirstPartyAppListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/flightingRings.ts b/sdk/testbase/arm-testbase/src/operations/flightingRings.ts new file mode 100644 index 000000000000..ec8280682fb0 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/flightingRings.ts @@ -0,0 +1,251 @@ +/* + * 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"; +import { FlightingRings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + FlightingRingResource, + FlightingRingsListNextOptionalParams, + FlightingRingsListOptionalParams, + FlightingRingsListResponse, + FlightingRingsGetOptionalParams, + FlightingRingsGetResponse, + FlightingRingsListNextResponse +} from "../models"; + +/// +/** Class containing FlightingRings operations. */ +export class FlightingRingsImpl implements FlightingRings { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class FlightingRings class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the flighting rings of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FlightingRingsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + 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, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: FlightingRingsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FlightingRingsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: FlightingRingsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all the flighting rings of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FlightingRingsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listOperationSpec + ); + } + + /** + * Gets a flighting ring of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param flightingRingResourceName The resource name of a flighting ring. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + flightingRingResourceName: string, + options?: FlightingRingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + flightingRingResourceName, + options + }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: FlightingRingsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/flightingRings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FlightingRingListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/flightingRings/{flightingRingResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FlightingRingResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.flightingRingResourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FlightingRingListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/freeHourBalances.ts b/sdk/testbase/arm-testbase/src/operations/freeHourBalances.ts new file mode 100644 index 000000000000..1ab34c5a7944 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/freeHourBalances.ts @@ -0,0 +1,247 @@ +/* + * 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"; +import { FreeHourBalances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + FreeHourBalanceResource, + FreeHourBalancesListNextOptionalParams, + FreeHourBalancesListOptionalParams, + FreeHourBalancesListResponse, + FreeHourBalanceName, + FreeHourBalancesGetOptionalParams, + FreeHourBalancesGetResponse, + FreeHourBalancesListNextResponse +} from "../models"; + +/// +/** Class containing FreeHourBalances operations. */ +export class FreeHourBalancesImpl implements FreeHourBalances { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class FreeHourBalances class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Return the Test Base free hour balances list. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FreeHourBalancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + 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, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: FreeHourBalancesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: FreeHourBalancesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: FreeHourBalancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Return the Test Base free hour balances list. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FreeHourBalancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listOperationSpec + ); + } + + /** + * Return the Test Base free hour balance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param freeHourBalanceName The name of the free hour balance of a Test Base Account. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + freeHourBalanceName: FreeHourBalanceName, + options?: FreeHourBalancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, freeHourBalanceName, options }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: FreeHourBalancesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/freeHourBalances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FreeHourBalancesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/freeHourBalances/{freeHourBalanceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FreeHourBalanceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.freeHourBalanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FreeHourBalancesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/galleryAppSkus.ts b/sdk/testbase/arm-testbase/src/operations/galleryAppSkus.ts new file mode 100644 index 000000000000..1af1f604ce6a --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/galleryAppSkus.ts @@ -0,0 +1,276 @@ +/* + * 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"; +import { GalleryAppSkus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + GalleryAppSkuResource, + GalleryAppSkusListNextOptionalParams, + GalleryAppSkusListOptionalParams, + GalleryAppSkusListResponse, + GalleryAppSkusGetOptionalParams, + GalleryAppSkusGetResponse, + GalleryAppSkusListNextResponse +} from "../models"; + +/// +/** Class containing GalleryAppSkus operations. */ +export class GalleryAppSkusImpl implements GalleryAppSkus { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class GalleryAppSkus class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all SKUs of a gallery application currently available for test runs under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param galleryAppName The resource name of a gallery application. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + galleryAppName: string, + options?: GalleryAppSkusListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + galleryAppName, + 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, + testBaseAccountName, + galleryAppName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + galleryAppName: string, + options?: GalleryAppSkusListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GalleryAppSkusListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + galleryAppName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + galleryAppName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + galleryAppName: string, + options?: GalleryAppSkusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + galleryAppName, + options + )) { + yield* page; + } + } + + /** + * Lists all SKUs of a gallery application currently available for test runs under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param galleryAppName The resource name of a gallery application. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + galleryAppName: string, + options?: GalleryAppSkusListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, galleryAppName, options }, + listOperationSpec + ); + } + + /** + * Gets a gallery application SKU to prepare a test run for a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param galleryAppName The resource name of a gallery application. + * @param galleryAppSkuName The resource name of a gallery application SKU. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + galleryAppName: string, + galleryAppSkuName: string, + options?: GalleryAppSkusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + galleryAppName, + galleryAppSkuName, + options + }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param galleryAppName The resource name of a gallery application. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + galleryAppName: string, + nextLink: string, + options?: GalleryAppSkusListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + galleryAppName, + nextLink, + options + }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/galleryApps/{galleryAppName}/galleryAppSkus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryAppSkuListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.galleryAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/galleryApps/{galleryAppName}/galleryAppSkus/{galleryAppSkuName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryAppSkuResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.galleryAppName, + Parameters.galleryAppSkuName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryAppSkuListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink, + Parameters.galleryAppName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/galleryApps.ts b/sdk/testbase/arm-testbase/src/operations/galleryApps.ts new file mode 100644 index 000000000000..8b4bd3c365ce --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/galleryApps.ts @@ -0,0 +1,254 @@ +/* + * 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"; +import { GalleryApps } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + GalleryAppResource, + GalleryAppsListNextOptionalParams, + GalleryAppsListOptionalParams, + GalleryAppsListResponse, + GalleryAppsGetOptionalParams, + GalleryAppsGetResponse, + GalleryAppsListNextResponse +} from "../models"; + +/// +/** Class containing GalleryApps operations. */ +export class GalleryAppsImpl implements GalleryApps { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class GalleryApps class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all gallery applications currently available for test runs under a Test Base Account which + * matches user query. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + options?: GalleryAppsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + 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, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: GalleryAppsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GalleryAppsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: GalleryAppsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all gallery applications currently available for test runs under a Test Base Account which + * matches user query. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + options?: GalleryAppsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listOperationSpec + ); + } + + /** + * Gets a gallery application to prepare a test run for a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param galleryAppName The resource name of a gallery application. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + galleryAppName: string, + options?: GalleryAppsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, galleryAppName, options }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: GalleryAppsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/galleryApps", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryAppListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.top, + Parameters.keyword, + Parameters.applicationType, + Parameters.orderBy + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/galleryApps/{galleryAppName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryAppResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.galleryAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GalleryAppListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/imageDefinitions.ts b/sdk/testbase/arm-testbase/src/operations/imageDefinitions.ts new file mode 100644 index 000000000000..22fd2a6284e3 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/imageDefinitions.ts @@ -0,0 +1,348 @@ +/* + * 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"; +import { ImageDefinitions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + ImageDefinitionResource, + ImageDefinitionsListByTestBaseAccountNextOptionalParams, + ImageDefinitionsListByTestBaseAccountOptionalParams, + ImageDefinitionsListByTestBaseAccountResponse, + ImageDefinitionsCreateOptionalParams, + ImageDefinitionsCreateResponse, + ImageDefinitionsGetOptionalParams, + ImageDefinitionsGetResponse, + ImageDefinitionsDeleteOptionalParams, + ImageDefinitionsListByTestBaseAccountNextResponse +} from "../models"; + +/// +/** Class containing ImageDefinitions operations. */ +export class ImageDefinitionsImpl implements ImageDefinitions { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class ImageDefinitions class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * List all image definition properties created by test base custom images which are derived from 'VHD' + * source. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: ImageDefinitionsListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTestBaseAccountPagingAll( + resourceGroupName, + testBaseAccountName, + 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.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listByTestBaseAccountPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: ImageDefinitionsListByTestBaseAccountOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ImageDefinitionsListByTestBaseAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTestBaseAccount( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTestBaseAccountNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByTestBaseAccountPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: ImageDefinitionsListByTestBaseAccountOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * List all image definition properties created by test base custom images which are derived from 'VHD' + * source. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: ImageDefinitionsListByTestBaseAccountOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listByTestBaseAccountOperationSpec + ); + } + + /** + * Create image definition for test base custom images which are derived from 'VHD' source. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param imageDefinitionName The resource name of the test base image definition. + * @param parameters Parameters supplied to create a test base image definition. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + testBaseAccountName: string, + imageDefinitionName: string, + parameters: ImageDefinitionResource, + options?: ImageDefinitionsCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + imageDefinitionName, + parameters, + options + }, + createOperationSpec + ); + } + + /** + * Get image properties under the image definition name created by test base custom image which derived + * from 'VHD' source. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param imageDefinitionName The resource name of the test base image definition. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + imageDefinitionName: string, + options?: ImageDefinitionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, imageDefinitionName, options }, + getOperationSpec + ); + } + + /** + * Delete a test base image definition resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param imageDefinitionName The resource name of the test base image definition. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + imageDefinitionName: string, + options?: ImageDefinitionsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, imageDefinitionName, options }, + deleteOperationSpec + ); + } + + /** + * ListByTestBaseAccountNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the ListByTestBaseAccount method. + * @param options The options parameters. + */ + private _listByTestBaseAccountNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: ImageDefinitionsListByTestBaseAccountNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listByTestBaseAccountNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByTestBaseAccountOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/imageDefinitions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ImageDefinitionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/imageDefinitions/{imageDefinitionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ImageDefinitionResource + }, + 201: { + bodyMapper: Mappers.ImageDefinitionResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.imageDefinitionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/imageDefinitions/{imageDefinitionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ImageDefinitionResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.imageDefinitionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/imageDefinitions/{imageDefinitionName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.imageDefinitionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByTestBaseAccountNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ImageDefinitionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/index.ts b/sdk/testbase/arm-testbase/src/operations/index.ts new file mode 100644 index 000000000000..6349a394f038 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/index.ts @@ -0,0 +1,39 @@ +/* + * 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 "./actionRequestsOperations"; +export * from "./chatSessions"; +export * from "./chatSession"; +export * from "./customImages"; +export * from "./imageDefinitions"; +export * from "./vHDs"; +export * from "./draftPackages"; +export * from "./freeHourBalances"; +export * from "./skus"; +export * from "./testBaseAccounts"; +export * from "./usage"; +export * from "./availableOS"; +export * from "./featureUpdateSupportedOses"; +export * from "./flightingRings"; +export * from "./firstPartyApps"; +export * from "./galleryApps"; +export * from "./galleryAppSkus"; +export * from "./testTypes"; +export * from "./packages"; +export * from "./testSummaries"; +export * from "./testResults"; +export * from "./oSUpdates"; +export * from "./favoriteProcesses"; +export * from "./analysisResults"; +export * from "./emailEvents"; +export * from "./customerEvents"; +export * from "./operations"; +export * from "./billingHubService"; +export * from "./availableInplaceUpgradeOS"; +export * from "./credential"; +export * from "./credentials"; diff --git a/sdk/testbase/arm-testbase/src/operations/oSUpdates.ts b/sdk/testbase/arm-testbase/src/operations/oSUpdates.ts new file mode 100644 index 000000000000..3f8f149e89df --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/oSUpdates.ts @@ -0,0 +1,293 @@ +/* + * 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"; +import { OSUpdates } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + OSUpdateResource, + OSUpdatesListNextOptionalParams, + OsUpdateType, + OSUpdatesListOptionalParams, + OSUpdatesListResponse, + OSUpdatesGetOptionalParams, + OSUpdatesGetResponse, + OSUpdatesListNextResponse +} from "../models"; + +/// +/** Class containing OSUpdates operations. */ +export class OSUpdatesImpl implements OSUpdates { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class OSUpdates class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists the OS Updates in which the package were tested before. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateType: OsUpdateType, + options?: OSUpdatesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + packageName, + osUpdateType, + 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, + testBaseAccountName, + packageName, + osUpdateType, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateType: OsUpdateType, + options?: OSUpdatesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OSUpdatesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + packageName, + osUpdateType, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + packageName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateType: OsUpdateType, + options?: OSUpdatesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + packageName, + osUpdateType, + options + )) { + yield* page; + } + } + + /** + * Lists the OS Updates in which the package were tested before. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateType: OsUpdateType, + options?: OSUpdatesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + osUpdateType, + options + }, + listOperationSpec + ); + } + + /** + * Gets an OS Update by name in which the package was tested before. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param osUpdateResourceName The resource name of an OS Update. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateResourceName: string, + options?: OSUpdatesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + osUpdateResourceName, + options + }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + nextLink: string, + options?: OSUpdatesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + nextLink, + options + }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/osUpdates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OSUpdateListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.osUpdateType], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/osUpdates/{osUpdateResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OSUpdateResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1, + Parameters.osUpdateResourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OSUpdateListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/operations.ts b/sdk/testbase/arm-testbase/src/operations/operations.ts new file mode 100644 index 000000000000..f788fbacf775 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/operations.ts @@ -0,0 +1,149 @@ +/* + * 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"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all of the available REST API operations of the Microsoft.TestBase 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; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists all of the available REST API operations of the Microsoft.TestBase provider. + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.TestBase/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/packages.ts b/sdk/testbase/arm-testbase/src/operations/packages.ts new file mode 100644 index 000000000000..63ff986a49c6 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/packages.ts @@ -0,0 +1,857 @@ +/* + * 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"; +import { Packages } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + PackageResource, + PackagesListByTestBaseAccountNextOptionalParams, + PackagesListByTestBaseAccountOptionalParams, + PackagesListByTestBaseAccountResponse, + PackagesCreateOptionalParams, + PackagesCreateResponse, + PackageUpdateParameters, + PackagesUpdateOptionalParams, + PackagesUpdateResponse, + PackagesDeleteOptionalParams, + PackagesGetOptionalParams, + PackagesGetResponse, + PackagesHardDeleteOptionalParams, + PackagesGetDownloadURLOptionalParams, + PackagesGetDownloadURLResponse, + PackagesRunTestOptionalParams, + PackagesRunTestResponse, + PackagesListByTestBaseAccountNextResponse +} from "../models"; + +/// +/** Class containing Packages operations. */ +export class PackagesImpl implements Packages { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class Packages class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the packages under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: PackagesListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTestBaseAccountPagingAll( + resourceGroupName, + testBaseAccountName, + 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.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listByTestBaseAccountPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: PackagesListByTestBaseAccountOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PackagesListByTestBaseAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTestBaseAccount( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTestBaseAccountNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByTestBaseAccountPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: PackagesListByTestBaseAccountOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all the packages under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: PackagesListByTestBaseAccountOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listByTestBaseAccountOperationSpec + ); + } + + /** + * Create or replace (overwrite/recreate, with potential downtime) a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param parameters Parameters supplied to create a Test Base Package. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + parameters: PackageResource, + options?: PackagesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PackagesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + testBaseAccountName, + packageName, + parameters, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + PackagesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or replace (overwrite/recreate, with potential downtime) a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param parameters Parameters supplied to create a Test Base Package. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + parameters: PackageResource, + options?: PackagesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + testBaseAccountName, + packageName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update an existing Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param parameters Parameters supplied to update a Test Base Package. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + parameters: PackageUpdateParameters, + options?: PackagesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PackagesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + testBaseAccountName, + packageName, + parameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + PackagesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Update an existing Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param parameters Parameters supplied to update a Test Base Package. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + parameters: PackageUpdateParameters, + options?: PackagesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + testBaseAccountName, + packageName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, testBaseAccountName, packageName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + testBaseAccountName, + packageName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, packageName, options }, + getOperationSpec + ); + } + + /** + * Hard Delete a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + async beginHardDelete( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesHardDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, testBaseAccountName, packageName, options }, + spec: hardDeleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Hard Delete a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + async beginHardDeleteAndWait( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesHardDeleteOptionalParams + ): Promise { + const poller = await this.beginHardDelete( + resourceGroupName, + testBaseAccountName, + packageName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the download URL of a package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + getDownloadURL( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesGetDownloadURLOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, packageName, options }, + getDownloadURLOperationSpec + ); + } + + /** + * Trigger a test run on the package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + runTest( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesRunTestOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, packageName, options }, + runTestOperationSpec + ); + } + + /** + * ListByTestBaseAccountNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the ListByTestBaseAccount method. + * @param options The options parameters. + */ + private _listByTestBaseAccountNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: PackagesListByTestBaseAccountNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listByTestBaseAccountNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByTestBaseAccountOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PackageListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PackageResource + }, + 201: { + bodyMapper: Mappers.PackageResource + }, + 202: { + bodyMapper: Mappers.PackageResource + }, + 204: { + bodyMapper: Mappers.PackageResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters13, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.PackageResource + }, + 201: { + bodyMapper: Mappers.PackageResource + }, + 202: { + bodyMapper: Mappers.PackageResource + }, + 204: { + bodyMapper: Mappers.PackageResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters14, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PackageResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const hardDeleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/hardDelete", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const getDownloadURLOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/getDownloadUrl", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DownloadURLResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const runTestOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/runTest", + httpMethod: "POST", + responses: { + 200: {}, + 202: { + headersMapper: Mappers.PackagesRunTestHeaders + }, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters15, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByTestBaseAccountNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PackageListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/skus.ts b/sdk/testbase/arm-testbase/src/operations/skus.ts new file mode 100644 index 000000000000..54e76972ecbd --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/skus.ts @@ -0,0 +1,151 @@ +/* + * 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"; +import { Skus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + TestBaseAccountSKU, + SkusListNextOptionalParams, + SkusListOptionalParams, + SkusListResponse, + SkusListNextResponse +} from "../models"; + +/// +/** Class containing Skus operations. */ +export class SkusImpl implements Skus { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class Skus class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists the available SKUs of Test Base Account in a subscription. + * @param options The options parameters. + */ + public list( + options?: SkusListOptionalParams + ): 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?: SkusListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SkusListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: SkusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists the available SKUs of Test Base Account in a subscription. + * @param options The options parameters. + */ + private _list(options?: SkusListOptionalParams): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: SkusListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.TestBase/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestBaseAccountSKUListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestBaseAccountSKUListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/testBaseAccounts.ts b/sdk/testbase/arm-testbase/src/operations/testBaseAccounts.ts new file mode 100644 index 000000000000..c36093a2bdc5 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/testBaseAccounts.ts @@ -0,0 +1,918 @@ +/* + * 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"; +import { TestBaseAccounts } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + TestBaseAccountResource, + TestBaseAccountsListBySubscriptionNextOptionalParams, + TestBaseAccountsListBySubscriptionOptionalParams, + TestBaseAccountsListBySubscriptionResponse, + TestBaseAccountsListByResourceGroupNextOptionalParams, + TestBaseAccountsListByResourceGroupOptionalParams, + TestBaseAccountsListByResourceGroupResponse, + TestBaseAccountsCreateOptionalParams, + TestBaseAccountsCreateResponse, + TestBaseAccountUpdateParameters, + TestBaseAccountsUpdateOptionalParams, + TestBaseAccountsUpdateResponse, + TestBaseAccountsDeleteOptionalParams, + TestBaseAccountsGetOptionalParams, + TestBaseAccountsGetResponse, + TestBaseAccountsOffboardOptionalParams, + TestBaseAccountsGetFileUploadUrlOptionalParams, + TestBaseAccountsGetFileUploadUrlResponse, + PackageCheckNameAvailabilityParameters, + TestBaseAccountsCheckPackageNameAvailabilityOptionalParams, + TestBaseAccountsCheckPackageNameAvailabilityResponse, + TestBaseAccountsListBySubscriptionNextResponse, + TestBaseAccountsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing TestBaseAccounts operations. */ +export class TestBaseAccountsImpl implements TestBaseAccounts { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class TestBaseAccounts class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the Test Base Accounts in a subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: TestBaseAccountsListBySubscriptionOptionalParams + ): 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?: TestBaseAccountsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TestBaseAccountsListBySubscriptionResponse; + 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?: TestBaseAccountsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Lists all the Test Base Accounts in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: TestBaseAccountsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(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.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: TestBaseAccountsListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TestBaseAccountsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: TestBaseAccountsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Lists all the Test Base Accounts in a subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: TestBaseAccountsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Lists all the Test Base Accounts in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: TestBaseAccountsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Create or replace (overwrite/recreate, with potential downtime) a Test Base Account in the specified + * subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to create a Test Base Account. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + testBaseAccountName: string, + parameters: TestBaseAccountResource, + options?: TestBaseAccountsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TestBaseAccountsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, testBaseAccountName, parameters, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + TestBaseAccountsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or replace (overwrite/recreate, with potential downtime) a Test Base Account in the specified + * subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to create a Test Base Account. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + parameters: TestBaseAccountResource, + options?: TestBaseAccountsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + testBaseAccountName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update an existing Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to update a Test Base Account. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + testBaseAccountName: string, + parameters: TestBaseAccountUpdateParameters, + options?: TestBaseAccountsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TestBaseAccountsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, testBaseAccountName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + TestBaseAccountsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Update an existing Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to update a Test Base Account. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + parameters: TestBaseAccountUpdateParameters, + options?: TestBaseAccountsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + testBaseAccountName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, testBaseAccountName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + testBaseAccountName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + getOperationSpec + ); + } + + /** + * Offboard a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + async beginOffboard( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsOffboardOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, testBaseAccountName, options }, + spec: offboardOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Offboard a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + async beginOffboardAndWait( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsOffboardOptionalParams + ): Promise { + const poller = await this.beginOffboard( + resourceGroupName, + testBaseAccountName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the file upload URL of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + getFileUploadUrl( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsGetFileUploadUrlOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + getFileUploadUrlOperationSpec + ); + } + + /** + * Checks that the Test Base Package name and version is valid and is not already in use. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to the Test Base Package CheckNameAvailability operation. + * @param options The options parameters. + */ + checkPackageNameAvailability( + resourceGroupName: string, + testBaseAccountName: string, + parameters: PackageCheckNameAvailabilityParameters, + options?: TestBaseAccountsCheckPackageNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, parameters, options }, + checkPackageNameAvailabilityOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: TestBaseAccountsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: TestBaseAccountsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.TestBase/testBaseAccounts", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestBaseAccountListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.getDeleted], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestBaseAccountListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.getDeleted], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TestBaseAccountResource + }, + 201: { + bodyMapper: Mappers.TestBaseAccountResource + }, + 202: { + bodyMapper: Mappers.TestBaseAccountResource + }, + 204: { + bodyMapper: Mappers.TestBaseAccountResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters9, + queryParameters: [Parameters.apiVersion, Parameters.restore], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.TestBaseAccountResource + }, + 201: { + bodyMapper: Mappers.TestBaseAccountResource + }, + 202: { + bodyMapper: Mappers.TestBaseAccountResource + }, + 204: { + bodyMapper: Mappers.TestBaseAccountResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestBaseAccountResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const offboardOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/offboard", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getFileUploadUrlOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/getFileUploadUrl", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.FileUploadURLResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const checkPackageNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/checkPackageNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters12, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestBaseAccountListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestBaseAccountListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/testResults.ts b/sdk/testbase/arm-testbase/src/operations/testResults.ts new file mode 100644 index 000000000000..ec852b213615 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/testResults.ts @@ -0,0 +1,464 @@ +/* + * 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"; +import { TestResults } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + TestResultResource, + TestResultsListNextOptionalParams, + OsUpdateType, + TestResultsListOptionalParams, + TestResultsListResponse, + TestResultsGetOptionalParams, + TestResultsGetResponse, + TestResultsGetDownloadURLOptionalParams, + TestResultsGetDownloadURLResponse, + TestResultsGetVideoDownloadURLOptionalParams, + TestResultsGetVideoDownloadURLResponse, + TestResultConsoleLogDownloadURLParameters, + TestResultsGetConsoleLogDownloadURLOptionalParams, + TestResultsGetConsoleLogDownloadURLResponse, + TestResultsListNextResponse +} from "../models"; + +/// +/** Class containing TestResults operations. */ +export class TestResultsImpl implements TestResults { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class TestResults class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the Test Results with specified OS Update type for a Test Base Package. Can be filtered by + * osName, releaseName, flightingRing, buildVersion, buildRevision. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateType: OsUpdateType, + options?: TestResultsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + packageName, + osUpdateType, + 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, + testBaseAccountName, + packageName, + osUpdateType, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateType: OsUpdateType, + options?: TestResultsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TestResultsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + packageName, + osUpdateType, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + packageName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateType: OsUpdateType, + options?: TestResultsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + packageName, + osUpdateType, + options + )) { + yield* page; + } + } + + /** + * Lists all the Test Results with specified OS Update type for a Test Base Package. Can be filtered by + * osName, releaseName, flightingRing, buildVersion, buildRevision. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateType: OsUpdateType, + options?: TestResultsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + osUpdateType, + options + }, + listOperationSpec + ); + } + + /** + * Get the Test Result by Id with specified OS Update type for a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + options?: TestResultsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + testResultName, + options + }, + getOperationSpec + ); + } + + /** + * Gets the download URL of the test result. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param options The options parameters. + */ + getDownloadURL( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + options?: TestResultsGetDownloadURLOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + testResultName, + options + }, + getDownloadURLOperationSpec + ); + } + + /** + * Gets the download URL of the test execution screen recording. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param options The options parameters. + */ + getVideoDownloadURL( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + options?: TestResultsGetVideoDownloadURLOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + testResultName, + options + }, + getVideoDownloadURLOperationSpec + ); + } + + /** + * Gets the download URL of the test execution console log file. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param parameters Parameters supplied to the Test Result GetConsoleLogDownloadUrl operation. + * @param options The options parameters. + */ + getConsoleLogDownloadURL( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + parameters: TestResultConsoleLogDownloadURLParameters, + options?: TestResultsGetConsoleLogDownloadURLOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + testResultName, + parameters, + options + }, + getConsoleLogDownloadURLOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + nextLink: string, + options?: TestResultsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + testBaseAccountName, + packageName, + nextLink, + options + }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/testResults", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestResultListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.osUpdateType + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/testResults/{testResultName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestResultResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1, + Parameters.testResultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getDownloadURLOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/testResults/{testResultName}/getDownloadUrl", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DownloadURLResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1, + Parameters.testResultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getVideoDownloadURLOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/testResults/{testResultName}/getVideoDownloadUrl", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DownloadURLResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1, + Parameters.testResultName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getConsoleLogDownloadURLOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}/testResults/{testResultName}/getConsoleLogDownloadUrl", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DownloadURLResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters16, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.packageName1, + Parameters.testResultName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestResultListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink, + Parameters.packageName1 + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/testSummaries.ts b/sdk/testbase/arm-testbase/src/operations/testSummaries.ts new file mode 100644 index 000000000000..ced5bb40e4ec --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/testSummaries.ts @@ -0,0 +1,247 @@ +/* + * 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"; +import { TestSummaries } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + TestSummaryResource, + TestSummariesListNextOptionalParams, + TestSummariesListOptionalParams, + TestSummariesListResponse, + TestSummariesGetOptionalParams, + TestSummariesGetResponse, + TestSummariesListNextResponse +} from "../models"; + +/// +/** Class containing TestSummaries operations. */ +export class TestSummariesImpl implements TestSummaries { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class TestSummaries class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists the Test Summaries of all the packages under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestSummariesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + 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, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestSummariesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TestSummariesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestSummariesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists the Test Summaries of all the packages under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestSummariesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listOperationSpec + ); + } + + /** + * Gets a Test Summary with specific name from all the Test Summaries of all the packages under a Test + * Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param testSummaryName The name of the Test Summary. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + testSummaryName: string, + options?: TestSummariesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, testSummaryName, options }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: TestSummariesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/testSummaries", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestSummaryListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/testSummaries/{testSummaryName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestSummaryResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.testSummaryName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestSummaryListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/testTypes.ts b/sdk/testbase/arm-testbase/src/operations/testTypes.ts new file mode 100644 index 000000000000..ae518cdbbfa9 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/testTypes.ts @@ -0,0 +1,246 @@ +/* + * 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"; +import { TestTypes } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + TestTypeResource, + TestTypesListNextOptionalParams, + TestTypesListOptionalParams, + TestTypesListResponse, + TestTypesGetOptionalParams, + TestTypesGetResponse, + TestTypesListNextResponse +} from "../models"; + +/// +/** Class containing TestTypes operations. */ +export class TestTypesImpl implements TestTypes { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class TestTypes class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the test types of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestTypesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + 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, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestTypesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TestTypesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestTypesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all the test types of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestTypesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listOperationSpec + ); + } + + /** + * Gets a test type of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param testTypeResourceName The resource name of a test type. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + testTypeResourceName: string, + options?: TestTypesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, testTypeResourceName, options }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: TestTypesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/testTypes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestTypeListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/testTypes/{testTypeResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestTypeResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.testTypeResourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestTypeListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/usage.ts b/sdk/testbase/arm-testbase/src/operations/usage.ts new file mode 100644 index 000000000000..eec94e725535 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/usage.ts @@ -0,0 +1,202 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Usage } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + TestBaseAccountUsageData, + UsageListNextOptionalParams, + UsageListOptionalParams, + UsageListResponse, + UsageListNextResponse +} from "../models"; + +/// +/** Class containing Usage operations. */ +export class UsageImpl implements Usage { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class Usage class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists the usage data of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + testBaseAccountName: string, + options?: UsageListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + testBaseAccountName, + 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, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: UsageListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: UsageListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: UsageListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists the usage data of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + testBaseAccountName: string, + options?: UsageListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: UsageListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/usages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestBaseAccountUsageDataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TestBaseAccountUsageDataList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operations/vHDs.ts b/sdk/testbase/arm-testbase/src/operations/vHDs.ts new file mode 100644 index 000000000000..f369eed04105 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operations/vHDs.ts @@ -0,0 +1,288 @@ +/* + * 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"; +import { VHDs } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { TestBase } from "../testBase"; +import { + VHDResource, + VHDsListByTestBaseAccountNextOptionalParams, + VHDsListByTestBaseAccountOptionalParams, + VHDsListByTestBaseAccountResponse, + VHDsDeleteOptionalParams, + VHDsGetOptionalParams, + VHDsGetResponse, + VHDsListByTestBaseAccountNextResponse +} from "../models"; + +/// +/** Class containing VHDs operations. */ +export class VHDsImpl implements VHDs { + private readonly client: TestBase; + + /** + * Initialize a new instance of the class VHDs class. + * @param client Reference to the service client + */ + constructor(client: TestBase) { + this.client = client; + } + + /** + * Lists all the VHDs under a test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + public listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: VHDsListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByTestBaseAccountPagingAll( + resourceGroupName, + testBaseAccountName, + 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.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options, + settings + ); + } + }; + } + + private async *listByTestBaseAccountPagingPage( + resourceGroupName: string, + testBaseAccountName: string, + options?: VHDsListByTestBaseAccountOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: VHDsListByTestBaseAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByTestBaseAccount( + resourceGroupName, + testBaseAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByTestBaseAccountNext( + resourceGroupName, + testBaseAccountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByTestBaseAccountPagingAll( + resourceGroupName: string, + testBaseAccountName: string, + options?: VHDsListByTestBaseAccountOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByTestBaseAccountPagingPage( + resourceGroupName, + testBaseAccountName, + options + )) { + yield* page; + } + } + + /** + * Lists all the VHDs under a test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + private _listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: VHDsListByTestBaseAccountOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, options }, + listByTestBaseAccountOperationSpec + ); + } + + /** + * Deletes a Test Base VHD. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param vhdName The resource name of the Test Base VHD. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + vhdName: string, + options?: VHDsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, vhdName, options }, + deleteOperationSpec + ); + } + + /** + * Gets a Test Base VHD. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param vhdName The resource name of the Test Base VHD. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + vhdName: string, + options?: VHDsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, vhdName, options }, + getOperationSpec + ); + } + + /** + * ListByTestBaseAccountNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param nextLink The nextLink from the previous successful call to the ListByTestBaseAccount method. + * @param options The options parameters. + */ + private _listByTestBaseAccountNext( + resourceGroupName: string, + testBaseAccountName: string, + nextLink: string, + options?: VHDsListByTestBaseAccountNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, testBaseAccountName, nextLink, options }, + listByTestBaseAccountNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByTestBaseAccountOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/vhds", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VHDListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/vhds/{vhdName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.vhdName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/vhds/{vhdName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VHDResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.vhdName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByTestBaseAccountNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VHDListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.testBaseAccountName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/actionRequestsOperations.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/actionRequestsOperations.ts new file mode 100644 index 000000000000..9f6902fbece5 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/actionRequestsOperations.ts @@ -0,0 +1,73 @@ +/* + * 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 { + ActionRequest, + ActionRequestsListOptionalParams, + ActionRequestsGetOptionalParams, + ActionRequestsGetResponse, + ActionRequestsPutOptionalParams, + ActionRequestsPutResponse, + ActionRequestsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a ActionRequestsOperations. */ +export interface ActionRequestsOperations { + /** + * List all action requests under the specified test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + options?: ActionRequestsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the action request under the specified test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param actionRequestName + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + actionRequestName: string, + options?: ActionRequestsGetOptionalParams + ): Promise; + /** + * Create (submit) an action request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param actionRequestName + * @param options The options parameters. + */ + put( + resourceGroupName: string, + testBaseAccountName: string, + actionRequestName: string, + options?: ActionRequestsPutOptionalParams + ): Promise; + /** + * Delete (revoke) an action request. Only requests in review can be deleted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param actionRequestName + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + actionRequestName: string, + options?: ActionRequestsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/analysisResults.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/analysisResults.ts new file mode 100644 index 000000000000..5339f4b8d454 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/analysisResults.ts @@ -0,0 +1,57 @@ +/* + * 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 { + AnalysisResultSingletonResource, + AnalysisResultType, + AnalysisResultsListOptionalParams, + AnalysisResultName, + AnalysisResultsGetOptionalParams, + AnalysisResultsGetResponse +} from "../models"; + +/// +/** Interface representing a AnalysisResults. */ +export interface AnalysisResults { + /** + * Lists the Analysis Results of a Test Result. The result collection will only contain one element as + * all the data will be nested in a singleton object. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param analysisResultType The type of the Analysis Result of a Test Result. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + analysisResultType: AnalysisResultType, + options?: AnalysisResultsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets an Analysis Result of a Test Result by name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param analysisResultName The name of the Analysis Result of a Test Result. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + analysisResultName: AnalysisResultName, + options?: AnalysisResultsGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/availableInplaceUpgradeOS.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/availableInplaceUpgradeOS.ts new file mode 100644 index 000000000000..e537fba97009 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/availableInplaceUpgradeOS.ts @@ -0,0 +1,47 @@ +/* + * 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 { + AvailableInplaceUpgradeOSResource, + OsUpdateType, + AvailableInplaceUpgradeOSListOptionalParams, + AvailableInplaceUpgradeOSGetOptionalParams, + AvailableInplaceUpgradeOSGetResponse +} from "../models"; + +/// +/** Interface representing a AvailableInplaceUpgradeOS. */ +export interface AvailableInplaceUpgradeOS { + /** + * Lists all the available In-place Upgrade OSs to a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + osUpdateType: OsUpdateType, + options?: AvailableInplaceUpgradeOSListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets an available In-place Upgrade OS to run a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param availableInplaceUpgradeOSResourceName The resource name of an Available In-place Upgrade OS. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + availableInplaceUpgradeOSResourceName: string, + options?: AvailableInplaceUpgradeOSGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/availableOS.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/availableOS.ts new file mode 100644 index 000000000000..7bb59996f388 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/availableOS.ts @@ -0,0 +1,47 @@ +/* + * 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 { + AvailableOSResource, + OsUpdateType, + AvailableOSListOptionalParams, + AvailableOSGetOptionalParams, + AvailableOSGetResponse +} from "../models"; + +/// +/** Interface representing a AvailableOS. */ +export interface AvailableOS { + /** + * Lists all the available OSs to run a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + osUpdateType: OsUpdateType, + options?: AvailableOSListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets an available OS to run a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param availableOSResourceName The resource name of an Available OS. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + availableOSResourceName: string, + options?: AvailableOSGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/billingHubService.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/billingHubService.ts new file mode 100644 index 000000000000..f02b6ed870d0 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/billingHubService.ts @@ -0,0 +1,38 @@ +/* + * 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 { + BillingHubServiceGetFreeHourBalanceOptionalParams, + BillingHubServiceGetFreeHourBalanceResponse, + BillingHubServiceGetUsageOptionalParams, + BillingHubServiceGetUsageResponse +} from "../models"; + +/** Interface representing a BillingHubService. */ +export interface BillingHubService { + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + getFreeHourBalance( + resourceGroupName: string, + testBaseAccountName: string, + options?: BillingHubServiceGetFreeHourBalanceOptionalParams + ): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + getUsage( + resourceGroupName: string, + testBaseAccountName: string, + options?: BillingHubServiceGetUsageOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/chatSession.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/chatSession.ts new file mode 100644 index 000000000000..e3e9f44f5b14 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/chatSession.ts @@ -0,0 +1,53 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ChatRequest, + ChatSessionChatOptionalParams, + ChatSessionChatResponse +} from "../models"; + +/** Interface representing a ChatSession. */ +export interface ChatSession { + /** + * Start a new chat turn. Ask a question and see the answer in response. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param chatSessionName The chat session name. + * @param parameters Payload to ask a question. + * @param options The options parameters. + */ + beginChat( + resourceGroupName: string, + testBaseAccountName: string, + chatSessionName: string, + parameters: ChatRequest, + options?: ChatSessionChatOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ChatSessionChatResponse + > + >; + /** + * Start a new chat turn. Ask a question and see the answer in response. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param chatSessionName The chat session name. + * @param parameters Payload to ask a question. + * @param options The options parameters. + */ + beginChatAndWait( + resourceGroupName: string, + testBaseAccountName: string, + chatSessionName: string, + parameters: ChatRequest, + options?: ChatSessionChatOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/chatSessions.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/chatSessions.ts new file mode 100644 index 000000000000..abfc6475db18 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/chatSessions.ts @@ -0,0 +1,44 @@ +/* + * 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 { + ChatSessionResource, + ChatSessionsListOptionalParams, + ChatSessionsGetOptionalParams, + ChatSessionsGetResponse +} from "../models"; + +/// +/** Interface representing a ChatSessions. */ +export interface ChatSessions { + /** + * List all chat sessions + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + options?: ChatSessionsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a chat session + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param chatSessionName The chat session name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + chatSessionName: string, + options?: ChatSessionsGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/credential.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/credential.ts new file mode 100644 index 000000000000..31aa0c3dc57c --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/credential.ts @@ -0,0 +1,44 @@ +/* + * 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 { + CredentialResource, + CredentialListByTestBaseAccountOptionalParams, + CredentialGetOptionalParams, + CredentialGetResponse +} from "../models"; + +/// +/** Interface representing a Credential. */ +export interface Credential { + /** + * Lists all the Credentials under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: CredentialListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a test base credential Resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param credentialName The credential resource name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + credentialName: string, + options?: CredentialGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/credentials.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/credentials.ts new file mode 100644 index 000000000000..29eb736abaff --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/credentials.ts @@ -0,0 +1,63 @@ +/* + * 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 { + CredentialResource, + CredentialsCreateOptionalParams, + CredentialsCreateResponse, + CredentialsUpdateOptionalParams, + CredentialsUpdateResponse, + CredentialsDeleteOptionalParams +} from "../models"; + +/** Interface representing a Credentials. */ +export interface Credentials { + /** + * Creates or replaces a Test Base Credential. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param credentialName The credential resource name. + * @param parameters Parameters supplied to create a Test Base Credential. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + testBaseAccountName: string, + credentialName: string, + parameters: CredentialResource, + options?: CredentialsCreateOptionalParams + ): Promise; + /** + * Updates an existing test base credential. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param credentialName The credential resource name. + * @param parameters Parameters supplied to create a test base credential. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + testBaseAccountName: string, + credentialName: string, + parameters: CredentialResource, + options?: CredentialsUpdateOptionalParams + ): Promise; + /** + * Deletes an existing test base credential. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param credentialName The credential resource name. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + credentialName: string, + options?: CredentialsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/customImages.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/customImages.ts new file mode 100644 index 000000000000..de71bc0c44d6 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/customImages.ts @@ -0,0 +1,132 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + CustomImageResource, + CustomImagesListByTestBaseAccountOptionalParams, + CustomImagesCreateOptionalParams, + CustomImagesCreateResponse, + CustomImagesDeleteOptionalParams, + CustomImagesDeleteResponse, + CustomImagesGetOptionalParams, + CustomImagesGetResponse, + ImageNameCheckAvailabilityParameters, + CustomImagesCheckImageNameAvailabilityOptionalParams, + CustomImagesCheckImageNameAvailabilityResponse +} from "../models"; + +/// +/** Interface representing a CustomImages. */ +export interface CustomImages { + /** + * Lists all the custom images under a test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: CustomImagesListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates a test base custom image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customImageName The resource name of the test base custom image. + * @param parameters Parameters supplied to create a test base custom image. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + testBaseAccountName: string, + customImageName: string, + parameters: CustomImageResource, + options?: CustomImagesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + CustomImagesCreateResponse + > + >; + /** + * Creates a test base custom image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customImageName The resource name of the test base custom image. + * @param parameters Parameters supplied to create a test base custom image. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + customImageName: string, + parameters: CustomImageResource, + options?: CustomImagesCreateOptionalParams + ): Promise; + /** + * Deletes a test base custom image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customImageName The resource name of the test base custom image. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + testBaseAccountName: string, + customImageName: string, + options?: CustomImagesDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + CustomImagesDeleteResponse + > + >; + /** + * Deletes a test base custom image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customImageName The resource name of the test base custom image. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + testBaseAccountName: string, + customImageName: string, + options?: CustomImagesDeleteOptionalParams + ): Promise; + /** + * Gets a test base custom image. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customImageName The resource name of the test base custom image. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + customImageName: string, + options?: CustomImagesGetOptionalParams + ): Promise; + /** + * Checks that the test vase custom image generated from VHD resource has valid and unique definition + * and version, return architecture and OS state of potential existing image definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to the test base custom image CheckAvailability operation. + * @param options The options parameters. + */ + checkImageNameAvailability( + resourceGroupName: string, + testBaseAccountName: string, + parameters: ImageNameCheckAvailabilityParameters, + options?: CustomImagesCheckImageNameAvailabilityOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/customerEvents.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/customerEvents.ts new file mode 100644 index 000000000000..44c43fd26a43 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/customerEvents.ts @@ -0,0 +1,109 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + CustomerEventResource, + CustomerEventsListByTestBaseAccountOptionalParams, + CustomerEventsCreateOptionalParams, + CustomerEventsCreateResponse, + CustomerEventsDeleteOptionalParams, + CustomerEventsGetOptionalParams, + CustomerEventsGetResponse +} from "../models"; + +/// +/** Interface representing a CustomerEvents. */ +export interface CustomerEvents { + /** + * Lists all notification events subscribed under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: CustomerEventsListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or replace a Test Base Customer Event. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customerEventName The resource name of the Test Base Customer event. + * @param parameters Parameters supplied to create a Test Base CustomerEvent. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + testBaseAccountName: string, + customerEventName: string, + parameters: CustomerEventResource, + options?: CustomerEventsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + CustomerEventsCreateResponse + > + >; + /** + * Create or replace a Test Base Customer Event. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customerEventName The resource name of the Test Base Customer event. + * @param parameters Parameters supplied to create a Test Base CustomerEvent. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + customerEventName: string, + parameters: CustomerEventResource, + options?: CustomerEventsCreateOptionalParams + ): Promise; + /** + * Deletes a Test Base Customer Event. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customerEventName The resource name of the Test Base Customer event. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + testBaseAccountName: string, + customerEventName: string, + options?: CustomerEventsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a Test Base Customer Event. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customerEventName The resource name of the Test Base Customer event. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + testBaseAccountName: string, + customerEventName: string, + options?: CustomerEventsDeleteOptionalParams + ): Promise; + /** + * Gets a Test Base CustomerEvent. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param customerEventName The resource name of the Test Base Customer event. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + customerEventName: string, + options?: CustomerEventsGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/draftPackages.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/draftPackages.ts new file mode 100644 index 000000000000..15b7c652c2bb --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/draftPackages.ts @@ -0,0 +1,223 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + DraftPackageResource, + DraftPackagesListByTestBaseAccountOptionalParams, + DraftPackagesCreateOptionalParams, + DraftPackagesCreateResponse, + DraftPackageUpdateParameters, + DraftPackagesUpdateOptionalParams, + DraftPackagesUpdateResponse, + DraftPackagesDeleteOptionalParams, + DraftPackagesGetOptionalParams, + DraftPackagesGetResponse, + DraftPackagesGetPathOptionalParams, + DraftPackagesGetPathResponse, + CopyFromPackageOperationParameters, + DraftPackagesCopyFromPackageOptionalParams, + DraftPackagesCopyFromPackageResponse, + ExtractFileOperationParameters, + DraftPackagesExtractFileOptionalParams, + DraftPackagesExtractFileResponse, + GenerateOperationParameters, + DraftPackagesGenerateFoldersAndScriptsOptionalParams, + DraftPackagesGenerateFoldersAndScriptsResponse +} from "../models"; + +/// +/** Interface representing a DraftPackages. */ +export interface DraftPackages { + /** + * Lists all the draft packages under a test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: DraftPackagesListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates or replaces a Test Base Draft Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to create a Test Base Draft Package. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: DraftPackageResource, + options?: DraftPackagesCreateOptionalParams + ): Promise; + /** + * Updates an existing Test Base Draft Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to update a Test Base Draft Package. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: DraftPackageUpdateParameters, + options?: DraftPackagesUpdateOptionalParams + ): Promise; + /** + * Deletes a Test Base Draft Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + options?: DraftPackagesDeleteOptionalParams + ): Promise; + /** + * Gets a Test Base Draft Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + options?: DraftPackagesGetOptionalParams + ): Promise; + /** + * Gets draft package path and temp working path with SAS. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param options The options parameters. + */ + getPath( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + options?: DraftPackagesGetPathOptionalParams + ): Promise; + /** + * Copy package file and metadata from a package to this draft package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package CopyFromPackage operation. + * @param options The options parameters. + */ + beginCopyFromPackage( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: CopyFromPackageOperationParameters, + options?: DraftPackagesCopyFromPackageOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + DraftPackagesCopyFromPackageResponse + > + >; + /** + * Copy package file and metadata from a package to this draft package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package CopyFromPackage operation. + * @param options The options parameters. + */ + beginCopyFromPackageAndWait( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: CopyFromPackageOperationParameters, + options?: DraftPackagesCopyFromPackageOptionalParams + ): Promise; + /** + * Performs extracting file operation for a Test Base Draft Package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package ExtractFile operation. + * @param options The options parameters. + */ + beginExtractFile( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: ExtractFileOperationParameters, + options?: DraftPackagesExtractFileOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + DraftPackagesExtractFileResponse + > + >; + /** + * Performs extracting file operation for a Test Base Draft Package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package ExtractFile operation. + * @param options The options parameters. + */ + beginExtractFileAndWait( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: ExtractFileOperationParameters, + options?: DraftPackagesExtractFileOptionalParams + ): Promise; + /** + * Generates folders and scripts + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package Generate operation. + * @param options The options parameters. + */ + beginGenerateFoldersAndScripts( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: GenerateOperationParameters, + options?: DraftPackagesGenerateFoldersAndScriptsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + DraftPackagesGenerateFoldersAndScriptsResponse + > + >; + /** + * Generates folders and scripts + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param draftPackageName The resource name of the Test Base Draft Package. + * @param parameters Parameters supplied to the Test Base Draft Package Generate operation. + * @param options The options parameters. + */ + beginGenerateFoldersAndScriptsAndWait( + resourceGroupName: string, + testBaseAccountName: string, + draftPackageName: string, + parameters: GenerateOperationParameters, + options?: DraftPackagesGenerateFoldersAndScriptsOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/emailEvents.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/emailEvents.ts new file mode 100644 index 000000000000..f4455a3dbdf3 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/emailEvents.ts @@ -0,0 +1,44 @@ +/* + * 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 { + EmailEventResource, + EmailEventsListOptionalParams, + EmailEventsGetOptionalParams, + EmailEventsGetResponse +} from "../models"; + +/// +/** Interface representing a EmailEvents. */ +export interface EmailEvents { + /** + * Lists all the email events of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + options?: EmailEventsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a email event of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param emailEventResourceName The resource name of an email event. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + emailEventResourceName: string, + options?: EmailEventsGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/favoriteProcesses.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/favoriteProcesses.ts new file mode 100644 index 000000000000..15114d71caf2 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/favoriteProcesses.ts @@ -0,0 +1,89 @@ +/* + * 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 { + FavoriteProcessResource, + FavoriteProcessesListOptionalParams, + FavoriteProcessesCreateOptionalParams, + FavoriteProcessesCreateResponse, + FavoriteProcessesDeleteOptionalParams, + FavoriteProcessesGetOptionalParams, + FavoriteProcessesGetResponse +} from "../models"; + +/// +/** Interface representing a FavoriteProcesses. */ +export interface FavoriteProcesses { + /** + * Lists the favorite processes for a specific package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: FavoriteProcessesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or replace a favorite process for a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param favoriteProcessResourceName The resource name of a favorite process in a package. If the + * process name contains characters that are not allowed in Azure Resource Name, we use + * 'actualProcessName' in request body to submit the name. + * @param parameters Parameters supplied to create a favorite process in a package. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + favoriteProcessResourceName: string, + parameters: FavoriteProcessResource, + options?: FavoriteProcessesCreateOptionalParams + ): Promise; + /** + * Deletes a favorite process for a specific package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param favoriteProcessResourceName The resource name of a favorite process in a package. If the + * process name contains characters that are not allowed in Azure Resource Name, we use + * 'actualProcessName' in request body to submit the name. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + favoriteProcessResourceName: string, + options?: FavoriteProcessesDeleteOptionalParams + ): Promise; + /** + * Gets a favorite process for a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param favoriteProcessResourceName The resource name of a favorite process in a package. If the + * process name contains characters that are not allowed in Azure Resource Name, we use + * 'actualProcessName' in request body to submit the name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + favoriteProcessResourceName: string, + options?: FavoriteProcessesGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/featureUpdateSupportedOses.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/featureUpdateSupportedOses.ts new file mode 100644 index 000000000000..7fd6c4642e80 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/featureUpdateSupportedOses.ts @@ -0,0 +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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + FeatureUpdateSupportedOsesResource, + FeatureUpdateSupportedOsesListOptionalParams +} from "../models"; + +/// +/** Interface representing a FeatureUpdateSupportedOses. */ +export interface FeatureUpdateSupportedOses { + /** + * Lists all the available OSs to run a package under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FeatureUpdateSupportedOsesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/firstPartyApps.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/firstPartyApps.ts new file mode 100644 index 000000000000..815c7d8c9104 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/firstPartyApps.ts @@ -0,0 +1,44 @@ +/* + * 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 { + FirstPartyAppResource, + FirstPartyAppsListOptionalParams, + FirstPartyAppsGetOptionalParams, + FirstPartyAppsGetResponse +} from "../models"; + +/// +/** Interface representing a FirstPartyApps. */ +export interface FirstPartyApps { + /** + * Lists all first party applications currently available for test runs under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FirstPartyAppsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a first party application to prepare a test run for a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param firstPartyAppResourceName The resource name of a first party application. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + firstPartyAppResourceName: string, + options?: FirstPartyAppsGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/flightingRings.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/flightingRings.ts new file mode 100644 index 000000000000..7c8f632a4a61 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/flightingRings.ts @@ -0,0 +1,44 @@ +/* + * 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 { + FlightingRingResource, + FlightingRingsListOptionalParams, + FlightingRingsGetOptionalParams, + FlightingRingsGetResponse +} from "../models"; + +/// +/** Interface representing a FlightingRings. */ +export interface FlightingRings { + /** + * Lists all the flighting rings of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FlightingRingsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a flighting ring of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param flightingRingResourceName The resource name of a flighting ring. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + flightingRingResourceName: string, + options?: FlightingRingsGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/freeHourBalances.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/freeHourBalances.ts new file mode 100644 index 000000000000..b398c8004246 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/freeHourBalances.ts @@ -0,0 +1,45 @@ +/* + * 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 { + FreeHourBalanceResource, + FreeHourBalancesListOptionalParams, + FreeHourBalanceName, + FreeHourBalancesGetOptionalParams, + FreeHourBalancesGetResponse +} from "../models"; + +/// +/** Interface representing a FreeHourBalances. */ +export interface FreeHourBalances { + /** + * Return the Test Base free hour balances list. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + options?: FreeHourBalancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Return the Test Base free hour balance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param freeHourBalanceName The name of the free hour balance of a Test Base Account. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + freeHourBalanceName: FreeHourBalanceName, + options?: FreeHourBalancesGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/galleryAppSkus.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/galleryAppSkus.ts new file mode 100644 index 000000000000..10d5736ba7e0 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/galleryAppSkus.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + GalleryAppSkuResource, + GalleryAppSkusListOptionalParams, + GalleryAppSkusGetOptionalParams, + GalleryAppSkusGetResponse +} from "../models"; + +/// +/** Interface representing a GalleryAppSkus. */ +export interface GalleryAppSkus { + /** + * Lists all SKUs of a gallery application currently available for test runs under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param galleryAppName The resource name of a gallery application. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + galleryAppName: string, + options?: GalleryAppSkusListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a gallery application SKU to prepare a test run for a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param galleryAppName The resource name of a gallery application. + * @param galleryAppSkuName The resource name of a gallery application SKU. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + galleryAppName: string, + galleryAppSkuName: string, + options?: GalleryAppSkusGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/galleryApps.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/galleryApps.ts new file mode 100644 index 000000000000..38dcbe3f6167 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/galleryApps.ts @@ -0,0 +1,45 @@ +/* + * 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 { + GalleryAppResource, + GalleryAppsListOptionalParams, + GalleryAppsGetOptionalParams, + GalleryAppsGetResponse +} from "../models"; + +/// +/** Interface representing a GalleryApps. */ +export interface GalleryApps { + /** + * Lists all gallery applications currently available for test runs under a Test Base Account which + * matches user query. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + options?: GalleryAppsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a gallery application to prepare a test run for a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param galleryAppName The resource name of a gallery application. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + galleryAppName: string, + options?: GalleryAppsGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/imageDefinitions.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/imageDefinitions.ts new file mode 100644 index 000000000000..258dca22be37 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/imageDefinitions.ts @@ -0,0 +1,77 @@ +/* + * 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 { + ImageDefinitionResource, + ImageDefinitionsListByTestBaseAccountOptionalParams, + ImageDefinitionsCreateOptionalParams, + ImageDefinitionsCreateResponse, + ImageDefinitionsGetOptionalParams, + ImageDefinitionsGetResponse, + ImageDefinitionsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a ImageDefinitions. */ +export interface ImageDefinitions { + /** + * List all image definition properties created by test base custom images which are derived from 'VHD' + * source. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: ImageDefinitionsListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create image definition for test base custom images which are derived from 'VHD' source. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param imageDefinitionName The resource name of the test base image definition. + * @param parameters Parameters supplied to create a test base image definition. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + testBaseAccountName: string, + imageDefinitionName: string, + parameters: ImageDefinitionResource, + options?: ImageDefinitionsCreateOptionalParams + ): Promise; + /** + * Get image properties under the image definition name created by test base custom image which derived + * from 'VHD' source. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param imageDefinitionName The resource name of the test base image definition. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + imageDefinitionName: string, + options?: ImageDefinitionsGetOptionalParams + ): Promise; + /** + * Delete a test base image definition resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param imageDefinitionName The resource name of the test base image definition. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + imageDefinitionName: string, + options?: ImageDefinitionsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/index.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..6349a394f038 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/index.ts @@ -0,0 +1,39 @@ +/* + * 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 "./actionRequestsOperations"; +export * from "./chatSessions"; +export * from "./chatSession"; +export * from "./customImages"; +export * from "./imageDefinitions"; +export * from "./vHDs"; +export * from "./draftPackages"; +export * from "./freeHourBalances"; +export * from "./skus"; +export * from "./testBaseAccounts"; +export * from "./usage"; +export * from "./availableOS"; +export * from "./featureUpdateSupportedOses"; +export * from "./flightingRings"; +export * from "./firstPartyApps"; +export * from "./galleryApps"; +export * from "./galleryAppSkus"; +export * from "./testTypes"; +export * from "./packages"; +export * from "./testSummaries"; +export * from "./testResults"; +export * from "./oSUpdates"; +export * from "./favoriteProcesses"; +export * from "./analysisResults"; +export * from "./emailEvents"; +export * from "./customerEvents"; +export * from "./operations"; +export * from "./billingHubService"; +export * from "./availableInplaceUpgradeOS"; +export * from "./credential"; +export * from "./credentials"; diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/oSUpdates.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/oSUpdates.ts new file mode 100644 index 000000000000..ac49f2492ffe --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/oSUpdates.ts @@ -0,0 +1,51 @@ +/* + * 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 { + OSUpdateResource, + OsUpdateType, + OSUpdatesListOptionalParams, + OSUpdatesGetOptionalParams, + OSUpdatesGetResponse +} from "../models"; + +/// +/** Interface representing a OSUpdates. */ +export interface OSUpdates { + /** + * Lists the OS Updates in which the package were tested before. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateType: OsUpdateType, + options?: OSUpdatesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets an OS Update by name in which the package was tested before. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param osUpdateResourceName The resource name of an OS Update. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateResourceName: string, + options?: OSUpdatesGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/operations.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..cb454d771e16 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Lists all of the available REST API operations of the Microsoft.TestBase provider. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/packages.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/packages.ts new file mode 100644 index 000000000000..90cb36886961 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/packages.ts @@ -0,0 +1,204 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + PackageResource, + PackagesListByTestBaseAccountOptionalParams, + PackagesCreateOptionalParams, + PackagesCreateResponse, + PackageUpdateParameters, + PackagesUpdateOptionalParams, + PackagesUpdateResponse, + PackagesDeleteOptionalParams, + PackagesGetOptionalParams, + PackagesGetResponse, + PackagesHardDeleteOptionalParams, + PackagesGetDownloadURLOptionalParams, + PackagesGetDownloadURLResponse, + PackagesRunTestOptionalParams, + PackagesRunTestResponse +} from "../models"; + +/// +/** Interface representing a Packages. */ +export interface Packages { + /** + * Lists all the packages under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: PackagesListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or replace (overwrite/recreate, with potential downtime) a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param parameters Parameters supplied to create a Test Base Package. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + parameters: PackageResource, + options?: PackagesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PackagesCreateResponse + > + >; + /** + * Create or replace (overwrite/recreate, with potential downtime) a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param parameters Parameters supplied to create a Test Base Package. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + parameters: PackageResource, + options?: PackagesCreateOptionalParams + ): Promise; + /** + * Update an existing Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param parameters Parameters supplied to update a Test Base Package. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + parameters: PackageUpdateParameters, + options?: PackagesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PackagesUpdateResponse + > + >; + /** + * Update an existing Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param parameters Parameters supplied to update a Test Base Package. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + parameters: PackageUpdateParameters, + options?: PackagesUpdateOptionalParams + ): Promise; + /** + * Deletes a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesDeleteOptionalParams + ): Promise; + /** + * Gets a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesGetOptionalParams + ): Promise; + /** + * Hard Delete a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + beginHardDelete( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesHardDeleteOptionalParams + ): Promise, void>>; + /** + * Hard Delete a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + beginHardDeleteAndWait( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesHardDeleteOptionalParams + ): Promise; + /** + * Gets the download URL of a package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + getDownloadURL( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesGetDownloadURLOptionalParams + ): Promise; + /** + * Trigger a test run on the package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param options The options parameters. + */ + runTest( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + options?: PackagesRunTestOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/skus.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/skus.ts new file mode 100644 index 000000000000..16f8ff71772f --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/skus.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { TestBaseAccountSKU, SkusListOptionalParams } from "../models"; + +/// +/** Interface representing a Skus. */ +export interface Skus { + /** + * Lists the available SKUs of Test Base Account in a subscription. + * @param options The options parameters. + */ + list( + options?: SkusListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/testBaseAccounts.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/testBaseAccounts.ts new file mode 100644 index 000000000000..3c42f5a83f99 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/testBaseAccounts.ts @@ -0,0 +1,193 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + TestBaseAccountResource, + TestBaseAccountsListBySubscriptionOptionalParams, + TestBaseAccountsListByResourceGroupOptionalParams, + TestBaseAccountsCreateOptionalParams, + TestBaseAccountsCreateResponse, + TestBaseAccountUpdateParameters, + TestBaseAccountsUpdateOptionalParams, + TestBaseAccountsUpdateResponse, + TestBaseAccountsDeleteOptionalParams, + TestBaseAccountsGetOptionalParams, + TestBaseAccountsGetResponse, + TestBaseAccountsOffboardOptionalParams, + TestBaseAccountsGetFileUploadUrlOptionalParams, + TestBaseAccountsGetFileUploadUrlResponse, + PackageCheckNameAvailabilityParameters, + TestBaseAccountsCheckPackageNameAvailabilityOptionalParams, + TestBaseAccountsCheckPackageNameAvailabilityResponse +} from "../models"; + +/// +/** Interface representing a TestBaseAccounts. */ +export interface TestBaseAccounts { + /** + * Lists all the Test Base Accounts in a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: TestBaseAccountsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all the Test Base Accounts in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: TestBaseAccountsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or replace (overwrite/recreate, with potential downtime) a Test Base Account in the specified + * subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to create a Test Base Account. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + testBaseAccountName: string, + parameters: TestBaseAccountResource, + options?: TestBaseAccountsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TestBaseAccountsCreateResponse + > + >; + /** + * Create or replace (overwrite/recreate, with potential downtime) a Test Base Account in the specified + * subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to create a Test Base Account. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + parameters: TestBaseAccountResource, + options?: TestBaseAccountsCreateOptionalParams + ): Promise; + /** + * Update an existing Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to update a Test Base Account. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + testBaseAccountName: string, + parameters: TestBaseAccountUpdateParameters, + options?: TestBaseAccountsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TestBaseAccountsUpdateResponse + > + >; + /** + * Update an existing Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to update a Test Base Account. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + testBaseAccountName: string, + parameters: TestBaseAccountUpdateParameters, + options?: TestBaseAccountsUpdateOptionalParams + ): Promise; + /** + * Deletes a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsDeleteOptionalParams + ): Promise; + /** + * Gets a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsGetOptionalParams + ): Promise; + /** + * Offboard a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + beginOffboard( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsOffboardOptionalParams + ): Promise, void>>; + /** + * Offboard a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + beginOffboardAndWait( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsOffboardOptionalParams + ): Promise; + /** + * Gets the file upload URL of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + getFileUploadUrl( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestBaseAccountsGetFileUploadUrlOptionalParams + ): Promise; + /** + * Checks that the Test Base Package name and version is valid and is not already in use. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param parameters Parameters supplied to the Test Base Package CheckNameAvailability operation. + * @param options The options parameters. + */ + checkPackageNameAvailability( + resourceGroupName: string, + testBaseAccountName: string, + parameters: PackageCheckNameAvailabilityParameters, + options?: TestBaseAccountsCheckPackageNameAvailabilityOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/testResults.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/testResults.ts new file mode 100644 index 000000000000..5b7ec3e37519 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/testResults.ts @@ -0,0 +1,106 @@ +/* + * 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 { + TestResultResource, + OsUpdateType, + TestResultsListOptionalParams, + TestResultsGetOptionalParams, + TestResultsGetResponse, + TestResultsGetDownloadURLOptionalParams, + TestResultsGetDownloadURLResponse, + TestResultsGetVideoDownloadURLOptionalParams, + TestResultsGetVideoDownloadURLResponse, + TestResultConsoleLogDownloadURLParameters, + TestResultsGetConsoleLogDownloadURLOptionalParams, + TestResultsGetConsoleLogDownloadURLResponse +} from "../models"; + +/// +/** Interface representing a TestResults. */ +export interface TestResults { + /** + * Lists all the Test Results with specified OS Update type for a Test Base Package. Can be filtered by + * osName, releaseName, flightingRing, buildVersion, buildRevision. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param osUpdateType The type of the OS Update. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + osUpdateType: OsUpdateType, + options?: TestResultsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the Test Result by Id with specified OS Update type for a Test Base Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + options?: TestResultsGetOptionalParams + ): Promise; + /** + * Gets the download URL of the test result. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param options The options parameters. + */ + getDownloadURL( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + options?: TestResultsGetDownloadURLOptionalParams + ): Promise; + /** + * Gets the download URL of the test execution screen recording. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param options The options parameters. + */ + getVideoDownloadURL( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + options?: TestResultsGetVideoDownloadURLOptionalParams + ): Promise; + /** + * Gets the download URL of the test execution console log file. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param packageName The resource name of the Test Base Package. + * @param testResultName The Test Result Name. It equals to TestResult-{TestResultId} string. + * @param parameters Parameters supplied to the Test Result GetConsoleLogDownloadUrl operation. + * @param options The options parameters. + */ + getConsoleLogDownloadURL( + resourceGroupName: string, + testBaseAccountName: string, + packageName: string, + testResultName: string, + parameters: TestResultConsoleLogDownloadURLParameters, + options?: TestResultsGetConsoleLogDownloadURLOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/testSummaries.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/testSummaries.ts new file mode 100644 index 000000000000..940e4ad321a1 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/testSummaries.ts @@ -0,0 +1,45 @@ +/* + * 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 { + TestSummaryResource, + TestSummariesListOptionalParams, + TestSummariesGetOptionalParams, + TestSummariesGetResponse +} from "../models"; + +/// +/** Interface representing a TestSummaries. */ +export interface TestSummaries { + /** + * Lists the Test Summaries of all the packages under a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestSummariesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a Test Summary with specific name from all the Test Summaries of all the packages under a Test + * Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param testSummaryName The name of the Test Summary. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + testSummaryName: string, + options?: TestSummariesGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/testTypes.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/testTypes.ts new file mode 100644 index 000000000000..e409c72235ea --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/testTypes.ts @@ -0,0 +1,44 @@ +/* + * 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 { + TestTypeResource, + TestTypesListOptionalParams, + TestTypesGetOptionalParams, + TestTypesGetResponse +} from "../models"; + +/// +/** Interface representing a TestTypes. */ +export interface TestTypes { + /** + * Lists all the test types of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + options?: TestTypesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a test type of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param testTypeResourceName The resource name of a test type. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + testTypeResourceName: string, + options?: TestTypesGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/usage.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/usage.ts new file mode 100644 index 000000000000..49653c7a6c8f --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/usage.ts @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { TestBaseAccountUsageData, UsageListOptionalParams } from "../models"; + +/// +/** Interface representing a Usage. */ +export interface Usage { + /** + * Lists the usage data of a Test Base Account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + testBaseAccountName: string, + options?: UsageListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/testbase/arm-testbase/src/operationsInterfaces/vHDs.ts b/sdk/testbase/arm-testbase/src/operationsInterfaces/vHDs.ts new file mode 100644 index 000000000000..9e71a5721251 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/operationsInterfaces/vHDs.ts @@ -0,0 +1,58 @@ +/* + * 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 { + VHDResource, + VHDsListByTestBaseAccountOptionalParams, + VHDsDeleteOptionalParams, + VHDsGetOptionalParams, + VHDsGetResponse +} from "../models"; + +/// +/** Interface representing a VHDs. */ +export interface VHDs { + /** + * Lists all the VHDs under a test base account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param options The options parameters. + */ + listByTestBaseAccount( + resourceGroupName: string, + testBaseAccountName: string, + options?: VHDsListByTestBaseAccountOptionalParams + ): PagedAsyncIterableIterator; + /** + * Deletes a Test Base VHD. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param vhdName The resource name of the Test Base VHD. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + testBaseAccountName: string, + vhdName: string, + options?: VHDsDeleteOptionalParams + ): Promise; + /** + * Gets a Test Base VHD. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param testBaseAccountName The resource name of the Test Base Account. + * @param vhdName The resource name of the Test Base VHD. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + testBaseAccountName: string, + vhdName: string, + options?: VHDsGetOptionalParams + ): Promise; +} diff --git a/sdk/testbase/arm-testbase/src/pagingHelper.ts b/sdk/testbase/arm-testbase/src/pagingHelper.ts new file mode 100644 index 000000000000..269a2b9814b5 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/pagingHelper.ts @@ -0,0 +1,39 @@ +/* + * 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/testbase/arm-testbase/src/testBase.ts b/sdk/testbase/arm-testbase/src/testBase.ts new file mode 100644 index 000000000000..aafddb8d9f71 --- /dev/null +++ b/sdk/testbase/arm-testbase/src/testBase.ts @@ -0,0 +1,264 @@ +/* + * 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 { + ActionRequestsOperationsImpl, + ChatSessionsImpl, + ChatSessionImpl, + CustomImagesImpl, + ImageDefinitionsImpl, + VHDsImpl, + DraftPackagesImpl, + FreeHourBalancesImpl, + SkusImpl, + TestBaseAccountsImpl, + UsageImpl, + AvailableOSImpl, + FeatureUpdateSupportedOsesImpl, + FlightingRingsImpl, + FirstPartyAppsImpl, + GalleryAppsImpl, + GalleryAppSkusImpl, + TestTypesImpl, + PackagesImpl, + TestSummariesImpl, + TestResultsImpl, + OSUpdatesImpl, + FavoriteProcessesImpl, + AnalysisResultsImpl, + EmailEventsImpl, + CustomerEventsImpl, + OperationsImpl, + BillingHubServiceImpl, + AvailableInplaceUpgradeOSImpl, + CredentialImpl, + CredentialsImpl +} from "./operations"; +import { + ActionRequestsOperations, + ChatSessions, + ChatSession, + CustomImages, + ImageDefinitions, + VHDs, + DraftPackages, + FreeHourBalances, + Skus, + TestBaseAccounts, + Usage, + AvailableOS, + FeatureUpdateSupportedOses, + FlightingRings, + FirstPartyApps, + GalleryApps, + GalleryAppSkus, + TestTypes, + Packages, + TestSummaries, + TestResults, + OSUpdates, + FavoriteProcesses, + AnalysisResults, + EmailEvents, + CustomerEvents, + Operations, + BillingHubService, + AvailableInplaceUpgradeOS, + Credential, + Credentials +} from "./operationsInterfaces"; +import { TestBaseOptionalParams } from "./models"; + +export class TestBase extends coreClient.ServiceClient { + $host: string; + subscriptionId: string; + apiVersion: string; + + /** + * Initializes a new instance of the TestBase class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: TestBaseOptionalParams + ) { + 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: TestBaseOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-testbase/1.0.0-beta.1`; + 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 || "2023-11-01-preview"; + this.actionRequestsOperations = new ActionRequestsOperationsImpl(this); + this.chatSessions = new ChatSessionsImpl(this); + this.chatSession = new ChatSessionImpl(this); + this.customImages = new CustomImagesImpl(this); + this.imageDefinitions = new ImageDefinitionsImpl(this); + this.vHDs = new VHDsImpl(this); + this.draftPackages = new DraftPackagesImpl(this); + this.freeHourBalances = new FreeHourBalancesImpl(this); + this.skus = new SkusImpl(this); + this.testBaseAccounts = new TestBaseAccountsImpl(this); + this.usage = new UsageImpl(this); + this.availableOS = new AvailableOSImpl(this); + this.featureUpdateSupportedOses = new FeatureUpdateSupportedOsesImpl(this); + this.flightingRings = new FlightingRingsImpl(this); + this.firstPartyApps = new FirstPartyAppsImpl(this); + this.galleryApps = new GalleryAppsImpl(this); + this.galleryAppSkus = new GalleryAppSkusImpl(this); + this.testTypes = new TestTypesImpl(this); + this.packages = new PackagesImpl(this); + this.testSummaries = new TestSummariesImpl(this); + this.testResults = new TestResultsImpl(this); + this.oSUpdates = new OSUpdatesImpl(this); + this.favoriteProcesses = new FavoriteProcessesImpl(this); + this.analysisResults = new AnalysisResultsImpl(this); + this.emailEvents = new EmailEventsImpl(this); + this.customerEvents = new CustomerEventsImpl(this); + this.operations = new OperationsImpl(this); + this.billingHubService = new BillingHubServiceImpl(this); + this.availableInplaceUpgradeOS = new AvailableInplaceUpgradeOSImpl(this); + this.credential = new CredentialImpl(this); + this.credentials = new CredentialsImpl(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); + } + + actionRequestsOperations: ActionRequestsOperations; + chatSessions: ChatSessions; + chatSession: ChatSession; + customImages: CustomImages; + imageDefinitions: ImageDefinitions; + vHDs: VHDs; + draftPackages: DraftPackages; + freeHourBalances: FreeHourBalances; + skus: Skus; + testBaseAccounts: TestBaseAccounts; + usage: Usage; + availableOS: AvailableOS; + featureUpdateSupportedOses: FeatureUpdateSupportedOses; + flightingRings: FlightingRings; + firstPartyApps: FirstPartyApps; + galleryApps: GalleryApps; + galleryAppSkus: GalleryAppSkus; + testTypes: TestTypes; + packages: Packages; + testSummaries: TestSummaries; + testResults: TestResults; + oSUpdates: OSUpdates; + favoriteProcesses: FavoriteProcesses; + analysisResults: AnalysisResults; + emailEvents: EmailEvents; + customerEvents: CustomerEvents; + operations: Operations; + billingHubService: BillingHubService; + availableInplaceUpgradeOS: AvailableInplaceUpgradeOS; + credential: Credential; + credentials: Credentials; +} diff --git a/sdk/testbase/arm-testbase/test/sampleTest.ts b/sdk/testbase/arm-testbase/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/testbase/arm-testbase/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +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 +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/testbase/arm-testbase/tsconfig.json b/sdk/testbase/arm-testbase/tsconfig.json new file mode 100644 index 000000000000..3e6ae96443f3 --- /dev/null +++ b/sdk/testbase/arm-testbase/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6", + "dom" + ], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/testbase/ci.mgmt.yml b/sdk/testbase/ci.mgmt.yml new file mode 100644 index 000000000000..c70c71923e7d --- /dev/null +++ b/sdk/testbase/ci.mgmt.yml @@ -0,0 +1,38 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/testbase/arm-testbase + - sdk/testbase/ci.mgmt.yml + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/testbase/arm-testbase + - sdk/testbase/ci.mgmt.yml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: testbase + Artifacts: + - name: azure-arm-testbase + safeName: azurearmtestbase + \ No newline at end of file