diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 0fd36f8f2f13..44c4ffc2a102 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -13,6 +13,7 @@ specifiers: '@rush-temp/arm-analysisservices': file:./projects/arm-analysisservices.tgz '@rush-temp/arm-apimanagement': file:./projects/arm-apimanagement.tgz '@rush-temp/arm-appconfiguration': file:./projects/arm-appconfiguration.tgz + '@rush-temp/arm-appinsights': file:./projects/arm-appinsights.tgz '@rush-temp/arm-appplatform': file:./projects/arm-appplatform.tgz '@rush-temp/arm-appservice': file:./projects/arm-appservice.tgz '@rush-temp/arm-attestation': file:./projects/arm-attestation.tgz @@ -253,6 +254,7 @@ dependencies: '@rush-temp/arm-analysisservices': file:projects/arm-analysisservices.tgz '@rush-temp/arm-apimanagement': file:projects/arm-apimanagement.tgz '@rush-temp/arm-appconfiguration': file:projects/arm-appconfiguration.tgz + '@rush-temp/arm-appinsights': file:projects/arm-appinsights.tgz '@rush-temp/arm-appplatform': file:projects/arm-appplatform.tgz '@rush-temp/arm-appservice': file:projects/arm-appservice.tgz '@rush-temp/arm-attestation': file:projects/arm-attestation.tgz @@ -8788,6 +8790,31 @@ packages: - supports-color dev: false + file:projects/arm-appinsights.tgz: + resolution: {integrity: sha512-OEmWtZsHkEl0cpiZbyVe2HbTiQyCtxHjT/2KZj6S13Tqt4Qi66SuCCPo5RrbGA+LfrZOdy4TTHnMCqTUb96A1w==, tarball: file:projects/arm-appinsights.tgz} + name: '@rush-temp/arm-appinsights' + version: 0.0.0 + dependencies: + '@azure-tools/test-recorder': 1.0.2 + '@microsoft/api-extractor': 7.19.4 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + tslib: 2.3.1 + typescript: 4.2.4 + uglify-js: 3.14.5 + transitivePeerDependencies: + - encoding + - supports-color + dev: false + file:projects/arm-appplatform.tgz: resolution: {integrity: sha512-4ViCtaJaq0hg3Ed7lIB7V1EWyRJiGk1Xifc8SHCQTUzizQm2Ke36e635M0aEuH4oUBo+XhirXJKMuNOfiaa0RQ==, tarball: file:projects/arm-appplatform.tgz} name: '@rush-temp/arm-appplatform' diff --git a/rush.json b/rush.json index 80c79857e4f7..7d5dde91cc6b 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. @@ -1509,6 +1509,11 @@ "packageName": "@azure/arm-resourcegraph", "projectFolder": "sdk/resourcegraph/arm-resourcegraph", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-appinsights", + "projectFolder": "sdk/applicationinsights/arm-appinsights", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/applicationinsights/arm-appinsights/CHANGELOG.md b/sdk/applicationinsights/arm-appinsights/CHANGELOG.md new file mode 100644 index 000000000000..62470a621563 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 5.0.0-beta.1 (2022-01-21) + +The package of @azure/arm-appinsights is using our next generation design principles since version 5.0.0-beta.1, which contains breaking changes. + +To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/applicationinsights/arm-appinsights/LICENSE b/sdk/applicationinsights/arm-appinsights/LICENSE new file mode 100644 index 000000000000..5d1d36e0af80 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/applicationinsights/arm-appinsights/README.md b/sdk/applicationinsights/arm-appinsights/README.md index 4b865a5e2981..68ba5ff919df 100644 --- a/sdk/applicationinsights/arm-appinsights/README.md +++ b/sdk/applicationinsights/arm-appinsights/README.md @@ -1,109 +1,98 @@ -## Azure ApplicationInsightsManagementClient SDK for JavaScript +# Azure ApplicationInsightsManagement client library for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ApplicationInsightsManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ApplicationInsightsManagement client. + +Composite Swagger for Application Insights Management Client + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/applicationinsights/arm-appinsights) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-appinsights) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-appinsights?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://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites -You must have an [Azure subscription](https://azure.microsoft.com/free/). +- An [Azure subscription][azure_sub]. -### How to install +### Install the `@azure/arm-appinsights` package -To use this SDK in your project, you will need to install two packages. -- `@azure/arm-appinsights` that contains the client. -- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. +Install the Azure ApplicationInsightsManagement client library for JavaScript with `npm`: -Install both packages using the below command: ```bash -npm install --save @azure/arm-appinsights @azure/identity +npm install @azure/arm-appinsights ``` -> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. -If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. +### Create and authenticate a `ApplicationInsightsManagementClient` -### How to use +To create a client object to access the Azure ApplicationInsightsManagement API, you will need the `endpoint` of your Azure ApplicationInsightsManagement resource and a `credential`. The Azure ApplicationInsightsManagement client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure ApplicationInsightsManagement resource in the [Azure Portal][azure_portal]. -- If you are writing a client side browser application, - - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. - - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. -- If you are writing a server side application, - - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) - - Complete the set up steps required by the credential if any. - - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. +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). -In the below samples, we pass the credential and the Azure subscription id to instantiate the client. -Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +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 +``` -#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. +You will also need to **register a new AAD application and grant access to Azure ApplicationInsightsManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. -##### Sample code +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). ```javascript -const { DefaultAzureCredential } = require("@azure/identity"); const { ApplicationInsightsManagementClient } = require("@azure/arm-appinsights"); -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples -// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. -const creds = new DefaultAzureCredential(); -const client = new ApplicationInsightsManagementClient(creds, subscriptionId); - -client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); -}).catch((err) => { - console.log("An error occurred:"); - console.error(err); -}); +const { DefaultAzureCredential } = require("@azure/identity"); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new ApplicationInsightsManagementClient(new DefaultAzureCredential(), subscriptionId); ``` -#### browser - Authentication, client creation, and list operations as an example written in JavaScript. - -In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. - - Note down the client Id from the previous step and use it in the browser sample below. - -##### Sample code - -- index.html - -```html - - - - @azure/arm-appinsights sample - - - - - - - + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### ApplicationInsightsManagementClient + +`ApplicationInsightsManagementClient` is the primary interface for developers using the Azure ApplicationInsightsManagement client library. Explore the methods on this client object to understand the different features of the Azure ApplicationInsightsManagement service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); ``` +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + ## Related projects -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fapplicationinsights%2Farm-appinsights%2FREADME.png) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/applicationinsights/arm-appinsights/README.png) +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/applicationinsights/arm-appinsights/_meta.json b/sdk/applicationinsights/arm-appinsights/_meta.json new file mode 100644 index 000000000000..8fd8fee986cd --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "e88a7008354fa35cdb3c551d6c7f9eb6b1e21db0", + "readme": "specification/applicationinsights/resource-manager/readme.md", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/applicationinsights/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" +} \ No newline at end of file diff --git a/sdk/applicationinsights/arm-appinsights/api-extractor.json b/sdk/applicationinsights/arm-appinsights/api-extractor.json new file mode 100644 index 000000000000..c1199353e8d1 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/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-appinsights.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/applicationinsights/arm-appinsights/package.json b/sdk/applicationinsights/arm-appinsights/package.json index 86aa24dbac0b..18514838d378 100644 --- a/sdk/applicationinsights/arm-appinsights/package.json +++ b/sdk/applicationinsights/arm-appinsights/package.json @@ -1,13 +1,18 @@ { "name": "@azure/arm-appinsights", + "sdk-type": "mgmt", "author": "Microsoft Corporation", - "description": "ApplicationInsightsManagementClient Library with typescript type definitions for node.js and browser.", - "version": "3.1.0", + "description": "A generated SDK for ApplicationInsightsManagementClient.", + "version": "5.0.0-beta.1", + "engines": { + "node": ">=12.0.0" + }, "dependencies": { - "@azure/ms-rest-azure-js": "^2.1.0", - "@azure/ms-rest-js": "^2.2.0", - "@azure/core-auth": "^1.1.4", - "tslib": "^1.10.0" + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.1.0", + "tslib": "^2.2.0" }, "keywords": [ "node", @@ -17,15 +22,25 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/arm-appinsights.js", - "module": "./esm/applicationInsightsManagementClient.js", - "types": "./esm/applicationInsightsManagementClient.d.ts", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-appinsights.d.ts", "devDependencies": { - "typescript": "^3.6.0", - "rollup": "^1.18.0", - "rollup-plugin-node-resolve": "^5.2.0", + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "mkdirp": "^1.0.4", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.6.0" + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/applicationinsights/arm-appinsights", "repository": { @@ -40,20 +55,46 @@ "dist/**/*.js.map", "dist/**/*.d.ts", "dist/**/*.d.ts.map", - "esm/**/*.js", - "esm/**/*.js.map", - "esm/**/*.d.ts", - "esm/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", "src/**/*.ts", "README.md", + "LICENSE", "rollup.config.js", - "tsconfig.json" + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" ], "scripts": { - "build": "tsc && rollup -c rollup.config.js && npm run minify", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-appinsights.js.map'\" -o ./dist/arm-appinsights.min.js ./dist/arm-appinsights.js", - "prepack": "npm install && npm run build" + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/applicationinsights/arm-appinsights/review/arm-appinsights.api.md b/sdk/applicationinsights/arm-appinsights/review/arm-appinsights.api.md new file mode 100644 index 000000000000..0fbff25500c8 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/review/arm-appinsights.api.md @@ -0,0 +1,1776 @@ +## API Report File for "@azure/arm-appinsights" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; + +// @public +export interface AnalyticsItems { + delete(resourceGroupName: string, resourceName: string, scopePath: ItemScopePath, options?: AnalyticsItemsDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, scopePath: ItemScopePath, options?: AnalyticsItemsGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, scopePath: ItemScopePath, options?: AnalyticsItemsListOptionalParams): Promise; + put(resourceGroupName: string, resourceName: string, scopePath: ItemScopePath, itemProperties: ApplicationInsightsComponentAnalyticsItem, options?: AnalyticsItemsPutOptionalParams): Promise; +} + +// @public +export interface AnalyticsItemsDeleteOptionalParams extends coreClient.OperationOptions { + id?: string; + name?: string; +} + +// @public +export interface AnalyticsItemsGetOptionalParams extends coreClient.OperationOptions { + id?: string; + name?: string; +} + +// @public +export type AnalyticsItemsGetResponse = ApplicationInsightsComponentAnalyticsItem; + +// @public +export interface AnalyticsItemsListOptionalParams extends coreClient.OperationOptions { + includeContent?: boolean; + scope?: ItemScope; + typeParam?: ItemTypeParameter; +} + +// @public +export type AnalyticsItemsListResponse = ApplicationInsightsComponentAnalyticsItem[]; + +// @public +export interface AnalyticsItemsPutOptionalParams extends coreClient.OperationOptions { + overrideItem?: boolean; +} + +// @public +export type AnalyticsItemsPutResponse = ApplicationInsightsComponentAnalyticsItem; + +// @public +export interface Annotation { + annotationName?: string; + category?: string; + eventTime?: Date; + id?: string; + properties?: string; + relatedAnnotation?: string; +} + +// @public +export interface AnnotationError { + code?: string; + innererror?: InnerError; + message?: string; +} + +// @public +export interface Annotations { + create(resourceGroupName: string, resourceName: string, annotationProperties: Annotation, options?: AnnotationsCreateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, annotationId: string, options?: AnnotationsDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, annotationId: string, options?: AnnotationsGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, start: string, end: string, options?: AnnotationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AnnotationsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AnnotationsCreateResponse = Annotation[]; + +// @public +export interface AnnotationsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface AnnotationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AnnotationsGetResponse = Annotation[]; + +// @public +export interface AnnotationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AnnotationsListResponse = AnnotationsListResult; + +// @public +export interface AnnotationsListResult { + readonly value?: Annotation[]; +} + +// @public +export interface APIKeyRequest { + linkedReadProperties?: string[]; + linkedWriteProperties?: string[]; + name?: string; +} + +// @public +export interface APIKeys { + create(resourceGroupName: string, resourceName: string, aPIKeyProperties: APIKeyRequest, options?: APIKeysCreateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, keyId: string, options?: APIKeysDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, keyId: string, options?: APIKeysGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, options?: APIKeysListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface APIKeysCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type APIKeysCreateResponse = ApplicationInsightsComponentAPIKey; + +// @public +export interface APIKeysDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type APIKeysDeleteResponse = ApplicationInsightsComponentAPIKey; + +// @public +export interface APIKeysGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type APIKeysGetResponse = ApplicationInsightsComponentAPIKey; + +// @public +export interface APIKeysListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type APIKeysListResponse = ApplicationInsightsComponentAPIKeyListResult; + +// @public +export type ApplicationInsightsComponent = ComponentsResource & { + kind: string; + etag?: string; + readonly applicationId?: string; + readonly appId?: string; + readonly namePropertiesName?: string; + applicationType?: ApplicationType; + flowType?: FlowType; + requestSource?: RequestSource; + readonly instrumentationKey?: string; + readonly creationDate?: Date; + readonly tenantId?: string; + hockeyAppId?: string; + readonly hockeyAppToken?: string; + readonly provisioningState?: string; + samplingPercentage?: number; + readonly connectionString?: string; + retentionInDays?: number; + disableIpMasking?: boolean; + immediatePurgeDataOn30Days?: boolean; + workspaceResourceId?: string; + readonly laMigrationDate?: Date; + readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; + publicNetworkAccessForIngestion?: PublicNetworkAccessType; + publicNetworkAccessForQuery?: PublicNetworkAccessType; + ingestionMode?: IngestionMode; + disableLocalAuth?: boolean; + forceCustomerStorageForProfiler?: boolean; +}; + +// @public +export interface ApplicationInsightsComponentAnalyticsItem { + content?: string; + id?: string; + name?: string; + properties?: ApplicationInsightsComponentAnalyticsItemProperties; + scope?: ItemScope; + readonly timeCreated?: string; + readonly timeModified?: string; + type?: ItemType; + readonly version?: string; +} + +// @public +export interface ApplicationInsightsComponentAnalyticsItemProperties { + functionAlias?: string; +} + +// @public +export interface ApplicationInsightsComponentAPIKey { + readonly apiKey?: string; + createdDate?: string; + readonly id?: string; + linkedReadProperties?: string[]; + linkedWriteProperties?: string[]; + name?: string; +} + +// @public +export interface ApplicationInsightsComponentAPIKeyListResult { + value: ApplicationInsightsComponentAPIKey[]; +} + +// @public +export interface ApplicationInsightsComponentAvailableFeatures { + readonly result?: ApplicationInsightsComponentFeature[]; +} + +// @public +export interface ApplicationInsightsComponentBillingFeatures { + currentBillingFeatures?: string[]; + dataVolumeCap?: ApplicationInsightsComponentDataVolumeCap; +} + +// @public +export interface ApplicationInsightsComponentDataVolumeCap { + cap?: number; + readonly maxHistoryCap?: number; + readonly resetTime?: number; + stopSendNotificationWhenHitCap?: boolean; + stopSendNotificationWhenHitThreshold?: boolean; + warningThreshold?: number; +} + +// @public +export interface ApplicationInsightsComponentExportConfiguration { + readonly applicationName?: string; + readonly containerName?: string; + readonly destinationAccountId?: string; + readonly destinationStorageLocationId?: string; + readonly destinationStorageSubscriptionId?: string; + readonly destinationType?: string; + readonly exportId?: string; + readonly exportStatus?: string; + readonly instrumentationKey?: string; + readonly isUserEnabled?: string; + readonly lastGapTime?: string; + readonly lastSuccessTime?: string; + readonly lastUserUpdate?: string; + notificationQueueEnabled?: string; + readonly permanentErrorReason?: string; + recordTypes?: string; + readonly resourceGroup?: string; + readonly storageName?: string; + readonly subscriptionId?: string; +} + +// @public +export interface ApplicationInsightsComponentExportRequest { + destinationAccountId?: string; + destinationAddress?: string; + destinationStorageLocationId?: string; + destinationStorageSubscriptionId?: string; + destinationType?: string; + isEnabled?: string; + notificationQueueEnabled?: string; + notificationQueueUri?: string; + recordTypes?: string; +} + +// @public +export interface ApplicationInsightsComponentFavorite { + category?: string; + config?: string; + readonly favoriteId?: string; + favoriteType?: FavoriteType; + isGeneratedFromTemplate?: boolean; + name?: string; + sourceType?: string; + tags?: string[]; + readonly timeModified?: string; + readonly userId?: string; + version?: string; +} + +// @public +export interface ApplicationInsightsComponentFeature { + readonly capabilities?: ApplicationInsightsComponentFeatureCapability[]; + readonly featureName?: string; + readonly isHidden?: boolean; + readonly isMainFeature?: boolean; + readonly meterId?: string; + readonly meterRateFrequency?: string; + readonly resouceId?: string; + readonly supportedAddonFeatures?: string; + readonly title?: string; +} + +// @public +export interface ApplicationInsightsComponentFeatureCapabilities { + readonly analyticsIntegration?: boolean; + readonly apiAccessLevel?: string; + readonly applicationMap?: boolean; + readonly burstThrottlePolicy?: string; + readonly dailyCap?: number; + readonly dailyCapResetTime?: number; + readonly liveStreamMetrics?: boolean; + readonly metadataClass?: string; + readonly multipleStepWebTest?: boolean; + readonly openSchema?: boolean; + readonly powerBIIntegration?: boolean; + readonly proactiveDetection?: boolean; + readonly supportExportData?: boolean; + readonly throttleRate?: number; + readonly trackingType?: string; + readonly workItemIntegration?: boolean; +} + +// @public +export interface ApplicationInsightsComponentFeatureCapability { + readonly description?: string; + readonly meterId?: string; + readonly meterRateFrequency?: string; + readonly name?: string; + readonly unit?: string; + readonly value?: string; +} + +// @public +export interface ApplicationInsightsComponentListResult { + nextLink?: string; + value: ApplicationInsightsComponent[]; +} + +// @public +export interface ApplicationInsightsComponentProactiveDetectionConfiguration { + customEmails?: string[]; + enabled?: boolean; + lastUpdatedTime?: string; + name?: string; + ruleDefinitions?: ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; + sendEmailsToSubscriptionOwners?: boolean; +} + +// @public +export interface ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions { + description?: string; + displayName?: string; + helpUrl?: string; + isEnabledByDefault?: boolean; + isHidden?: boolean; + isInPreview?: boolean; + name?: string; + supportsEmailNotifications?: boolean; +} + +// @public +export interface ApplicationInsightsComponentQuotaStatus { + readonly appId?: string; + readonly expirationTime?: string; + readonly shouldBeThrottled?: boolean; +} + +// @public +export interface ApplicationInsightsComponentWebTestLocation { + readonly displayName?: string; + readonly tag?: string; +} + +// @public (undocumented) +export class ApplicationInsightsManagementClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ApplicationInsightsManagementClientOptionalParams); + // (undocumented) + analyticsItems: AnalyticsItems; + // (undocumented) + annotations: Annotations; + // (undocumented) + aPIKeys: APIKeys; + // (undocumented) + componentAvailableFeatures: ComponentAvailableFeatures; + // (undocumented) + componentCurrentBillingFeatures: ComponentCurrentBillingFeatures; + // (undocumented) + componentFeatureCapabilities: ComponentFeatureCapabilities; + // (undocumented) + componentLinkedStorageAccountsOperations: ComponentLinkedStorageAccountsOperations; + // (undocumented) + componentQuotaStatus: ComponentQuotaStatus; + // (undocumented) + components: Components; + // (undocumented) + exportConfigurations: ExportConfigurations; + // (undocumented) + favorites: Favorites; + // (undocumented) + liveToken: LiveToken; + // (undocumented) + myWorkbooks: MyWorkbooks; + // (undocumented) + proactiveDetectionConfigurations: ProactiveDetectionConfigurations; + // (undocumented) + subscriptionId: string; + // (undocumented) + webTestLocations: WebTestLocations; + // (undocumented) + webTests: WebTests; + // (undocumented) + workbooks: Workbooks; + // (undocumented) + workbookTemplates: WorkbookTemplates; + // (undocumented) + workItemConfigurations: WorkItemConfigurations; +} + +// @public +export interface ApplicationInsightsManagementClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + endpoint?: string; +} + +// @public +export interface ApplicationInsightsWebTestLocationsListResult { + value: ApplicationInsightsComponentWebTestLocation[]; +} + +// @public +export type ApplicationType = string; + +// @public +export type CategoryType = string; + +// @public +export interface ComponentAvailableFeatures { + get(resourceGroupName: string, resourceName: string, options?: ComponentAvailableFeaturesGetOptionalParams): Promise; +} + +// @public +export interface ComponentAvailableFeaturesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentAvailableFeaturesGetResponse = ApplicationInsightsComponentAvailableFeatures; + +// @public +export interface ComponentCurrentBillingFeatures { + get(resourceGroupName: string, resourceName: string, options?: ComponentCurrentBillingFeaturesGetOptionalParams): Promise; + update(resourceGroupName: string, resourceName: string, billingFeaturesProperties: ApplicationInsightsComponentBillingFeatures, options?: ComponentCurrentBillingFeaturesUpdateOptionalParams): Promise; +} + +// @public +export interface ComponentCurrentBillingFeaturesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentCurrentBillingFeaturesGetResponse = ApplicationInsightsComponentBillingFeatures; + +// @public +export interface ComponentCurrentBillingFeaturesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentCurrentBillingFeaturesUpdateResponse = ApplicationInsightsComponentBillingFeatures; + +// @public +export interface ComponentFeatureCapabilities { + get(resourceGroupName: string, resourceName: string, options?: ComponentFeatureCapabilitiesGetOptionalParams): Promise; +} + +// @public +export interface ComponentFeatureCapabilitiesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentFeatureCapabilitiesGetResponse = ApplicationInsightsComponentFeatureCapabilities; + +// @public +export type ComponentLinkedStorageAccounts = ProxyResource & { + linkedStorageAccount?: string; +}; + +// @public +export interface ComponentLinkedStorageAccountsCreateAndUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentLinkedStorageAccountsCreateAndUpdateResponse = ComponentLinkedStorageAccounts; + +// @public +export interface ComponentLinkedStorageAccountsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ComponentLinkedStorageAccountsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentLinkedStorageAccountsGetResponse = ComponentLinkedStorageAccounts; + +// @public +export interface ComponentLinkedStorageAccountsOperations { + createAndUpdate(resourceGroupName: string, resourceName: string, storageType: StorageType, linkedStorageAccountsProperties: ComponentLinkedStorageAccounts, options?: ComponentLinkedStorageAccountsCreateAndUpdateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, storageType: StorageType, options?: ComponentLinkedStorageAccountsDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, storageType: StorageType, options?: ComponentLinkedStorageAccountsGetOptionalParams): Promise; + update(resourceGroupName: string, resourceName: string, storageType: StorageType, linkedStorageAccountsProperties: ComponentLinkedStorageAccountsPatch, options?: ComponentLinkedStorageAccountsUpdateOptionalParams): Promise; +} + +// @public +export interface ComponentLinkedStorageAccountsPatch { + linkedStorageAccount?: string; +} + +// @public +export interface ComponentLinkedStorageAccountsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentLinkedStorageAccountsUpdateResponse = ComponentLinkedStorageAccounts; + +// @public +export interface ComponentPurgeBody { + filters: ComponentPurgeBodyFilters[]; + table: string; +} + +// @public +export interface ComponentPurgeBodyFilters { + column?: string; + key?: string; + operator?: string; + value?: any; +} + +// @public +export interface ComponentPurgeResponse { + operationId: string; +} + +// @public +export interface ComponentPurgeStatusResponse { + status: PurgeState; +} + +// @public +export interface ComponentQuotaStatus { + get(resourceGroupName: string, resourceName: string, options?: ComponentQuotaStatusGetOptionalParams): Promise; +} + +// @public +export interface ComponentQuotaStatusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentQuotaStatusGetResponse = ApplicationInsightsComponentQuotaStatus; + +// @public +export interface Components { + createOrUpdate(resourceGroupName: string, resourceName: string, insightProperties: ApplicationInsightsComponent, options?: ComponentsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, options?: ComponentsDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: ComponentsGetOptionalParams): Promise; + getPurgeStatus(resourceGroupName: string, resourceName: string, purgeId: string, options?: ComponentsGetPurgeStatusOptionalParams): Promise; + list(options?: ComponentsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: ComponentsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + purge(resourceGroupName: string, resourceName: string, body: ComponentPurgeBody, options?: ComponentsPurgeOptionalParams): Promise; + updateTags(resourceGroupName: string, resourceName: string, componentTags: TagsResource, options?: ComponentsUpdateTagsOptionalParams): Promise; +} + +// @public +export interface ComponentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentsCreateOrUpdateResponse = ApplicationInsightsComponent; + +// @public +export interface ComponentsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ComponentsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ComponentsGetPurgeStatusOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentsGetPurgeStatusResponse = ComponentPurgeStatusResponse; + +// @public +export type ComponentsGetResponse = ApplicationInsightsComponent; + +// @public +export interface ComponentsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentsListByResourceGroupNextResponse = ApplicationInsightsComponentListResult; + +// @public +export interface ComponentsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentsListByResourceGroupResponse = ApplicationInsightsComponentListResult; + +// @public +export interface ComponentsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentsListNextResponse = ApplicationInsightsComponentListResult; + +// @public +export interface ComponentsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentsListResponse = ApplicationInsightsComponentListResult; + +// @public +export interface ComponentsPurgeOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentsPurgeResponse = ComponentPurgeResponse; + +// @public +export interface ComponentsResource { + readonly id?: string; + location: string; + readonly name?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface ComponentsUpdateTagsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ComponentsUpdateTagsResponse = ApplicationInsightsComponent; + +// @public +export type CreatedByType = string; + +// @public +export interface ErrorDefinition { + readonly code?: string; + readonly innererror?: any; + readonly message?: string; +} + +// @public +export interface ErrorResponse { + code?: string; + message?: string; +} + +// @public (undocumented) +export interface ErrorResponseComponents { + error?: ErrorResponseComponentsError; +} + +// @public +export interface ErrorResponseComponentsError { + readonly code?: string; + readonly message?: string; +} + +// @public (undocumented) +export interface ErrorResponseLinkedStorage { + error?: ErrorResponseLinkedStorageError; +} + +// @public +export interface ErrorResponseLinkedStorageError { + readonly code?: string; + readonly message?: string; +} + +// @public +export interface ExportConfigurations { + create(resourceGroupName: string, resourceName: string, exportProperties: ApplicationInsightsComponentExportRequest, options?: ExportConfigurationsCreateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, exportId: string, options?: ExportConfigurationsDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, exportId: string, options?: ExportConfigurationsGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, options?: ExportConfigurationsListOptionalParams): Promise; + update(resourceGroupName: string, resourceName: string, exportId: string, exportProperties: ApplicationInsightsComponentExportRequest, options?: ExportConfigurationsUpdateOptionalParams): Promise; +} + +// @public +export interface ExportConfigurationsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExportConfigurationsCreateResponse = ApplicationInsightsComponentExportConfiguration[]; + +// @public +export interface ExportConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExportConfigurationsDeleteResponse = ApplicationInsightsComponentExportConfiguration; + +// @public +export interface ExportConfigurationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExportConfigurationsGetResponse = ApplicationInsightsComponentExportConfiguration; + +// @public +export interface ExportConfigurationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExportConfigurationsListResponse = ApplicationInsightsComponentExportConfiguration[]; + +// @public +export interface ExportConfigurationsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExportConfigurationsUpdateResponse = ApplicationInsightsComponentExportConfiguration; + +// @public +export interface Favorites { + add(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: ApplicationInsightsComponentFavorite, options?: FavoritesAddOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, favoriteId: string, options?: FavoritesDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, favoriteId: string, options?: FavoritesGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, options?: FavoritesListOptionalParams): Promise; + update(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: ApplicationInsightsComponentFavorite, options?: FavoritesUpdateOptionalParams): Promise; +} + +// @public +export interface FavoritesAddOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FavoritesAddResponse = ApplicationInsightsComponentFavorite; + +// @public +export interface FavoritesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface FavoritesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FavoritesGetResponse = ApplicationInsightsComponentFavorite; + +// @public +export interface FavoritesListOptionalParams extends coreClient.OperationOptions { + canFetchContent?: boolean; + favoriteType?: FavoriteType; + sourceType?: FavoriteSourceType; + tags?: string[]; +} + +// @public +export type FavoritesListResponse = ApplicationInsightsComponentFavorite[]; + +// @public +export type FavoriteSourceType = string; + +// @public +export interface FavoritesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FavoritesUpdateResponse = ApplicationInsightsComponentFavorite; + +// @public +export type FavoriteType = "shared" | "user"; + +// @public +export type FlowType = string; + +// @public +export type IngestionMode = string; + +// @public +export interface InnerError { + diagnosticcontext?: string; + time?: Date; +} + +// @public +export interface InnerErrorTrace { + readonly trace?: string[]; +} + +// @public +export type ItemScope = string; + +// @public +export type ItemScopePath = string; + +// @public +export type ItemType = string; + +// @public +export type ItemTypeParameter = string; + +// @public +export type Kind = string; + +// @public +export enum KnownApplicationType { + // (undocumented) + Other = "other", + // (undocumented) + Web = "web" +} + +// @public +export enum KnownCategoryType { + // (undocumented) + Performance = "performance", + // (undocumented) + Retention = "retention", + // (undocumented) + TSG = "TSG", + // (undocumented) + Workbook = "workbook" +} + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownFavoriteSourceType { + // (undocumented) + Events = "events", + // (undocumented) + Funnel = "funnel", + // (undocumented) + Impact = "impact", + // (undocumented) + Notebook = "notebook", + // (undocumented) + Retention = "retention", + // (undocumented) + Segmentation = "segmentation", + // (undocumented) + Sessions = "sessions", + // (undocumented) + Userflows = "userflows" +} + +// @public +export enum KnownFlowType { + // (undocumented) + Bluefield = "Bluefield" +} + +// @public +export enum KnownIngestionMode { + // (undocumented) + ApplicationInsights = "ApplicationInsights", + // (undocumented) + ApplicationInsightsWithDiagnosticSettings = "ApplicationInsightsWithDiagnosticSettings", + // (undocumented) + LogAnalytics = "LogAnalytics" +} + +// @public +export enum KnownItemScope { + // (undocumented) + Shared = "shared", + // (undocumented) + User = "user" +} + +// @public +export enum KnownItemScopePath { + // (undocumented) + AnalyticsItems = "analyticsItems", + // (undocumented) + MyanalyticsItems = "myanalyticsItems" +} + +// @public +export enum KnownItemType { + // (undocumented) + Function = "function", + // (undocumented) + None = "none", + // (undocumented) + Query = "query", + // (undocumented) + Recent = "recent" +} + +// @public +export enum KnownItemTypeParameter { + // (undocumented) + Folder = "folder", + // (undocumented) + Function = "function", + // (undocumented) + None = "none", + // (undocumented) + Query = "query", + // (undocumented) + Recent = "recent" +} + +// @public +export enum KnownKind { + // (undocumented) + Shared = "shared", + // (undocumented) + User = "user" +} + +// @public +export enum KnownManagedServiceIdentityType { + // (undocumented) + None = "None", + // (undocumented) + SystemAssigned = "SystemAssigned", + // (undocumented) + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", + // (undocumented) + UserAssigned = "UserAssigned" +} + +// @public +export enum KnownMyWorkbookManagedIdentityType { + // (undocumented) + None = "None", + // (undocumented) + UserAssigned = "UserAssigned" +} + +// @public +export enum KnownPublicNetworkAccessType { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownPurgeState { + // (undocumented) + Completed = "completed", + // (undocumented) + Pending = "pending" +} + +// @public +export enum KnownRequestSource { + // (undocumented) + Rest = "rest" +} + +// @public +export enum KnownSharedTypeKind { + // (undocumented) + Shared = "shared", + // (undocumented) + User = "user" +} + +// @public +export enum KnownStorageType { + // (undocumented) + ServiceProfiler = "ServiceProfiler" +} + +// @public +export interface LiveToken { + get(resourceUri: string, options?: LiveTokenGetOptionalParams): Promise; +} + +// @public +export interface LiveTokenGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LiveTokenGetResponse = LiveTokenResponse; + +// @public +export interface LiveTokenResponse { + readonly liveToken?: string; +} + +// @public +export interface ManagedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity; + }; +} + +// @public +export type ManagedServiceIdentityType = string; + +// @public +export type MyWorkbook = MyWorkbookResource & { + kind?: Kind; + readonly systemData?: SystemData; + displayName?: string; + serializedData?: string; + version?: string; + readonly timeModified?: string; + category?: string; + tagsPropertiesTags?: string[]; + readonly userId?: string; + sourceId?: string; + storageUri?: string; +}; + +// @public +export interface MyWorkbookError { + error?: ErrorDefinition; +} + +// @public +export interface MyWorkbookManagedIdentity { + type?: MyWorkbookManagedIdentityType; + userAssignedIdentities?: MyWorkbookUserAssignedIdentities; +} + +// @public +export type MyWorkbookManagedIdentityType = string; + +// @public +export interface MyWorkbookResource { + etag?: { + [propertyName: string]: string; + }; + id?: string; + identity?: MyWorkbookManagedIdentity; + location?: string; + name?: string; + tags?: { + [propertyName: string]: string; + }; + type?: string; +} + +// @public +export interface MyWorkbooks { + createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: MyWorkbook, options?: MyWorkbooksCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, options?: MyWorkbooksDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: MyWorkbooksGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, category: CategoryType, options?: MyWorkbooksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(category: CategoryType, options?: MyWorkbooksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, resourceName: string, workbookProperties: MyWorkbook, options?: MyWorkbooksUpdateOptionalParams): Promise; +} + +// @public +export interface MyWorkbooksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + sourceId?: string; +} + +// @public +export type MyWorkbooksCreateOrUpdateResponse = MyWorkbook; + +// @public +export interface MyWorkbooksDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface MyWorkbooksGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MyWorkbooksGetResponse = MyWorkbook; + +// @public +export interface MyWorkbooksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { + canFetchContent?: boolean; + sourceId?: string; + tags?: string[]; +} + +// @public +export type MyWorkbooksListByResourceGroupNextResponse = MyWorkbooksListResult; + +// @public +export interface MyWorkbooksListByResourceGroupOptionalParams extends coreClient.OperationOptions { + canFetchContent?: boolean; + sourceId?: string; + tags?: string[]; +} + +// @public +export type MyWorkbooksListByResourceGroupResponse = MyWorkbooksListResult; + +// @public +export interface MyWorkbooksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { + canFetchContent?: boolean; + tags?: string[]; +} + +// @public +export type MyWorkbooksListBySubscriptionNextResponse = MyWorkbooksListResult; + +// @public +export interface MyWorkbooksListBySubscriptionOptionalParams extends coreClient.OperationOptions { + canFetchContent?: boolean; + tags?: string[]; +} + +// @public +export type MyWorkbooksListBySubscriptionResponse = MyWorkbooksListResult; + +// @public +export interface MyWorkbooksListResult { + // (undocumented) + nextLink?: string; + readonly value?: MyWorkbook[]; +} + +// @public +export interface MyWorkbooksUpdateOptionalParams extends coreClient.OperationOptions { + sourceId?: string; +} + +// @public +export type MyWorkbooksUpdateResponse = MyWorkbook; + +// @public +export interface MyWorkbookUserAssignedIdentities { + readonly principalId?: string; + readonly tenantId?: string; +} + +// @public +export interface Operation { + display?: OperationDisplay; + name?: string; +} + +// @public +export interface OperationDisplay { + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface OperationInfo { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface OperationListResult { + nextLink?: string; + value?: Operation[]; +} + +// @public +export interface OperationLive { + display?: OperationInfo; + isDataAction?: boolean; + name?: string; + origin?: string; + properties?: Record; +} + +// @public +export interface OperationsListResult { + nextLink?: string; + value?: OperationLive[]; +} + +// @public +export interface PrivateLinkScopedResource { + resourceId?: string; + scopeId?: string; +} + +// @public +export interface ProactiveDetectionConfigurations { + get(resourceGroupName: string, resourceName: string, configurationId: string, options?: ProactiveDetectionConfigurationsGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, options?: ProactiveDetectionConfigurationsListOptionalParams): Promise; + update(resourceGroupName: string, resourceName: string, configurationId: string, proactiveDetectionProperties: ApplicationInsightsComponentProactiveDetectionConfiguration, options?: ProactiveDetectionConfigurationsUpdateOptionalParams): Promise; +} + +// @public +export interface ProactiveDetectionConfigurationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProactiveDetectionConfigurationsGetResponse = ApplicationInsightsComponentProactiveDetectionConfiguration; + +// @public +export interface ProactiveDetectionConfigurationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProactiveDetectionConfigurationsListResponse = ApplicationInsightsComponentProactiveDetectionConfiguration[]; + +// @public +export interface ProactiveDetectionConfigurationsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProactiveDetectionConfigurationsUpdateResponse = ApplicationInsightsComponentProactiveDetectionConfiguration; + +// @public +export type ProxyResource = Resource & {}; + +// @public +export type PublicNetworkAccessType = string; + +// @public +export type PurgeState = string; + +// @public +export type RequestSource = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export type SharedTypeKind = string; + +// @public +export type StorageType = string; + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TagsResource { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type TrackedResource = Resource & { + tags?: { + [propertyName: string]: string; + }; + location: string; +}; + +// @public +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; +} + +// @public +export type WebTest = WebtestsResource & { + kind?: WebTestKind; + syntheticMonitorId?: string; + webTestName?: string; + description?: string; + enabled?: boolean; + frequency?: number; + timeout?: number; + webTestKind?: WebTestKind; + retryEnabled?: boolean; + locations?: WebTestGeolocation[]; + configuration?: WebTestPropertiesConfiguration; + readonly provisioningState?: string; +}; + +// @public +export interface WebTestGeolocation { + location?: string; +} + +// @public +export type WebTestKind = "ping" | "multistep"; + +// @public +export interface WebTestListResult { + nextLink?: string; + value: WebTest[]; +} + +// @public +export interface WebTestLocations { + list(resourceGroupName: string, resourceName: string, options?: WebTestLocationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface WebTestLocationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebTestLocationsListResponse = ApplicationInsightsWebTestLocationsListResult; + +// @public +export interface WebTestPropertiesConfiguration { + webTest?: string; +} + +// @public +export interface WebTests { + createOrUpdate(resourceGroupName: string, webTestName: string, webTestDefinition: WebTest, options?: WebTestsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, webTestName: string, options?: WebTestsDeleteOptionalParams): Promise; + get(resourceGroupName: string, webTestName: string, options?: WebTestsGetOptionalParams): Promise; + list(options?: WebTestsListOptionalParams): PagedAsyncIterableIterator; + listByComponent(componentName: string, resourceGroupName: string, options?: WebTestsListByComponentOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: WebTestsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + updateTags(resourceGroupName: string, webTestName: string, webTestTags: TagsResource, options?: WebTestsUpdateTagsOptionalParams): Promise; +} + +// @public +export interface WebTestsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebTestsCreateOrUpdateResponse = WebTest; + +// @public +export interface WebTestsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface WebTestsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebTestsGetResponse = WebTest; + +// @public +export interface WebTestsListByComponentNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebTestsListByComponentNextResponse = WebTestListResult; + +// @public +export interface WebTestsListByComponentOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebTestsListByComponentResponse = WebTestListResult; + +// @public +export interface WebTestsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebTestsListByResourceGroupNextResponse = WebTestListResult; + +// @public +export interface WebTestsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebTestsListByResourceGroupResponse = WebTestListResult; + +// @public +export interface WebTestsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebTestsListNextResponse = WebTestListResult; + +// @public +export interface WebTestsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebTestsListResponse = WebTestListResult; + +// @public +export interface WebtestsResource { + readonly id?: string; + location: string; + readonly name?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface WebTestsUpdateTagsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebTestsUpdateTagsResponse = WebTest; + +// @public +export type Workbook = WorkbookResource & { + readonly systemData?: SystemData; + displayName?: string; + serializedData?: string; + version?: string; + readonly timeModified?: Date; + category?: string; + tagsPropertiesTags?: string[]; + readonly userId?: string; + sourceId?: string; + storageUri?: string; + description?: string; + readonly revision?: string; +}; + +// @public +export interface WorkbookError { + error?: WorkbookErrorDefinition; +} + +// @public +export interface WorkbookErrorDefinition { + readonly code?: string; + readonly innerError?: any; + readonly message?: string; +} + +// @public +export interface WorkbookInnerErrorTrace { + readonly trace?: string[]; +} + +// @public +export type WorkbookResource = TrackedResource & { + identity?: WorkbookResourceIdentity; + kind?: Kind; + etag?: string; +}; + +// @public +export type WorkbookResourceIdentity = ManagedServiceIdentity & {}; + +// @public +export interface Workbooks { + createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Workbook, options?: WorkbooksCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, options?: WorkbooksDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: WorkbooksGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, category: CategoryType, options?: WorkbooksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(category: CategoryType, options?: WorkbooksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listRevisionsList(resourceGroupName: string, resourceName: string, options?: WorkbooksRevisionsListOptionalParams): PagedAsyncIterableIterator; + revisionGet(resourceGroupName: string, resourceName: string, revisionId: string, options?: WorkbooksRevisionGetOptionalParams): Promise; + update(resourceGroupName: string, resourceName: string, options?: WorkbooksUpdateOptionalParams): Promise; +} + +// @public +export interface WorkbooksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + sourceId?: string; +} + +// @public +export type WorkbooksCreateOrUpdateResponse = Workbook; + +// @public +export interface WorkbooksDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface WorkbooksGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkbooksGetResponse = Workbook; + +// @public +export interface WorkbooksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { + canFetchContent?: boolean; + sourceId?: string; + tags?: string[]; +} + +// @public +export type WorkbooksListByResourceGroupNextResponse = WorkbooksListResult; + +// @public +export interface WorkbooksListByResourceGroupOptionalParams extends coreClient.OperationOptions { + canFetchContent?: boolean; + sourceId?: string; + tags?: string[]; +} + +// @public +export type WorkbooksListByResourceGroupResponse = WorkbooksListResult; + +// @public +export interface WorkbooksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { + canFetchContent?: boolean; + tags?: string[]; +} + +// @public +export type WorkbooksListBySubscriptionNextResponse = WorkbooksListResult; + +// @public +export interface WorkbooksListBySubscriptionOptionalParams extends coreClient.OperationOptions { + canFetchContent?: boolean; + tags?: string[]; +} + +// @public +export type WorkbooksListBySubscriptionResponse = WorkbooksListResult; + +// @public +export interface WorkbooksListResult { + // (undocumented) + nextLink?: string; + readonly value?: Workbook[]; +} + +// @public +export interface WorkbooksRevisionGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkbooksRevisionGetResponse = Workbook; + +// @public +export interface WorkbooksRevisionsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkbooksRevisionsListNextResponse = WorkbooksListResult; + +// @public +export interface WorkbooksRevisionsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkbooksRevisionsListResponse = WorkbooksListResult; + +// @public +export interface WorkbooksUpdateOptionalParams extends coreClient.OperationOptions { + sourceId?: string; + workbookUpdateParameters?: WorkbookUpdateParameters; +} + +// @public +export type WorkbooksUpdateResponse = Workbook; + +// @public +export type WorkbookTemplate = WorkbookTemplateResource & { + priority?: number; + author?: string; + templateData?: Record; + galleries?: WorkbookTemplateGallery[]; + localized?: { + [propertyName: string]: WorkbookTemplateLocalizedGallery[]; + }; +}; + +// @public +export interface WorkbookTemplateError { + error?: WorkbookTemplateErrorBody; +} + +// @public +export interface WorkbookTemplateErrorBody { + code?: string; + details?: WorkbookTemplateErrorFieldContract[]; + message?: string; +} + +// @public +export interface WorkbookTemplateErrorFieldContract { + code?: string; + message?: string; + target?: string; +} + +// @public +export interface WorkbookTemplateGallery { + category?: string; + name?: string; + order?: number; + resourceType?: string; + type?: string; +} + +// @public +export interface WorkbookTemplateLocalizedGallery { + galleries?: WorkbookTemplateGallery[]; + templateData?: Record; +} + +// @public +export interface WorkbookTemplateResource { + readonly id?: string; + location: string; + readonly name?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface WorkbookTemplates { + createOrUpdate(resourceGroupName: string, resourceName: string, workbookTemplateProperties: WorkbookTemplate, options?: WorkbookTemplatesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, options?: WorkbookTemplatesDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, options?: WorkbookTemplatesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: WorkbookTemplatesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, resourceName: string, options?: WorkbookTemplatesUpdateOptionalParams): Promise; +} + +// @public +export interface WorkbookTemplatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkbookTemplatesCreateOrUpdateResponse = WorkbookTemplate; + +// @public +export interface WorkbookTemplatesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface WorkbookTemplatesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkbookTemplatesGetResponse = WorkbookTemplate; + +// @public +export interface WorkbookTemplatesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkbookTemplatesListByResourceGroupResponse = WorkbookTemplatesListResult; + +// @public +export interface WorkbookTemplatesListResult { + value?: WorkbookTemplate[]; +} + +// @public +export interface WorkbookTemplatesUpdateOptionalParams extends coreClient.OperationOptions { + workbookTemplateUpdateParameters?: WorkbookTemplateUpdateParameters; +} + +// @public +export type WorkbookTemplatesUpdateResponse = WorkbookTemplate; + +// @public +export interface WorkbookTemplateUpdateParameters { + author?: string; + galleries?: WorkbookTemplateGallery[]; + localized?: { + [propertyName: string]: WorkbookTemplateLocalizedGallery[]; + }; + priority?: number; + tags?: { + [propertyName: string]: string; + }; + templateData?: Record; +} + +// @public +export interface WorkbookUpdateParameters { + category?: string; + description?: string; + displayName?: string; + kind?: SharedTypeKind; + revision?: string; + serializedData?: string; + tags?: { + [propertyName: string]: string; + }; + tagsPropertiesTags?: string[]; +} + +// @public +export interface WorkItemConfiguration { + configDisplayName?: string; + configProperties?: string; + connectorId?: string; + id?: string; + isDefault?: boolean; +} + +// @public +export interface WorkItemConfigurationError { + code?: string; + innererror?: InnerError; + message?: string; +} + +// @public +export interface WorkItemConfigurations { + create(resourceGroupName: string, resourceName: string, workItemConfigurationProperties: WorkItemCreateConfiguration, options?: WorkItemConfigurationsCreateOptionalParams): Promise; + delete(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: WorkItemConfigurationsDeleteOptionalParams): Promise; + getDefault(resourceGroupName: string, resourceName: string, options?: WorkItemConfigurationsGetDefaultOptionalParams): Promise; + getItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: WorkItemConfigurationsGetItemOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, options?: WorkItemConfigurationsListOptionalParams): PagedAsyncIterableIterator; + updateItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, workItemConfigurationProperties: WorkItemCreateConfiguration, options?: WorkItemConfigurationsUpdateItemOptionalParams): Promise; +} + +// @public +export interface WorkItemConfigurationsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkItemConfigurationsCreateResponse = WorkItemConfiguration; + +// @public +export interface WorkItemConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface WorkItemConfigurationsGetDefaultOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkItemConfigurationsGetDefaultResponse = WorkItemConfiguration; + +// @public +export interface WorkItemConfigurationsGetItemOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkItemConfigurationsGetItemResponse = WorkItemConfiguration; + +// @public +export interface WorkItemConfigurationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkItemConfigurationsListResponse = WorkItemConfigurationsListResult; + +// @public +export interface WorkItemConfigurationsListResult { + readonly value?: WorkItemConfiguration[]; +} + +// @public +export interface WorkItemConfigurationsUpdateItemOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkItemConfigurationsUpdateItemResponse = WorkItemConfiguration; + +// @public +export interface WorkItemCreateConfiguration { + connectorDataConfiguration?: string; + connectorId?: string; + validateOnly?: boolean; + workItemProperties?: { + [propertyName: string]: string; + }; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/applicationinsights/arm-appinsights/rollup.config.js b/sdk/applicationinsights/arm-appinsights/rollup.config.js index 034249a738d2..9be1955eb7f1 100644 --- a/sdk/applicationinsights/arm-appinsights/rollup.config.js +++ b/sdk/applicationinsights/arm-appinsights/rollup.config.js @@ -1,37 +1,188 @@ -import rollup from "rollup"; -import nodeResolve from "rollup-plugin-node-resolve"; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + +// #region Warning Handler /** - * @type {rollup.RollupFileOptions} + * A function that can determine whether a rollupwarning should be ignored. If + * the function returns `true`, then the warning will not be displayed. */ -const config = { - input: "./esm/applicationInsightsManagementClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/arm-appinsights.js", - format: "umd", - name: "Azure.ArmAppinsights", - sourcemap: true, - globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" + +function ignoreNiseSinonEvalWarnings(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependencyWarnings(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] }, - banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */` - }, - plugins: [ - nodeResolve({ mainFields: ['module', 'main'] }), - sourcemaps() - ] + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false }; -export default config; +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve(), cjs()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts index e001f89b1329..8f1a4e25ee75 100644 --- a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts +++ b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts @@ -1,84 +1,157 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { ApplicationInsightsManagementClientContext } from "./applicationInsightsManagementClientContext"; +import * as coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { + AnnotationsImpl, + APIKeysImpl, + ExportConfigurationsImpl, + ComponentCurrentBillingFeaturesImpl, + ComponentQuotaStatusImpl, + ComponentFeatureCapabilitiesImpl, + ComponentAvailableFeaturesImpl, + ProactiveDetectionConfigurationsImpl, + WorkItemConfigurationsImpl, + FavoritesImpl, + WebTestLocationsImpl, + WebTestsImpl, + AnalyticsItemsImpl, + WorkbookTemplatesImpl, + MyWorkbooksImpl, + WorkbooksImpl, + ComponentsImpl, + ComponentLinkedStorageAccountsOperationsImpl, + LiveTokenImpl +} from "./operations"; +import { + Annotations, + APIKeys, + ExportConfigurations, + ComponentCurrentBillingFeatures, + ComponentQuotaStatus, + ComponentFeatureCapabilities, + ComponentAvailableFeatures, + ProactiveDetectionConfigurations, + WorkItemConfigurations, + Favorites, + WebTestLocations, + WebTests, + AnalyticsItems, + WorkbookTemplates, + MyWorkbooks, + Workbooks, + Components, + ComponentLinkedStorageAccountsOperations, + LiveToken +} from "./operationsInterfaces"; +import { ApplicationInsightsManagementClientOptionalParams } from "./models"; - -class ApplicationInsightsManagementClient extends ApplicationInsightsManagementClientContext { - // Operation groups - operations: operations.Operations; - annotations: operations.Annotations; - aPIKeys: operations.APIKeys; - exportConfigurations: operations.ExportConfigurations; - componentCurrentBillingFeatures: operations.ComponentCurrentBillingFeatures; - componentQuotaStatus: operations.ComponentQuotaStatus; - componentFeatureCapabilities: operations.ComponentFeatureCapabilities; - componentAvailableFeatures: operations.ComponentAvailableFeatures; - proactiveDetectionConfigurations: operations.ProactiveDetectionConfigurations; - workItemConfigurations: operations.WorkItemConfigurations; - favorites: operations.Favorites; - webTestLocations: operations.WebTestLocations; - webTests: operations.WebTests; - analyticsItems: operations.AnalyticsItems; - workbooks: operations.Workbooks; - myWorkbooks: operations.MyWorkbooks; - components: operations.Components; - componentLinkedStorageAccounts: operations.ComponentLinkedStorageAccountsOperations; - liveToken: operations.LiveToken; +export class ApplicationInsightsManagementClient extends coreClient.ServiceClient { + $host: string; + subscriptionId: string; /** * Initializes a new instance of the ApplicationInsightsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. Credentials - * implementing the TokenCredential interface from the @azure/identity package are recommended. For - * more information about these credentials, see - * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the - * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and - * @azure/ms-rest-browserauth are also supported. + * @param credentials Subscription credentials which uniquely identify client subscription. * @param subscriptionId The ID of the target subscription. - * @param [options] The parameter options + * @param options The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ApplicationInsightsManagementClientOptions) { - super(credentials, subscriptionId, options); - this.operations = new operations.Operations(this); - this.annotations = new operations.Annotations(this); - this.aPIKeys = new operations.APIKeys(this); - this.exportConfigurations = new operations.ExportConfigurations(this); - this.componentCurrentBillingFeatures = new operations.ComponentCurrentBillingFeatures(this); - this.componentQuotaStatus = new operations.ComponentQuotaStatus(this); - this.componentFeatureCapabilities = new operations.ComponentFeatureCapabilities(this); - this.componentAvailableFeatures = new operations.ComponentAvailableFeatures(this); - this.proactiveDetectionConfigurations = new operations.ProactiveDetectionConfigurations(this); - this.workItemConfigurations = new operations.WorkItemConfigurations(this); - this.favorites = new operations.Favorites(this); - this.webTestLocations = new operations.WebTestLocations(this); - this.webTests = new operations.WebTests(this); - this.analyticsItems = new operations.AnalyticsItems(this); - this.workbooks = new operations.Workbooks(this); - this.myWorkbooks = new operations.MyWorkbooks(this); - this.components = new operations.Components(this); - this.componentLinkedStorageAccounts = new operations.ComponentLinkedStorageAccountsOperations(this); - this.liveToken = new operations.LiveToken(this); - } -} + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: ApplicationInsightsManagementClientOptionalParams + ) { + 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: ApplicationInsightsManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; -// Operation Specifications + const packageDetails = `azsdk-js-arm-appinsights/5.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; -export { - ApplicationInsightsManagementClient, - ApplicationInsightsManagementClientContext, - Models as ApplicationInsightsManagementModels, - Mappers as ApplicationInsightsManagementMappers -}; -export * from "./operations"; + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "https://management.azure.com" + }; + super(optionsWithDefaults); + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.annotations = new AnnotationsImpl(this); + this.aPIKeys = new APIKeysImpl(this); + this.exportConfigurations = new ExportConfigurationsImpl(this); + this.componentCurrentBillingFeatures = new ComponentCurrentBillingFeaturesImpl( + this + ); + this.componentQuotaStatus = new ComponentQuotaStatusImpl(this); + this.componentFeatureCapabilities = new ComponentFeatureCapabilitiesImpl( + this + ); + this.componentAvailableFeatures = new ComponentAvailableFeaturesImpl(this); + this.proactiveDetectionConfigurations = new ProactiveDetectionConfigurationsImpl( + this + ); + this.workItemConfigurations = new WorkItemConfigurationsImpl(this); + this.favorites = new FavoritesImpl(this); + this.webTestLocations = new WebTestLocationsImpl(this); + this.webTests = new WebTestsImpl(this); + this.analyticsItems = new AnalyticsItemsImpl(this); + this.workbookTemplates = new WorkbookTemplatesImpl(this); + this.myWorkbooks = new MyWorkbooksImpl(this); + this.workbooks = new WorkbooksImpl(this); + this.components = new ComponentsImpl(this); + this.componentLinkedStorageAccountsOperations = new ComponentLinkedStorageAccountsOperationsImpl( + this + ); + this.liveToken = new LiveTokenImpl(this); + } + + annotations: Annotations; + aPIKeys: APIKeys; + exportConfigurations: ExportConfigurations; + componentCurrentBillingFeatures: ComponentCurrentBillingFeatures; + componentQuotaStatus: ComponentQuotaStatus; + componentFeatureCapabilities: ComponentFeatureCapabilities; + componentAvailableFeatures: ComponentAvailableFeatures; + proactiveDetectionConfigurations: ProactiveDetectionConfigurations; + workItemConfigurations: WorkItemConfigurations; + favorites: Favorites; + webTestLocations: WebTestLocations; + webTests: WebTests; + analyticsItems: AnalyticsItems; + workbookTemplates: WorkbookTemplates; + myWorkbooks: MyWorkbooks; + workbooks: Workbooks; + components: Components; + componentLinkedStorageAccountsOperations: ComponentLinkedStorageAccountsOperations; + liveToken: LiveToken; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts deleted file mode 100644 index b3cc5d676aba..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as Models from "./models"; -import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; - -const packageName = "@azure/arm-appinsights"; -const packageVersion = "3.1.0"; - -export class ApplicationInsightsManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials | TokenCredential; - subscriptionId: string; - - /** - * Initializes a new instance of the ApplicationInsightsManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. Credentials - * implementing the TokenCredential interface from the @azure/identity package are recommended. For - * more information about these credentials, see - * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the - * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and - * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId The ID of the target subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ApplicationInsightsManagementClientOptions) { - if (credentials == undefined) { - throw new Error('\'credentials\' cannot be null.'); - } - if (subscriptionId == undefined) { - throw new Error('\'subscriptionId\' cannot be null.'); - } - - if (!options) { - options = {}; - } - if(!options.userAgent) { - const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } - - super(credentials, options); - - this.acceptLanguage = 'en-US'; - this.longRunningOperationRetryTimeout = 30; - this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; - this.requestContentType = "application/json; charset=utf-8"; - this.credentials = credentials; - this.subscriptionId = subscriptionId; - - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { - this.acceptLanguage = options.acceptLanguage; - } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { - this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; - } - } -} diff --git a/sdk/applicationinsights/arm-appinsights/src/index.ts b/sdk/applicationinsights/arm-appinsights/src/index.ts new file mode 100644 index 000000000000..0611f1e13a98 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 "./models"; +export { ApplicationInsightsManagementClient } from "./applicationInsightsManagementClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts deleted file mode 100644 index 359b47866056..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - APIKeyRequest, - ApplicationInsightsComponentAPIKey, - ApplicationInsightsComponentAPIKeyListResult, - CloudError -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/analyticsItemsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/analyticsItemsMappers.ts deleted file mode 100644 index ec4ddeb966e1..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/analyticsItemsMappers.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponentAnalyticsItem, - ApplicationInsightsComponentAnalyticsItemProperties, - CloudError -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/annotationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/annotationsMappers.ts deleted file mode 100644 index dd86a501f412..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/annotationsMappers.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - Annotation, - AnnotationError, - AnnotationsListResult, - CloudError, - InnerError -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentAvailableFeaturesMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentAvailableFeaturesMappers.ts deleted file mode 100644 index 077b32f04cad..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/componentAvailableFeaturesMappers.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponentAvailableFeatures, - ApplicationInsightsComponentFeature, - ApplicationInsightsComponentFeatureCapability, - CloudError -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentCurrentBillingFeaturesMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentCurrentBillingFeaturesMappers.ts deleted file mode 100644 index b765b76a1921..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/componentCurrentBillingFeaturesMappers.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponentBillingFeatures, - ApplicationInsightsComponentDataVolumeCap, - CloudError -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentFeatureCapabilitiesMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentFeatureCapabilitiesMappers.ts deleted file mode 100644 index b13f2ae34a0c..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/componentFeatureCapabilitiesMappers.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponentFeatureCapabilities, - CloudError -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentLinkedStorageAccountsOperationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentLinkedStorageAccountsOperationsMappers.ts deleted file mode 100644 index 712871b162ad..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/componentLinkedStorageAccountsOperationsMappers.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponent, - ApplicationInsightsComponentProactiveDetectionConfiguration, - ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, - AzureEntityResource, - BaseResource, - ComponentLinkedStorageAccounts, - ComponentLinkedStorageAccountsPatch, - ComponentsResource, - ErrorResponse, - MyWorkbook, - MyWorkbookResource, - PrivateLinkScopedResource, - ProxyResource, - Resource, - TrackedResource, - WebTest, - WebTestGeolocation, - WebTestPropertiesConfiguration, - WebtestsResource, - Workbook, - WorkbookResource -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentQuotaStatusMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentQuotaStatusMappers.ts deleted file mode 100644 index 6b2bc91696da..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/componentQuotaStatusMappers.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponentQuotaStatus, - CloudError -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/componentsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/componentsMappers.ts deleted file mode 100644 index a145168e704e..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/componentsMappers.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponent, - ApplicationInsightsComponentListResult, - ApplicationInsightsComponentProactiveDetectionConfiguration, - ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, - AzureEntityResource, - BaseResource, - CloudError, - ComponentLinkedStorageAccounts, - ComponentPurgeBody, - ComponentPurgeBodyFilters, - ComponentPurgeResponse, - ComponentPurgeStatusResponse, - ComponentsResource, - MyWorkbook, - MyWorkbookResource, - PrivateLinkScopedResource, - ProxyResource, - Resource, - TagsResource, - TrackedResource, - WebTest, - WebTestGeolocation, - WebTestPropertiesConfiguration, - WebtestsResource, - Workbook, - WorkbookResource -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/exportConfigurationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/exportConfigurationsMappers.ts deleted file mode 100644 index a5c3232aad4e..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/exportConfigurationsMappers.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponentExportConfiguration, - ApplicationInsightsComponentExportRequest, - CloudError -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/favoritesMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/favoritesMappers.ts deleted file mode 100644 index d927641eeede..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/favoritesMappers.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponentFavorite, - CloudError -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/index.ts b/sdk/applicationinsights/arm-appinsights/src/models/index.ts index 9b42aa4deac2..2ff1b1ccae2b 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/index.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/index.ts @@ -1,3257 +1,2391 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import * as coreClient from "@azure/core-client"; -export { BaseResource, CloudError }; - -/** - * Error response indicates Insights service is not able to process the incoming request. The - * reason is provided in the error message. - */ -export interface ErrorResponse { - /** - * Error code. - */ - code?: string; - /** - * Error message indicating why the operation failed. - */ - message?: string; -} - -/** - * The object that represents the operation. - */ -export interface OperationDisplay { - /** - * Service provider: Microsoft.Cdn - */ - provider?: string; - /** - * Resource on which the operation is performed: Profile, endpoint, etc. - */ - resource?: string; - /** - * Operation type: Read, write, delete, etc. - */ - operation?: string; -} - -/** - * CDN REST API operation - */ -export interface Operation { - /** - * Operation name: {provider}/{resource}/{operation} - */ - name?: string; +/** Annotations list result. */ +export interface AnnotationsListResult { /** - * The object that represents the operation. + * An array of annotations. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - display?: OperationDisplay; + readonly value?: Annotation[]; } -/** - * Annotation associated with an application insights resource. - */ +/** Annotation associated with an application insights resource. */ export interface Annotation { - /** - * Name of annotation - */ + /** Name of annotation */ annotationName?: string; - /** - * Category of annotation, free form - */ + /** Category of annotation, free form */ category?: string; - /** - * Time when event occurred - */ + /** Time when event occurred */ eventTime?: Date; - /** - * Unique Id for annotation - */ + /** Unique Id for annotation */ id?: string; - /** - * Serialized JSON object for detailed properties - */ + /** Serialized JSON object for detailed properties */ properties?: string; - /** - * Related parent annotation if any. Default value: 'null'. - */ + /** Related parent annotation if any */ relatedAnnotation?: string; } -/** - * Inner error - */ -export interface InnerError { - /** - * Provides correlation for request - */ - diagnosticcontext?: string; - /** - * Request time - */ - time?: Date; -} - -/** - * Error associated with trying to create annotation with Id that already exist - */ +/** Error associated with trying to create annotation with Id that already exist */ export interface AnnotationError { - /** - * Error detail code and explanation - */ + /** Error detail code and explanation */ code?: string; - /** - * Error message - */ + /** Error message */ message?: string; + /** Inner error */ innererror?: InnerError; } -/** - * An Application Insights component API Key creation request definition. - */ -export interface APIKeyRequest { - /** - * The name of the API Key. - */ - name?: string; - /** - * The read access rights of this API Key. - */ - linkedReadProperties?: string[]; - /** - * The write access rights of this API Key. - */ - linkedWriteProperties?: string[]; +/** Inner error */ +export interface InnerError { + /** Provides correlation for request */ + diagnosticcontext?: string; + /** Request time */ + time?: Date; } -/** - * Properties that define an API key of an Application Insights Component. - */ +/** Describes the list of API Keys of an Application Insights Component. */ +export interface ApplicationInsightsComponentAPIKeyListResult { + /** List of API Key definitions. */ + value: ApplicationInsightsComponentAPIKey[]; +} + +/** Properties that define an API key of an Application Insights Component. */ export interface ApplicationInsightsComponentAPIKey { /** - * The unique ID of the API key inside an Application Insights component. It is auto generated - * when the API key is created. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The unique ID of the API key inside an Application Insights component. It is auto generated when the API key is created. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** * The API key value. It will be only return once when the API Key was created. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly apiKey?: string; - /** - * The create date of this API key. - */ + /** The create date of this API key. */ createdDate?: string; - /** - * The name of the API key. - */ + /** The name of the API key. */ name?: string; - /** - * The read access rights of this API Key. - */ + /** The read access rights of this API Key. */ linkedReadProperties?: string[]; - /** - * The write access rights of this API Key. - */ + /** The write access rights of this API Key. */ linkedWriteProperties?: string[]; } -/** - * An Application Insights component Continuous Export configuration request definition. - */ -export interface ApplicationInsightsComponentExportRequest { - /** - * The document types to be exported, as comma separated values. Allowed values include - * 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', - * 'PerformanceCounters', 'Availability', 'Messages'. - */ - recordTypes?: string; - /** - * The Continuous Export destination type. This has to be 'Blob'. - */ - destinationType?: string; - /** - * The SAS URL for the destination storage container. It must grant write permission. - */ - destinationAddress?: string; - /** - * Set to 'true' to create a Continuous Export configuration as enabled, otherwise set it to - * 'false'. - */ - isEnabled?: string; - /** - * Deprecated - */ - notificationQueueEnabled?: string; - /** - * Deprecated - */ - notificationQueueUri?: string; - /** - * The subscription ID of the destination storage container. - */ - destinationStorageSubscriptionId?: string; - /** - * The location ID of the destination storage container. - */ - destinationStorageLocationId?: string; - /** - * The name of destination storage account. - */ - destinationAccountId?: string; +/** An Application Insights component API Key creation request definition. */ +export interface APIKeyRequest { + /** The name of the API Key. */ + name?: string; + /** The read access rights of this API Key. */ + linkedReadProperties?: string[]; + /** The write access rights of this API Key. */ + linkedWriteProperties?: string[]; } -/** - * Properties that define a Continuous Export configuration. - */ +/** Properties that define a Continuous Export configuration. */ export interface ApplicationInsightsComponentExportConfiguration { /** - * The unique ID of the export configuration inside an Application Insights component. It is auto - * generated when the Continuous Export configuration is created. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The unique ID of the export configuration inside an Application Insights component. It is auto generated when the Continuous Export configuration is created. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly exportId?: string; /** * The instrumentation key of the Application Insights component. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly instrumentationKey?: string; - /** - * This comma separated list of document types that will be exported. The possible values include - * 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', - * 'PerformanceCounters', 'Availability', 'Messages'. - */ + /** This comma separated list of document types that will be exported. The possible values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', 'Availability', 'Messages'. */ recordTypes?: string; /** * The name of the Application Insights component. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly applicationName?: string; /** * The subscription of the Application Insights component. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly subscriptionId?: string; /** * The resource group of the Application Insights component. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly resourceGroup?: string; /** * The destination storage account subscription ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly destinationStorageSubscriptionId?: string; /** * The destination account location ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly destinationStorageLocationId?: string; /** * The name of destination account. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly destinationAccountId?: string; /** * The destination type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly destinationType?: string; /** - * This will be 'true' if the Continuous Export configuration is enabled, otherwise it will be - * 'false'. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * This will be 'true' if the Continuous Export configuration is enabled, otherwise it will be 'false'. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isUserEnabled?: string; /** * Last time the Continuous Export configuration was updated. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly lastUserUpdate?: string; - /** - * Deprecated - */ + /** Deprecated */ notificationQueueEnabled?: string; /** - * This indicates current Continuous Export configuration status. The possible values are - * 'Preparing', 'Success', 'Failure'. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * This indicates current Continuous Export configuration status. The possible values are 'Preparing', 'Success', 'Failure'. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly exportStatus?: string; /** - * The last time data was successfully delivered to the destination storage container for this - * Continuous Export configuration. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The last time data was successfully delivered to the destination storage container for this Continuous Export configuration. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly lastSuccessTime?: string; /** * The last time the Continuous Export configuration started failing. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly lastGapTime?: string; /** - * This is the reason the Continuous Export configuration started failing. It can be - * 'AzureStorageNotFound' or 'AzureStorageAccessDenied'. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * This is the reason the Continuous Export configuration started failing. It can be 'AzureStorageNotFound' or 'AzureStorageAccessDenied'. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly permanentErrorReason?: string; /** * The name of the destination storage account. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly storageName?: string; /** * The name of the destination storage container. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly containerName?: string; } -/** - * An Application Insights component daily data volume cap - */ +/** An Application Insights component Continuous Export configuration request definition. */ +export interface ApplicationInsightsComponentExportRequest { + /** The document types to be exported, as comma separated values. Allowed values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', 'Availability', 'Messages'. */ + recordTypes?: string; + /** The Continuous Export destination type. This has to be 'Blob'. */ + destinationType?: string; + /** The SAS URL for the destination storage container. It must grant write permission. */ + destinationAddress?: string; + /** Set to 'true' to create a Continuous Export configuration as enabled, otherwise set it to 'false'. */ + isEnabled?: string; + /** Deprecated */ + notificationQueueEnabled?: string; + /** Deprecated */ + notificationQueueUri?: string; + /** The subscription ID of the destination storage container. */ + destinationStorageSubscriptionId?: string; + /** The location ID of the destination storage container. */ + destinationStorageLocationId?: string; + /** The name of destination storage account. */ + destinationAccountId?: string; +} + +/** An Application Insights component billing features */ +export interface ApplicationInsightsComponentBillingFeatures { + /** An Application Insights component daily data volume cap */ + dataVolumeCap?: ApplicationInsightsComponentDataVolumeCap; + /** Current enabled pricing plan. When the component is in the Enterprise plan, this will list both 'Basic' and 'Application Insights Enterprise'. */ + currentBillingFeatures?: string[]; +} + +/** An Application Insights component daily data volume cap */ export interface ApplicationInsightsComponentDataVolumeCap { - /** - * Daily data volume cap in GB. - */ + /** Daily data volume cap in GB. */ cap?: number; /** * Daily data volume cap UTC reset hour. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly resetTime?: number; - /** - * Reserved, not used for now. - */ + /** Reserved, not used for now. */ warningThreshold?: number; - /** - * Reserved, not used for now. - */ + /** Reserved, not used for now. */ stopSendNotificationWhenHitThreshold?: boolean; - /** - * Do not send a notification email when the daily data volume cap is met. - */ + /** Do not send a notification email when the daily data volume cap is met. */ stopSendNotificationWhenHitCap?: boolean; /** * Maximum daily data volume cap that the user can set for this component. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly maxHistoryCap?: number; } -/** - * An Application Insights component billing features - */ -export interface ApplicationInsightsComponentBillingFeatures { - /** - * An Application Insights component daily data volume cap - */ - dataVolumeCap?: ApplicationInsightsComponentDataVolumeCap; - /** - * Current enabled pricing plan. When the component is in the Enterprise plan, this will list - * both 'Basic' and 'Application Insights Enterprise'. - */ - currentBillingFeatures?: string[]; -} - -/** - * An Application Insights component daily data volume cap status - */ +/** An Application Insights component daily data volume cap status */ export interface ApplicationInsightsComponentQuotaStatus { /** * The Application ID for the Application Insights component. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly appId?: string; /** * The daily data volume cap is met, and data ingestion will be stopped. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly shouldBeThrottled?: boolean; /** * Date and time when the daily data volume cap will be reset, and data ingestion will resume. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly expirationTime?: string; } -/** - * An Application Insights component feature capabilities - */ +/** An Application Insights component feature capabilities */ export interface ApplicationInsightsComponentFeatureCapabilities { /** * Whether allow to use continuous export feature. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly supportExportData?: boolean; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly burstThrottlePolicy?: string; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly metadataClass?: string; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly liveStreamMetrics?: boolean; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly applicationMap?: boolean; /** * Whether allow to use work item integration feature. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly workItemIntegration?: boolean; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly powerBIIntegration?: boolean; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly openSchema?: boolean; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly proactiveDetection?: boolean; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly analyticsIntegration?: boolean; /** * Whether allow to use multiple steps web test feature. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly multipleStepWebTest?: boolean; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly apiAccessLevel?: string; /** * The application insights component used tracking type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly trackingType?: string; /** * Daily data volume cap in GB. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly dailyCap?: number; /** * Daily data volume cap UTC reset hour. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly dailyCapResetTime?: number; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly throttleRate?: number; } -/** - * An Application Insights component feature capability - */ -export interface ApplicationInsightsComponentFeatureCapability { - /** - * The name of the capability. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The description of the capability. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly description?: string; - /** - * The value of the capability. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: string; - /** - * The unit of the capability. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly unit?: string; - /** - * The meter used for the capability. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly meterId?: string; +/** An Application Insights component available features. */ +export interface ApplicationInsightsComponentAvailableFeatures { /** - * The meter rate of the meter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A list of Application Insights component feature. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly meterRateFrequency?: string; + readonly result?: ApplicationInsightsComponentFeature[]; } -/** - * An Application Insights component daily data volume cap status - */ +/** An Application Insights component daily data volume cap status */ export interface ApplicationInsightsComponentFeature { /** * The pricing feature name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly featureName?: string; /** * The meter id used for the feature. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly meterId?: string; /** * The meter rate for the feature's meter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly meterRateFrequency?: string; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly resouceId?: string; /** * Reserved, not used now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isHidden?: boolean; /** * A list of Application Insights component feature capability. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly capabilities?: ApplicationInsightsComponentFeatureCapability[]; /** * Display name of the feature. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly title?: string; /** * Whether can apply addon feature on to it. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isMainFeature?: boolean; /** * The add on features on main feature. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly supportedAddonFeatures?: string; } -/** - * An Application Insights component available features. - */ -export interface ApplicationInsightsComponentAvailableFeatures { +/** An Application Insights component feature capability */ +export interface ApplicationInsightsComponentFeatureCapability { /** - * A list of Application Insights component feature. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The name of the capability. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly result?: ApplicationInsightsComponentFeature[]; -} - -/** - * Static definitions of the ProactiveDetection configuration rule (same values for all - * components). - */ -export interface ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions { + readonly name?: string; /** - * The rule name + * The description of the capability. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name?: string; + readonly description?: string; /** - * The rule name as it is displayed in UI + * The value of the capability. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - displayName?: string; + readonly value?: string; /** - * The rule description + * The unit of the capability. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - description?: string; + readonly unit?: string; /** - * URL which displays additional info about the proactive detection rule + * The meter used for the capability. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - helpUrl?: string; + readonly meterId?: string; /** - * A flag indicating whether the rule is hidden (from the UI) + * The meter rate of the meter. + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly meterRateFrequency?: string; +} + +/** Properties that define a ProactiveDetection configuration. */ +export interface ApplicationInsightsComponentProactiveDetectionConfiguration { + /** The rule name */ + name?: string; + /** A flag that indicates whether this rule is enabled by the user */ + enabled?: boolean; + /** A flag that indicated whether notifications on this rule should be sent to subscription owners */ + sendEmailsToSubscriptionOwners?: boolean; + /** Custom email addresses for this rule notifications */ + customEmails?: string[]; + /** The last time this rule was updated */ + lastUpdatedTime?: string; + /** Static definitions of the ProactiveDetection configuration rule (same values for all components). */ + ruleDefinitions?: ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; +} + +/** Static definitions of the ProactiveDetection configuration rule (same values for all components). */ +export interface ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions { + /** The rule name */ + name?: string; + /** The rule name as it is displayed in UI */ + displayName?: string; + /** The rule description */ + description?: string; + /** URL which displays additional info about the proactive detection rule */ + helpUrl?: string; + /** A flag indicating whether the rule is hidden (from the UI) */ isHidden?: boolean; - /** - * A flag indicating whether the rule is enabled by default - */ + /** A flag indicating whether the rule is enabled by default */ isEnabledByDefault?: boolean; - /** - * A flag indicating whether the rule is in preview - */ + /** A flag indicating whether the rule is in preview */ isInPreview?: boolean; - /** - * A flag indicating whether email notifications are supported for detections for this rule - */ + /** A flag indicating whether email notifications are supported for detections for this rule */ supportsEmailNotifications?: boolean; } -/** - * Properties that define a ProactiveDetection configuration. - */ -export interface ApplicationInsightsComponentProactiveDetectionConfiguration extends BaseResource { +/** Work item configuration list result. */ +export interface WorkItemConfigurationsListResult { /** - * The rule name + * An array of work item configurations. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name?: string; - /** - * A flag that indicates whether this rule is enabled by the user - */ - enabled?: boolean; - /** - * A flag that indicated whether notifications on this rule should be sent to subscription owners - */ - sendEmailsToSubscriptionOwners?: boolean; - /** - * Custom email addresses for this rule notifications - */ - customEmails?: string[]; - /** - * The last time this rule was updated - */ - lastUpdatedTime?: string; - /** - * Static definitions of the ProactiveDetection configuration rule (same values for all - * components). - */ - ruleDefinitions?: ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; + readonly value?: WorkItemConfiguration[]; } -/** - * Work item configuration associated with an application insights resource. - */ +/** Work item configuration associated with an application insights resource. */ export interface WorkItemConfiguration { - /** - * Connector identifier where work item is created - */ + /** Connector identifier where work item is created */ connectorId?: string; - /** - * Configuration friendly name - */ + /** Configuration friendly name */ configDisplayName?: string; - /** - * Boolean value indicating whether configuration is default - */ + /** Boolean value indicating whether configuration is default */ isDefault?: boolean; - /** - * Unique Id for work item - */ + /** Unique Id for work item */ id?: string; - /** - * Serialized JSON object for detailed properties - */ + /** Serialized JSON object for detailed properties */ configProperties?: string; } -/** - * Work item configuration creation payload - */ +/** Error associated with trying to get work item configuration or configurations */ +export interface WorkItemConfigurationError { + /** Error detail code and explanation */ + code?: string; + /** Error message */ + message?: string; + /** Inner error */ + innererror?: InnerError; +} + +/** Work item configuration creation payload */ export interface WorkItemCreateConfiguration { - /** - * Unique connector id - */ + /** Unique connector id */ connectorId?: string; - /** - * Serialized JSON object for detailed properties - */ + /** Serialized JSON object for detailed properties */ connectorDataConfiguration?: string; - /** - * Boolean indicating validate only - */ + /** Boolean indicating validate only */ validateOnly?: boolean; - /** - * Custom work item properties - */ + /** Custom work item properties */ workItemProperties?: { [propertyName: string]: string }; } -/** - * Error associated with trying to get work item configuration or configurations - */ -export interface WorkItemConfigurationError { - /** - * Error detail code and explanation - */ - code?: string; - /** - * Error message - */ - message?: string; - innererror?: InnerError; -} - -/** - * Properties that define a favorite that is associated to an Application Insights component. - */ +/** Properties that define a favorite that is associated to an Application Insights component. */ export interface ApplicationInsightsComponentFavorite { - /** - * The user-defined name of the favorite. - */ + /** The user-defined name of the favorite. */ name?: string; - /** - * Configuration of this particular favorite, which are driven by the Azure portal UX. - * Configuration data is a string containing valid JSON - */ + /** Configuration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a string containing valid JSON */ config?: string; - /** - * This instance's version of the data model. This can change as new features are added that can - * be marked favorite. Current examples include MetricsExplorer (ME) and Search. - */ + /** This instance's version of the data model. This can change as new features are added that can be marked favorite. Current examples include MetricsExplorer (ME) and Search. */ version?: string; /** * Internally assigned unique id of the favorite definition. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly favoriteId?: string; - /** - * Enum indicating if this favorite definition is owned by a specific user or is shared between - * all users with access to the Application Insights component. Possible values include: - * 'shared', 'user' - */ + /** Enum indicating if this favorite definition is owned by a specific user or is shared between all users with access to the Application Insights component. */ favoriteType?: FavoriteType; - /** - * The source of the favorite definition. - */ + /** The source of the favorite definition. */ sourceType?: string; /** * Date and time in UTC of the last modification that was made to this favorite definition. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly timeModified?: string; - /** - * A list of 0 or more tags that are associated with this favorite definition - */ + /** A list of 0 or more tags that are associated with this favorite definition */ tags?: string[]; - /** - * Favorite category, as defined by the user at creation time. - */ + /** Favorite category, as defined by the user at creation time. */ category?: string; - /** - * Flag denoting wether or not this favorite was generated from a template. - */ + /** Flag denoting wether or not this favorite was generated from a template. */ isGeneratedFromTemplate?: boolean; /** * Unique user id of the specific user that owns this favorite. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly userId?: string; } -/** - * Properties that define a web test location available to an Application Insights Component. - */ +/** Describes the list of web test locations available to an Application Insights Component. */ +export interface ApplicationInsightsWebTestLocationsListResult { + /** List of web test locations. */ + value: ApplicationInsightsComponentWebTestLocation[]; +} + +/** Properties that define a web test location available to an Application Insights Component. */ export interface ApplicationInsightsComponentWebTestLocation { /** * The display name of the web test location. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly displayName?: string; /** * Internally defined geographic location tag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly tag?: string; } -/** - * An azure resource object - */ -export interface WebtestsResource extends BaseResource { - /** - * Azure resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Azure resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Azure resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource location - */ - location: string; - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; -} - -/** - * A container holding only the Tags for a resource, allowing the user to update the tags on a - * WebTest instance. - */ -export interface TagsResource { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; +/** A list of 0 or more Application Insights web test definitions. */ +export interface WebTestListResult { + /** Set of Application Insights web test definitions. */ + value: WebTest[]; + /** The link to get the next part of the returned list of web tests, should the return set be too large for a single request. May be null. */ + nextLink?: string; } -/** - * Geo-physical location to run a web test from. You must specify one or more locations for the - * test to run from. - */ +/** Geo-physical location to run a web test from. You must specify one or more locations for the test to run from. */ export interface WebTestGeolocation { - /** - * Location ID for the webtest to run from. - */ + /** Location ID for the webtest to run from. */ location?: string; } -/** - * An XML configuration specification for a WebTest. - */ +/** An XML configuration specification for a WebTest. */ export interface WebTestPropertiesConfiguration { - /** - * The XML specification of a WebTest to run against an application. - */ + /** The XML specification of a WebTest to run against an application. */ webTest?: string; } -/** - * An Application Insights web test definition. - */ -export interface WebTest extends WebtestsResource { - /** - * The kind of web test that this web test watches. Choices are ping and multistep. Possible - * values include: 'ping', 'multistep'. Default value: 'ping'. - */ - kind?: WebTestKind; - /** - * Unique ID of this WebTest. This is typically the same value as the Name field. - */ - syntheticMonitorId: string; - /** - * User defined name if this WebTest. - */ - webTestName: string; - /** - * Purpose/user defined descriptive test for this WebTest. - */ - description?: string; - /** - * Is the test actively being monitored. - */ - enabled?: boolean; - /** - * Interval in seconds between test runs for this WebTest. Default value is 300. Default value: - * 300. - */ - frequency?: number; - /** - * Seconds until this WebTest will timeout and fail. Default value is 30. Default value: 30. - */ - timeout?: number; +/** An azure resource object */ +export interface WebtestsResource { /** - * The kind of web test this is, valid choices are ping and multistep. Possible values include: - * 'ping', 'multistep'. Default value: 'ping'. - */ - webTestKind: WebTestKind; - /** - * Allow for retries should this WebTest fail. - */ - retryEnabled?: boolean; - /** - * A list of where to physically run the tests from to give global coverage for accessibility of - * your application. + * Azure resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - locations: WebTestGeolocation[]; + readonly id?: string; /** - * An XML configuration specification for a WebTest. + * Azure resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - configuration?: WebTestPropertiesConfiguration; + readonly name?: string; /** - * Current state of this component, whether or not is has been provisioned within the resource - * group it is defined. Users cannot change this value but are able to read from it. Values will - * include Succeeded, Deploying, Canceled, and Failed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Azure resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly type?: string; + /** Resource location */ + location: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; } -/** - * A set of properties that can be defined in the context of a specific item type. Each type may - * have its own properties. - */ -export interface ApplicationInsightsComponentAnalyticsItemProperties { - /** - * A function alias, used when the type of the item is Function - */ - functionAlias?: string; +/** A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance. */ +export interface TagsResource { + /** Resource tags */ + tags?: { [propertyName: string]: string }; } -/** - * Properties that define an Analytics item that is associated to an Application Insights - * component. - */ +/** Properties that define an Analytics item that is associated to an Application Insights component. */ export interface ApplicationInsightsComponentAnalyticsItem { - /** - * Internally assigned unique id of the item definition. - */ + /** Internally assigned unique id of the item definition. */ id?: string; - /** - * The user-defined name of the item. - */ + /** The user-defined name of the item. */ name?: string; - /** - * The content of this item - */ + /** The content of this item */ content?: string; /** * This instance's version of the data model. This can change as new features are added. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly version?: string; - /** - * Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. Possible values include: 'shared', - * 'user' - */ + /** Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component. */ scope?: ItemScope; - /** - * Enum indicating the type of the Analytics item. Possible values include: 'query', 'function', - * 'folder', 'recent' - */ + /** Enum indicating the type of the Analytics item. */ type?: ItemType; /** * Date and time in UTC when this item was created. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly timeCreated?: string; /** * Date and time in UTC of the last modification that was made to this item. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly timeModified?: string; + /** A set of properties that can be defined in the context of a specific item type. Each type may have its own properties. */ properties?: ApplicationInsightsComponentAnalyticsItemProperties; } -/** - * An azure resource object - */ -export interface WorkbookResource extends BaseResource { +/** A set of properties that can be defined in the context of a specific item type. Each type may have its own properties. */ +export interface ApplicationInsightsComponentAnalyticsItemProperties { + /** A function alias, used when the type of the item is Function */ + functionAlias?: string; +} + +/** WorkbookTemplate list result. */ +export interface WorkbookTemplatesListResult { + /** An array of workbook templates. */ + value?: WorkbookTemplate[]; +} + +/** Gallery information for a workbook template. */ +export interface WorkbookTemplateGallery { + /** Name of the workbook template in the gallery. */ + name?: string; + /** Category for the gallery. */ + category?: string; + /** Type of workbook supported by the workbook template. */ + type?: string; + /** Order of the template within the gallery. */ + order?: number; + /** Azure resource type supported by the gallery. */ + resourceType?: string; +} + +/** Localized template data and gallery information. */ +export interface WorkbookTemplateLocalizedGallery { + /** Valid JSON object containing workbook template payload. */ + templateData?: Record; + /** Workbook galleries supported by the template. */ + galleries?: WorkbookTemplateGallery[]; +} + +/** An azure resource object */ +export interface WorkbookTemplateResource { /** * Azure resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** - * Azure resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Azure resource name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** * Azure resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** Resource location */ + location: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** Error message that will indicate why the operation failed. */ +export interface WorkbookTemplateError { + /** Error message object that will indicate why the operation failed. */ + error?: WorkbookTemplateErrorBody; +} + +/** Error message body that will indicate why the operation failed. */ +export interface WorkbookTemplateErrorBody { + /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */ + code?: string; + /** Human-readable representation of the error. */ + message?: string; + /** The list of invalid fields send in request, in case of validation error. */ + details?: WorkbookTemplateErrorFieldContract[]; +} + +/** Error Field contract. */ +export interface WorkbookTemplateErrorFieldContract { + /** Property level error code. */ + code?: string; + /** Human-readable representation of property-level error. */ + message?: string; + /** Property name. */ + target?: string; +} + +/** The parameters that can be provided when updating workbook template. */ +export interface WorkbookTemplateUpdateParameters { + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. */ + priority?: number; + /** Information about the author of the workbook template. */ + author?: string; + /** Valid JSON object containing workbook template payload. */ + templateData?: Record; + /** Workbook galleries supported by the template. */ + galleries?: WorkbookTemplateGallery[]; + /** Key value pair of localized gallery. Each key is the locale code of languages supported by the Azure portal. */ + localized?: { [propertyName: string]: WorkbookTemplateLocalizedGallery[] }; +} + +/** Workbook list result. */ +export interface MyWorkbooksListResult { /** - * Resource location + * An array of private workbooks. + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly value?: MyWorkbook[]; + nextLink?: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + 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; +} + +/** An azure resource object */ +export interface MyWorkbookResource { + /** Identity used for BYOS */ + identity?: MyWorkbookManagedIdentity; + /** Azure resource Id */ + id?: string; + /** Azure resource name */ + name?: string; + /** Azure resource type */ + type?: string; + /** Resource location */ location?: string; - /** - * Resource tags - */ + /** Resource tags */ tags?: { [propertyName: string]: string }; + /** Resource etag */ + etag?: { [propertyName: string]: string }; } -/** - * An Application Insights workbook definition. - */ -export interface Workbook extends WorkbookResource { - /** - * The kind of workbook. Choices are user and shared. Possible values include: 'user', 'shared' - */ - kind?: SharedTypeKind; +/** Customer Managed Identity */ +export interface MyWorkbookManagedIdentity { + /** Customer Managed Identity */ + userAssignedIdentities?: MyWorkbookUserAssignedIdentities; + /** The identity type. */ + type?: MyWorkbookManagedIdentityType; +} + +/** Customer Managed Identity */ +export interface MyWorkbookUserAssignedIdentities { /** - * The user-defined name of the workbook. + * The principal ID of resource identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - workbookName: string; + readonly principalId?: string; /** - * Configuration of this particular workbook. Configuration data is a string containing valid - * JSON + * The tenant ID of resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - serializedData: string; + readonly tenantId?: string; +} + +/** Error response. */ +export interface MyWorkbookError { + /** The error details. */ + error?: ErrorDefinition; +} + +/** Error definition. */ +export interface ErrorDefinition { /** - * This instance's version of the data model. This can change as new features are added that can - * be marked workbook. + * Service specific error code which serves as the substatus for the HTTP error code. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - version?: string; + readonly code?: string; /** - * Internally assigned unique id of the workbook definition. + * Description of the error. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - workbookId: string; + readonly message?: string; /** - * Enum indicating if this workbook definition is owned by a specific user or is shared between - * all users with access to the Application Insights component. Possible values include: 'user', - * 'shared'. Default value: 'shared'. + * Internal error details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sharedTypeKind: SharedTypeKind; + readonly innererror?: any; +} + +/** Workbook list result. */ +export interface WorkbooksListResult { /** - * Date and time in UTC of the last modification that was made to this workbook definition. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * An array of workbooks. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timeModified?: string; + readonly value?: Workbook[]; + nextLink?: string; +} + +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { /** - * Workbook category, as defined by the user at creation time. + * 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. */ - category: string; + readonly principalId?: string; /** - * A list of 0 or more tags that are associated with this workbook definition + * 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. */ - workbookTags?: string[]; + readonly tenantId?: string; + /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + type: ManagedServiceIdentityType; + /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; +} + +/** User assigned identity properties */ +export interface UserAssignedIdentity { /** - * Unique user id of the specific user that owns this workbook. + * The principal ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - userId: string; + readonly principalId?: string; /** - * Optional resourceId for a source resource. + * The client ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sourceResourceId?: string; + readonly clientId?: string; } -/** - * Contains a sourceId and workbook resource id to link two resources. - */ -export interface LinkProperties { +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { /** - * The source Azure resource id + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sourceId?: string; + readonly id?: string; /** - * The workbook Azure resource id + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - targetId?: string; + readonly name?: string; /** - * The category of workbook + * 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. */ - category?: string; + readonly type?: string; } -/** - * Error Field contract. - */ -export interface ErrorFieldContract { +/** Error response. */ +export interface WorkbookError { + /** The error details. */ + error?: WorkbookErrorDefinition; +} + +/** Error definition. */ +export interface WorkbookErrorDefinition { /** - * Property level error code. + * Service specific error code which serves as the substatus for the HTTP error code. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - code?: string; + readonly code?: string; /** - * Human-readable representation of property-level error. + * Description of the error. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - message?: string; + readonly message?: string; /** - * Property name. + * Internal error details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - target?: string; + readonly innerError?: any; } -/** - * Error message body that will indicate why the operation failed. - */ -export interface WorkbookError { - /** - * Service-defined error code. This code serves as a sub-status for the HTTP error code specified - * in the response. - */ - code?: string; - /** - * Human-readable representation of the error. - */ - message?: string; - /** - * The list of invalid fields send in request, in case of validation error. - */ - details?: ErrorFieldContract[]; +/** The parameters that can be provided when updating workbook properties properties. */ +export interface WorkbookUpdateParameters { + /** The kind of workbook. Choices are user and shared. */ + kind?: SharedTypeKind; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The user-defined name (display name) of the workbook. */ + displayName?: string; + /** Configuration of this particular workbook. Configuration data is a string containing valid JSON */ + serializedData?: string; + /** Workbook category, as defined by the user at creation time. */ + category?: string; + /** A list of 0 or more tags that are associated with this workbook definition */ + tagsPropertiesTags?: string[]; + /** The description of the workbook. */ + description?: string; + /** The unique revision id for this workbook definition */ + revision?: string; } -/** - * An azure resource object - */ -export interface MyWorkbookResource extends BaseResource { +/** Describes the list of Application Insights Resources. */ +export interface ApplicationInsightsComponentListResult { + /** List of Application Insights component definitions. */ + value: ApplicationInsightsComponent[]; + /** The URI to get the next set of Application Insights component definitions if too many components where returned in the result set. */ + nextLink?: string; +} + +/** The private link scope resource reference. */ +export interface PrivateLinkScopedResource { + /** The full resource Id of the private link scope resource. */ + resourceId?: string; + /** The private link scope unique Identifier. */ + scopeId?: string; +} + +/** An azure resource object */ +export interface ComponentsResource { /** * Azure resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - id?: string; + readonly id?: string; /** * Azure resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name?: string; + readonly name?: string; /** * Azure resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - type?: string; - /** - * Resource location - */ - location?: string; - /** - * Resource tags - */ + readonly type?: string; + /** Resource location */ + location: string; + /** Resource tags */ tags?: { [propertyName: string]: string }; } -/** - * An Application Insights private workbook definition. - */ -export interface MyWorkbook extends MyWorkbookResource { - /** - * The kind of workbook. Choices are user and shared. Possible values include: 'user', 'shared' - */ - kind?: SharedTypeKind; - /** - * The user-defined name of the private workbook. - */ - displayName: string; - /** - * Configuration of this particular private workbook. Configuration data is a string containing - * valid JSON - */ - serializedData: string; - /** - * This instance's version of the data model. This can change as new features are added that can - * be marked private workbook. - */ - version?: string; - /** - * Date and time in UTC of the last modification that was made to this private workbook - * definition. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly timeModified?: string; +export interface ErrorResponseComponents { + /** Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message. */ + error?: ErrorResponseComponentsError; +} + +/** Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message. */ +export interface ErrorResponseComponentsError { /** - * Workbook category, as defined by the user at creation time. + * Error code. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - category: string; + readonly code?: string; /** - * A list of 0 or more tags that are associated with this private workbook definition + * Error message indicating why the operation failed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - myWorkbookTags?: string[]; + readonly message?: string; +} + +/** Describes the body of a purge request for an App Insights component */ +export interface ComponentPurgeBody { + /** Table from which to purge data. */ + table: string; + /** The set of columns and filters (queries) to run over them to purge the resulting data. */ + filters: ComponentPurgeBodyFilters[]; +} + +/** User-defined filters to return data which will be purged from the table. */ +export interface ComponentPurgeBodyFilters { + /** The column of the table over which the given query should run */ + column?: string; + /** A query operator to evaluate over the provided column and value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a KQL query. */ + operator?: string; + /** the value for the operator to function over. This can be a number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of values. */ + value?: any; + /** When filtering over custom dimensions, this key will be used as the name of the custom dimension. */ + key?: string; +} + +/** Response containing operationId for a specific purge action. */ +export interface ComponentPurgeResponse { + /** Id to use when querying for status for a particular purge operation. */ + operationId: string; +} + +/** Response containing status for a specific purge operation. */ +export interface ComponentPurgeStatusResponse { + /** Status of the operation represented by the requested Id. */ + status: PurgeState; +} + +export interface ErrorResponseLinkedStorage { + /** Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message. */ + error?: ErrorResponseLinkedStorageError; +} + +/** Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message. */ +export interface ErrorResponseLinkedStorageError { /** - * Unique user id of the specific user that owns this private workbook. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Error code. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly userId?: string; + readonly code?: string; /** - * Optional resourceId for a source resource. + * Error message indicating why the operation failed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sourceId?: string; + readonly message?: string; } -/** - * Error message body that will indicate why the operation failed. - */ -export interface MyWorkbookError { +/** An Application Insights component linked storage accounts patch */ +export interface ComponentLinkedStorageAccountsPatch { + /** Linked storage account resource ID */ + linkedStorageAccount?: string; +} + +/** The response to a live token query. */ +export interface LiveTokenResponse { /** - * Service-defined error code. This code serves as a sub-status for the HTTP error code specified - * in the response. + * JWT token for accessing live metrics stream data. + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly liveToken?: string; +} + +/** Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message. */ +export interface ErrorResponse { + /** Error code. */ code?: string; - /** - * Human-readable representation of the error. - */ + /** Error message indicating why the operation failed. */ message?: string; +} + +/** CDN REST API operation */ +export interface Operation { + /** Operation name: {provider}/{resource}/{operation} */ + name?: string; + /** The object that represents the operation. */ + display?: OperationDisplay; +} + +/** The object that represents the operation. */ +export interface OperationDisplay { + /** Service provider: Microsoft.Cdn */ + provider?: string; + /** Resource on which the operation is performed: Profile, endpoint, etc. */ + resource?: string; + /** Operation type: Read, write, delete, etc. */ + operation?: string; +} + +/** Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of results. */ +export interface OperationListResult { + /** List of CDN operations supported by the CDN resource provider. */ + value?: Operation[]; + /** URL to get the next set of operation list results if there are any. */ + nextLink?: string; +} + +/** Error details */ +export interface InnerErrorTrace { /** - * The list of invalid fields send in request, in case of validation error. + * detailed error trace + * NOTE: This property will not be serialized. It can only be populated by the server. */ - details?: ErrorFieldContract[]; + readonly trace?: string[]; } -/** - * An azure resource object - */ -export interface ComponentsResource extends BaseResource { +/** Error details */ +export interface WorkbookInnerErrorTrace { /** - * Azure resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * detailed error trace + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly trace?: string[]; +} + +/** Result of the List Operations operation */ +export interface OperationsListResult { + /** A collection of operations */ + value?: OperationLive[]; + /** URL to get the next set of operation list results if there are any. */ + nextLink?: string; +} + +/** Represents an operation returned by the GetOperations request */ +export interface OperationLive { + /** Name of the operation */ + name?: string; + /** Indicates whether the operation is a data action */ + isDataAction?: boolean; + /** Display name of the operation */ + display?: OperationInfo; + /** Origin of the operation */ + origin?: string; + /** Properties of the operation */ + properties?: Record; +} + +/** Information about an operation */ +export interface OperationInfo { + /** Name of the provider */ + provider?: string; + /** Name of the resource type */ + resource?: string; + /** Name of the operation */ + operation?: string; + /** Description of the operation */ + description?: string; +} + +/** An Application Insights web test definition. */ +export type WebTest = WebtestsResource & { + /** The kind of web test that this web test watches. Choices are ping and multistep. */ + kind?: WebTestKind; + /** Unique ID of this WebTest. This is typically the same value as the Name field. */ + syntheticMonitorId?: string; + /** User defined name if this WebTest. */ + webTestName?: string; + /** Purpose/user defined descriptive test for this WebTest. */ + description?: string; + /** Is the test actively being monitored. */ + enabled?: boolean; + /** Interval in seconds between test runs for this WebTest. Default value is 300. */ + frequency?: number; + /** Seconds until this WebTest will timeout and fail. Default value is 30. */ + timeout?: number; + /** The kind of web test this is, valid choices are ping and multistep. */ + webTestKind?: WebTestKind; + /** Allow for retries should this WebTest fail. */ + retryEnabled?: boolean; + /** A list of where to physically run the tests from to give global coverage for accessibility of your application. */ + locations?: WebTestGeolocation[]; + /** An XML configuration specification for a WebTest. */ + configuration?: WebTestPropertiesConfiguration; /** - * Azure resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly provisioningState?: string; +}; + +/** An Application Insights workbook template definition. */ +export type WorkbookTemplate = WorkbookTemplateResource & { + /** Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. */ + priority?: number; + /** Information about the author of the workbook template. */ + author?: string; + /** Valid JSON object containing workbook template payload. */ + templateData?: Record; + /** Workbook galleries supported by the template. */ + galleries?: WorkbookTemplateGallery[]; + /** Key value pair of localized gallery. Each key is the locale code of languages supported by the Azure portal. */ + localized?: { [propertyName: string]: WorkbookTemplateLocalizedGallery[] }; +}; + +/** An Application Insights private workbook definition. */ +export type MyWorkbook = MyWorkbookResource & { + /** The kind of workbook. Choices are user and shared. */ + kind?: Kind; /** - * Azure resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly systemData?: SystemData; + /** The user-defined name of the private workbook. */ + displayName?: string; + /** Configuration of this particular private workbook. Configuration data is a string containing valid JSON */ + serializedData?: string; + /** This instance's version of the data model. This can change as new features are added that can be marked private workbook. */ + version?: string; /** - * Resource location + * Date and time in UTC of the last modification that was made to this private workbook definition. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - location: string; + readonly timeModified?: string; + /** Workbook category, as defined by the user at creation time. */ + category?: string; + /** A list of 0 or more tags that are associated with this private workbook definition */ + tagsPropertiesTags?: string[]; /** - * Resource tags + * Unique user id of the specific user that owns this private workbook. + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly userId?: string; + /** Optional resourceId for a source resource. */ + sourceId?: string; + /** BYOS Storage Account URI */ + storageUri?: string; +}; + +/** Identity used for BYOS */ +export type WorkbookResourceIdentity = ManagedServiceIdentity & {}; + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export type TrackedResource = Resource & { + /** Resource tags. */ tags?: { [propertyName: string]: string }; -} + /** The geo-location where the resource lives */ + location: string; +}; -/** - * The private link scope resource reference. - */ -export interface PrivateLinkScopedResource { - /** - * The full resource Id of the private link scope resource. - */ - resourceId?: string; - /** - * The private link scope unique Identifier. - */ - scopeId?: string; -} +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export type ProxyResource = Resource & {}; -/** - * An Application Insights component definition. - */ -export interface ApplicationInsightsComponent extends ComponentsResource { - /** - * The kind of application that this component refers to, used to customize UI. This value is a - * freeform string, values should typically be one of the following: web, ios, other, store, - * java, phone. - */ +/** An Application Insights component definition. */ +export type ApplicationInsightsComponent = ComponentsResource & { + /** The kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. */ kind: string; + /** Resource etag */ + etag?: string; /** * The unique ID of your application. This field mirrors the 'Name' field and cannot be changed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly applicationId?: string; /** * Application Insights Unique ID for your Application. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly appId?: string; /** - * Type of application being monitored. Possible values include: 'web', 'other'. Default value: - * 'web'. - */ - applicationType: ApplicationType; - /** - * Used by the Application Insights system to determine what kind of flow this component was - * created by. This is to be set to 'Bluefield' when creating/updating a component via the REST - * API. Possible values include: 'Bluefield'. Default value: 'Bluefield'. + * Application name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly namePropertiesName?: string; + /** Type of application being monitored. */ + applicationType?: ApplicationType; + /** Used by the Application Insights system to determine what kind of flow this component was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. */ flowType?: FlowType; - /** - * Describes what tool created this Application Insights component. Customers using this API - * should set this to the default 'rest'. Possible values include: 'rest'. Default value: 'rest'. - */ + /** Describes what tool created this Application Insights component. Customers using this API should set this to the default 'rest'. */ requestSource?: RequestSource; /** - * Application Insights Instrumentation key. A read-only value that applications can use to - * identify the destination for all telemetry sent to Azure Application Insights. This value will - * be supplied upon construction of each new Application Insights component. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Application Insights Instrumentation key. A read-only value that applications can use to identify the destination for all telemetry sent to Azure Application Insights. This value will be supplied upon construction of each new Application Insights component. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly instrumentationKey?: string; /** * Creation Date for the Application Insights component, in ISO 8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly creationDate?: Date; /** * Azure Tenant Id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly tenantId?: string; - /** - * The unique application ID created when a new application is added to HockeyApp, used for - * communications with HockeyApp. - */ + /** The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp. */ hockeyAppId?: string; /** * Token used to authenticate communications with between Application Insights and HockeyApp. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly hockeyAppToken?: string; /** - * Current state of this component: whether or not is has been provisioned within the resource - * group it is defined. Users cannot change this value but are able to read from it. Values will - * include Succeeded, Deploying, Canceled, and Failed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Current state of this component: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; - /** - * Percentage of the data produced by the application being monitored that is being sampled for - * Application Insights telemetry. - */ + /** Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry. */ samplingPercentage?: number; /** * Application Insights component connection string. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly connectionString?: string; - /** - * Retention period in days. Default value: 90. - */ + /** Retention period in days. */ retentionInDays?: number; - /** - * Disable IP masking. - */ + /** Disable IP masking. */ disableIpMasking?: boolean; + /** Purge data immediately after 30 days. */ + immediatePurgeDataOn30Days?: boolean; + /** Resource Id of the log analytics workspace which the data will be ingested to. This property is required to create an application with this API version. Applications from older versions will not have this property. */ + workspaceResourceId?: string; /** - * Purge data immediately after 30 days. + * The date which the component got migrated to LA, in ISO 8601 format. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - immediatePurgeDataOn30Days?: boolean; + readonly laMigrationDate?: Date; /** * List of linked private link scope resources. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; - /** - * The network access type for accessing Application Insights ingestion. Possible values include: - * 'Enabled', 'Disabled'. Default value: 'Enabled'. - */ + /** The network access type for accessing Application Insights ingestion. */ publicNetworkAccessForIngestion?: PublicNetworkAccessType; - /** - * The network access type for accessing Application Insights query. Possible values include: - * 'Enabled', 'Disabled'. Default value: 'Enabled'. - */ + /** The network access type for accessing Application Insights query. */ publicNetworkAccessForQuery?: PublicNetworkAccessType; - /** - * Indicates the flow of the ingestion. Possible values include: 'ApplicationInsights', - * 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default value: - * 'ApplicationInsights'. - */ + /** Indicates the flow of the ingestion. */ ingestionMode?: IngestionMode; -} + /** Disable Non-AAD based Auth. */ + disableLocalAuth?: boolean; + /** Force users to create their own storage account for profiler and debugger. */ + forceCustomerStorageForProfiler?: boolean; +}; -/** - * User-defined filters to return data which will be purged from the table. - */ -export interface ComponentPurgeBodyFilters { +/** An azure resource object */ +export type WorkbookResource = TrackedResource & { + /** Identity used for BYOS */ + identity?: WorkbookResourceIdentity; + /** The kind of workbook. Choices are user and shared. */ + kind?: Kind; + /** Resource etag */ + etag?: string; +}; + +/** An Application Insights component linked storage accounts */ +export type ComponentLinkedStorageAccounts = ProxyResource & { + /** Linked storage account resource ID */ + linkedStorageAccount?: string; +}; + +/** An Application Insights workbook definition. */ +export type Workbook = WorkbookResource & { /** - * The column of the table over which the given query should run + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - column?: string; + readonly systemData?: SystemData; + /** The user-defined name (display name) of the workbook. */ + displayName?: string; + /** Configuration of this particular workbook. Configuration data is a string containing valid JSON */ + serializedData?: string; + /** Workbook schema version format, like 'Notebook/1.0', which should match the workbook in serializedData */ + version?: string; /** - * A query operator to evaluate over the provided column and value(s). Supported operators are - * ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a KQL - * query. + * Date and time in UTC of the last modification that was made to this workbook definition. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - operator?: string; + readonly timeModified?: Date; + /** Workbook category, as defined by the user at creation time. */ + category?: string; + /** Being deprecated, please use the other tags field */ + tagsPropertiesTags?: string[]; /** - * the value for the operator to function over. This can be a number (e.g., > 100), a string - * (timestamp >= '2017-09-01') or array of values. + * Unique user id of the specific user that owns this workbook. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - value?: any; + readonly userId?: string; + /** ResourceId for a source resource. */ + sourceId?: string; + /** The resourceId to the storage account when bring your own storage is used */ + storageUri?: string; + /** The description of the workbook. */ + description?: string; /** - * When filtering over custom dimensions, this key will be used as the name of the custom - * dimension. + * The unique revision id for this workbook definition + * NOTE: This property will not be serialized. It can only be populated by the server. */ - key?: string; + readonly revision?: string; +}; + +/** Known values of {@link FavoriteSourceType} that the service accepts. */ +export enum KnownFavoriteSourceType { + Retention = "retention", + Notebook = "notebook", + Sessions = "sessions", + Events = "events", + Userflows = "userflows", + Funnel = "funnel", + Impact = "impact", + Segmentation = "segmentation" } /** - * Describes the body of a purge request for an App Insights component + * Defines values for FavoriteSourceType. \ + * {@link KnownFavoriteSourceType} can be used interchangeably with FavoriteSourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **retention** \ + * **notebook** \ + * **sessions** \ + * **events** \ + * **userflows** \ + * **funnel** \ + * **impact** \ + * **segmentation** */ -export interface ComponentPurgeBody { - /** - * Table from which to purge data. - */ - table: string; - /** - * The set of columns and filters (queries) to run over them to purge the resulting data. - */ - filters: ComponentPurgeBodyFilters[]; +export type FavoriteSourceType = string; + +/** Known values of {@link ItemScopePath} that the service accepts. */ +export enum KnownItemScopePath { + AnalyticsItems = "analyticsItems", + MyanalyticsItems = "myanalyticsItems" } /** - * Response containing operationId for a specific purge action. + * Defines values for ItemScopePath. \ + * {@link KnownItemScopePath} can be used interchangeably with ItemScopePath, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **analyticsItems** \ + * **myanalyticsItems** */ -export interface ComponentPurgeResponse { - /** - * Id to use when querying for status for a particular purge operation. - */ - operationId: string; +export type ItemScopePath = string; + +/** Known values of {@link ItemScope} that the service accepts. */ +export enum KnownItemScope { + Shared = "shared", + User = "user" } /** - * Response containing status for a specific purge operation. + * Defines values for ItemScope. \ + * {@link KnownItemScope} can be used interchangeably with ItemScope, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **shared** \ + * **user** */ -export interface ComponentPurgeStatusResponse { - /** - * Status of the operation represented by the requested Id. Possible values include: 'pending', - * 'completed' - */ - status: PurgeState; +export type ItemScope = string; + +/** Known values of {@link ItemTypeParameter} that the service accepts. */ +export enum KnownItemTypeParameter { + None = "none", + Query = "query", + Function = "function", + Folder = "folder", + Recent = "recent" } /** - * An interface representing Resource. + * Defines values for ItemTypeParameter. \ + * {@link KnownItemTypeParameter} can be used interchangeably with ItemTypeParameter, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **none** \ + * **query** \ + * **function** \ + * **folder** \ + * **recent** */ -export interface Resource extends BaseResource { - /** - * Fully qualified resource Id for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - 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. Ex- 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; +export type ItemTypeParameter = string; + +/** Known values of {@link ItemType} that the service accepts. */ +export enum KnownItemType { + None = "none", + Query = "query", + Recent = "recent", + Function = "function" } /** - * The resource model definition for a ARM proxy resource. It will have everything other than - * required location and tags + * Defines values for ItemType. \ + * {@link KnownItemType} can be used interchangeably with ItemType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **none** \ + * **query** \ + * **recent** \ + * **function** */ -export interface ProxyResource extends Resource { +export type ItemType = string; + +/** Known values of {@link CategoryType} that the service accepts. */ +export enum KnownCategoryType { + Workbook = "workbook", + TSG = "TSG", + Performance = "performance", + Retention = "retention" } /** - * An Application Insights component linked storage accounts + * Defines values for CategoryType. \ + * {@link KnownCategoryType} can be used interchangeably with CategoryType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **workbook** \ + * **TSG** \ + * **performance** \ + * **retention** */ -export interface ComponentLinkedStorageAccounts extends ProxyResource { - /** - * Linked storage account resource ID - */ - linkedStorageAccount?: string; -} +export type CategoryType = string; -/** - * An Application Insights component linked storage accounts patch - */ -export interface ComponentLinkedStorageAccountsPatch { - /** - * Linked storage account resource ID - */ - linkedStorageAccount?: string; +/** Known values of {@link Kind} that the service accepts. */ +export enum KnownKind { + User = "user", + Shared = "shared" } /** - * The resource model definition for a ARM tracked top level resource + * Defines values for Kind. \ + * {@link KnownKind} can be used interchangeably with Kind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **shared** */ -export interface TrackedResource extends Resource { - /** - * Resource tags. - */ - tags?: { [propertyName: string]: string }; - /** - * The geo-location where the resource lives - */ - location: string; -} +export type Kind = string; -/** - * The resource model definition for a Azure Resource Manager resource with an etag. - */ -export interface AzureEntityResource extends Resource { - /** - * Resource Etag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly etag?: string; +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" } /** - * The response to a live token query. + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** */ -export interface LiveTokenResponse { - /** - * JWT token for accessing live metrics stream data. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly liveToken?: string; -} +export type CreatedByType = string; -/** - * Information about an operation - */ -export interface OperationInfo { - /** - * Name of the provider - */ - provider?: string; - /** - * Name of the resource type - */ - resource?: string; - /** - * Name of the operation - */ - operation?: string; - /** - * Description of the operation - */ - description?: string; +/** Known values of {@link MyWorkbookManagedIdentityType} that the service accepts. */ +export enum KnownMyWorkbookManagedIdentityType { + UserAssigned = "UserAssigned", + None = "None" } /** - * Represents an operation returned by the GetOperations request + * Defines values for MyWorkbookManagedIdentityType. \ + * {@link KnownMyWorkbookManagedIdentityType} can be used interchangeably with MyWorkbookManagedIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **UserAssigned** \ + * **None** */ -export interface OperationLive { - /** - * Name of the operation - */ - name?: string; - /** - * Display name of the operation - */ - display?: OperationInfo; - /** - * Origin of the operation - */ - origin?: string; - /** - * Properties of the operation - */ - properties?: any; -} +export type MyWorkbookManagedIdentityType = string; -/** - * Optional Parameters. - */ -export interface FavoritesListOptionalParams extends msRest.RequestOptionsBase { - /** - * The type of favorite. Value can be either shared or user. Possible values include: 'shared', - * 'user'. Default value: 'shared'. - */ - favoriteType?: FavoriteType; - /** - * Source type of favorite to return. When left out, the source type defaults to 'other' (not - * present in this enum). Possible values include: 'retention', 'notebook', 'sessions', 'events', - * 'userflows', 'funnel', 'impact', 'segmentation' - */ - sourceType?: FavoriteSourceType; - /** - * Flag indicating whether or not to return the full content for each applicable favorite. If - * false, only return summary content for favorites. - */ - canFetchContent?: boolean; - /** - * Tags that must be present on each favorite returned. - */ - tags?: string[]; +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + UserAssigned = "UserAssigned", + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" } /** - * Optional Parameters. + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned,UserAssigned** */ -export interface AnalyticsItemsListOptionalParams extends msRest.RequestOptionsBase { - /** - * Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. Possible values include: 'shared', - * 'user'. Default value: 'shared'. - */ - scope?: ItemScope; - /** - * Enum indicating the type of the Analytics item. Possible values include: 'none', 'query', - * 'function', 'folder', 'recent'. Default value: 'none'. - */ - type?: ItemTypeParameter; - /** - * Flag indicating whether or not to return the content of each applicable item. If false, only - * return the item information. - */ - includeContent?: boolean; -} +export type ManagedServiceIdentityType = string; -/** - * Optional Parameters. - */ -export interface AnalyticsItemsGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The Id of a specific item defined in the Application Insights component - */ - id?: string; - /** - * The name of a specific item defined in the Application Insights component - */ - name?: string; +/** Known values of {@link SharedTypeKind} that the service accepts. */ +export enum KnownSharedTypeKind { + User = "user", + Shared = "shared" } /** - * Optional Parameters. + * Defines values for SharedTypeKind. \ + * {@link KnownSharedTypeKind} can be used interchangeably with SharedTypeKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **shared** */ -export interface AnalyticsItemsPutOptionalParams extends msRest.RequestOptionsBase { - /** - * Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. - */ - overrideItem?: boolean; -} +export type SharedTypeKind = string; -/** - * Optional Parameters. - */ -export interface AnalyticsItemsDeleteMethodOptionalParams extends msRest.RequestOptionsBase { - /** - * The Id of a specific item defined in the Application Insights component - */ - id?: string; - /** - * The name of a specific item defined in the Application Insights component - */ - name?: string; +/** Known values of {@link ApplicationType} that the service accepts. */ +export enum KnownApplicationType { + Web = "web", + Other = "other" } /** - * Optional Parameters. + * 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 + * **web** \ + * **other** */ -export interface WorkbooksListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * Tags presents on each workbook returned. - */ - tags?: string[]; - /** - * Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - */ - canFetchContent?: boolean; -} +export type ApplicationType = string; -/** - * Optional Parameters. - */ -export interface MyWorkbooksListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * Tags presents on each workbook returned. - */ - tags?: string[]; - /** - * Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - */ - canFetchContent?: boolean; +/** Known values of {@link FlowType} that the service accepts. */ +export enum KnownFlowType { + Bluefield = "Bluefield" } /** - * Optional Parameters. + * Defines values for FlowType. \ + * {@link KnownFlowType} can be used interchangeably with FlowType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Bluefield** */ -export interface MyWorkbooksListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { - /** - * Tags presents on each workbook returned. - */ - tags?: string[]; - /** - * Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - */ - canFetchContent?: boolean; -} +export type FlowType = string; -/** - * An interface representing ApplicationInsightsManagementClientOptions. - */ -export interface ApplicationInsightsManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; +/** Known values of {@link RequestSource} that the service accepts. */ +export enum KnownRequestSource { + Rest = "rest" } /** - * @interface - * Result of the request to list CDN operations. It contains a list of operations and a URL link to - * get the next set of results. - * @extends Array + * Defines values for RequestSource. \ + * {@link KnownRequestSource} can be used interchangeably with RequestSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **rest** */ -export interface OperationListResult extends Array { - /** - * URL to get the next set of operation list results if there are any. - */ - nextLink?: string; -} +export type RequestSource = string; -/** - * @interface - * Result of the List Operations operation - * @extends Array - */ -export interface OperationsListResult extends Array { - /** - * URL to get the next set of operation list results if there are any. - */ - nextLink?: string; +/** Known values of {@link PublicNetworkAccessType} that the service accepts. */ +export enum KnownPublicNetworkAccessType { + /** Enables connectivity to Application Insights through public DNS. */ + Enabled = "Enabled", + /** Disables public connectivity to Application Insights through public DNS. */ + Disabled = "Disabled" } /** - * @interface - * Annotations list result. - * @extends Array + * Defines values for PublicNetworkAccessType. \ + * {@link KnownPublicNetworkAccessType} can be used interchangeably with PublicNetworkAccessType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Enables connectivity to Application Insights through public DNS. \ + * **Disabled**: Disables public connectivity to Application Insights through public DNS. */ -export interface AnnotationsListResult extends Array { -} +export type PublicNetworkAccessType = string; -/** - * @interface - * Describes the list of API Keys of an Application Insights Component. - * @extends Array - */ -export interface ApplicationInsightsComponentAPIKeyListResult extends Array { +/** Known values of {@link IngestionMode} that the service accepts. */ +export enum KnownIngestionMode { + ApplicationInsights = "ApplicationInsights", + ApplicationInsightsWithDiagnosticSettings = "ApplicationInsightsWithDiagnosticSettings", + LogAnalytics = "LogAnalytics" } /** - * @interface - * Work item configuration list result. - * @extends Array + * Defines values for IngestionMode. \ + * {@link KnownIngestionMode} can be used interchangeably with IngestionMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ApplicationInsights** \ + * **ApplicationInsightsWithDiagnosticSettings** \ + * **LogAnalytics** */ -export interface WorkItemConfigurationsListResult extends Array { -} +export type IngestionMode = string; -/** - * @interface - * Describes the list of web test locations available to an Application Insights Component. - * @extends Array - */ -export interface ApplicationInsightsWebTestLocationsListResult extends Array { +/** Known values of {@link PurgeState} that the service accepts. */ +export enum KnownPurgeState { + Pending = "pending", + Completed = "completed" } /** - * @interface - * A list of 0 or more Application Insights web test definitions. - * @extends Array + * Defines values for PurgeState. \ + * {@link KnownPurgeState} can be used interchangeably with PurgeState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **pending** \ + * **completed** */ -export interface WebTestListResult extends Array { - /** - * The link to get the next part of the returned list of web tests, should the return set be too - * large for a single request. May be null. - */ - nextLink?: string; -} +export type PurgeState = string; -/** - * @interface - * Workbook list result. - * @extends Array - */ -export interface WorkbooksListResult extends Array { +/** Known values of {@link StorageType} that the service accepts. */ +export enum KnownStorageType { + ServiceProfiler = "ServiceProfiler" } /** - * @interface - * Workbook list result. - * @extends Array + * Defines values for StorageType. \ + * {@link KnownStorageType} can be used interchangeably with StorageType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ServiceProfiler** */ -export interface MyWorkbooksListResult extends Array { -} +export type StorageType = string; +/** Defines values for FavoriteType. */ +export type FavoriteType = "shared" | "user"; +/** Defines values for WebTestKind. */ +export type WebTestKind = "ping" | "multistep"; -/** - * @interface - * Describes the list of Application Insights Resources. - * @extends Array - */ -export interface ApplicationInsightsComponentListResult extends Array { - /** - * The URI to get the next set of Application Insights component definitions if too many - * components where returned in the result set. - */ - nextLink?: string; -} +/** Optional parameters. */ +export interface AnnotationsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for FavoriteType. - * Possible values include: 'shared', 'user' - * @readonly - * @enum {string} - */ -export type FavoriteType = 'shared' | 'user'; +/** Contains response data for the list operation. */ +export type AnnotationsListResponse = AnnotationsListResult; -/** - * Defines values for WebTestKind. - * Possible values include: 'ping', 'multistep' - * @readonly - * @enum {string} - */ -export type WebTestKind = 'ping' | 'multistep'; +/** Optional parameters. */ +export interface AnnotationsCreateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ItemScope. - * Possible values include: 'shared', 'user' - * @readonly - * @enum {string} - */ -export type ItemScope = 'shared' | 'user'; +/** Contains response data for the create operation. */ +export type AnnotationsCreateResponse = Annotation[]; -/** - * Defines values for ItemType. - * Possible values include: 'query', 'function', 'folder', 'recent' - * @readonly - * @enum {string} - */ -export type ItemType = 'query' | 'function' | 'folder' | 'recent'; +/** Optional parameters. */ +export interface AnnotationsDeleteOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for SharedTypeKind. - * Possible values include: 'user', 'shared' - * @readonly - * @enum {string} - */ -export type SharedTypeKind = 'user' | 'shared'; +/** Optional parameters. */ +export interface AnnotationsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ApplicationType. - * Possible values include: 'web', 'other' - * @readonly - * @enum {string} - */ -export type ApplicationType = 'web' | 'other'; +/** Contains response data for the get operation. */ +export type AnnotationsGetResponse = Annotation[]; -/** - * Defines values for FlowType. - * Possible values include: 'Bluefield' - * @readonly - * @enum {string} - */ -export type FlowType = 'Bluefield'; +/** Optional parameters. */ +export interface APIKeysListOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for RequestSource. - * Possible values include: 'rest' - * @readonly - * @enum {string} - */ -export type RequestSource = 'rest'; +/** Contains response data for the list operation. */ +export type APIKeysListResponse = ApplicationInsightsComponentAPIKeyListResult; -/** - * Defines values for PublicNetworkAccessType. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type PublicNetworkAccessType = 'Enabled' | 'Disabled'; +/** Optional parameters. */ +export interface APIKeysCreateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for IngestionMode. - * Possible values include: 'ApplicationInsights', 'ApplicationInsightsWithDiagnosticSettings', - * 'LogAnalytics' - * @readonly - * @enum {string} - */ -export type IngestionMode = 'ApplicationInsights' | 'ApplicationInsightsWithDiagnosticSettings' | 'LogAnalytics'; +/** Contains response data for the create operation. */ +export type APIKeysCreateResponse = ApplicationInsightsComponentAPIKey; -/** - * Defines values for PurgeState. - * Possible values include: 'pending', 'completed' - * @readonly - * @enum {string} - */ -export type PurgeState = 'pending' | 'completed'; +/** Optional parameters. */ +export interface APIKeysDeleteOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for FavoriteSourceType. - * Possible values include: 'retention', 'notebook', 'sessions', 'events', 'userflows', 'funnel', - * 'impact', 'segmentation' - * @readonly - * @enum {string} - */ -export type FavoriteSourceType = 'retention' | 'notebook' | 'sessions' | 'events' | 'userflows' | 'funnel' | 'impact' | 'segmentation'; +/** Contains response data for the delete operation. */ +export type APIKeysDeleteResponse = ApplicationInsightsComponentAPIKey; -/** - * Defines values for ItemScopePath. - * Possible values include: 'analyticsItems', 'myanalyticsItems' - * @readonly - * @enum {string} - */ -export type ItemScopePath = 'analyticsItems' | 'myanalyticsItems'; +/** Optional parameters. */ +export interface APIKeysGetOptionalParams extends coreClient.OperationOptions {} -/** - * Defines values for ItemTypeParameter. - * Possible values include: 'none', 'query', 'function', 'folder', 'recent' - * @readonly - * @enum {string} - */ -export type ItemTypeParameter = 'none' | 'query' | 'function' | 'folder' | 'recent'; +/** Contains response data for the get operation. */ +export type APIKeysGetResponse = ApplicationInsightsComponentAPIKey; -/** - * Defines values for CategoryType. - * Possible values include: 'workbook', 'TSG', 'performance', 'retention' - * @readonly - * @enum {string} - */ -export type CategoryType = 'workbook' | 'TSG' | 'performance' | 'retention'; +/** Optional parameters. */ +export interface ExportConfigurationsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type OperationsListResponse = OperationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type ExportConfigurationsListResponse = ApplicationInsightsComponentExportConfiguration[]; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationListResult; - }; -}; +/** Optional parameters. */ +export interface ExportConfigurationsCreateOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list1 operation. - */ -export type OperationsList1Response = OperationsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the create operation. */ +export type ExportConfigurationsCreateResponse = ApplicationInsightsComponentExportConfiguration[]; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationsListResult; - }; -}; +/** Optional parameters. */ +export interface ExportConfigurationsDeleteOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listNext operation. - */ -export type OperationsListNextResponse = OperationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the delete operation. */ +export type ExportConfigurationsDeleteResponse = ApplicationInsightsComponentExportConfiguration; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationListResult; - }; -}; +/** Optional parameters. */ +export interface ExportConfigurationsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list1Next operation. - */ -export type OperationsList1NextResponse = OperationsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type ExportConfigurationsGetResponse = ApplicationInsightsComponentExportConfiguration; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationsListResult; - }; -}; +/** Optional parameters. */ +export interface ExportConfigurationsUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type AnnotationsListResponse = AnnotationsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type ExportConfigurationsUpdateResponse = ApplicationInsightsComponentExportConfiguration; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AnnotationsListResult; - }; -}; +/** Optional parameters. */ +export interface ComponentCurrentBillingFeaturesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the create operation. - */ -export type AnnotationsCreateResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type ComponentCurrentBillingFeaturesGetResponse = ApplicationInsightsComponentBillingFeatures; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Annotation[]; - }; -}; +/** Optional parameters. */ +export interface ComponentCurrentBillingFeaturesUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type AnnotationsGetResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type ComponentCurrentBillingFeaturesUpdateResponse = ApplicationInsightsComponentBillingFeatures; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Annotation[]; - }; -}; +/** Optional parameters. */ +export interface ComponentQuotaStatusGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type APIKeysListResponse = ApplicationInsightsComponentAPIKeyListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type ComponentQuotaStatusGetResponse = ApplicationInsightsComponentQuotaStatus; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentAPIKeyListResult; - }; -}; +/** Optional parameters. */ +export interface ComponentFeatureCapabilitiesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the create operation. - */ -export type APIKeysCreateResponse = ApplicationInsightsComponentAPIKey & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type ComponentFeatureCapabilitiesGetResponse = ApplicationInsightsComponentFeatureCapabilities; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentAPIKey; - }; -}; +/** Optional parameters. */ +export interface ComponentAvailableFeaturesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the deleteMethod operation. - */ -export type APIKeysDeleteMethodResponse = ApplicationInsightsComponentAPIKey & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type ComponentAvailableFeaturesGetResponse = ApplicationInsightsComponentAvailableFeatures; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentAPIKey; - }; -}; +/** Optional parameters. */ +export interface ProactiveDetectionConfigurationsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type APIKeysGetResponse = ApplicationInsightsComponentAPIKey & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type ProactiveDetectionConfigurationsListResponse = ApplicationInsightsComponentProactiveDetectionConfiguration[]; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentAPIKey; - }; -}; +/** Optional parameters. */ +export interface ProactiveDetectionConfigurationsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type ExportConfigurationsListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type ProactiveDetectionConfigurationsGetResponse = ApplicationInsightsComponentProactiveDetectionConfiguration; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentExportConfiguration[]; - }; -}; +/** Optional parameters. */ +export interface ProactiveDetectionConfigurationsUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the create operation. - */ -export type ExportConfigurationsCreateResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type ProactiveDetectionConfigurationsUpdateResponse = ApplicationInsightsComponentProactiveDetectionConfiguration; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentExportConfiguration[]; - }; -}; +/** Optional parameters. */ +export interface WorkItemConfigurationsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the deleteMethod operation. - */ -export type ExportConfigurationsDeleteMethodResponse = ApplicationInsightsComponentExportConfiguration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type WorkItemConfigurationsListResponse = WorkItemConfigurationsListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentExportConfiguration; - }; -}; +/** Optional parameters. */ +export interface WorkItemConfigurationsCreateOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type ExportConfigurationsGetResponse = ApplicationInsightsComponentExportConfiguration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the create operation. */ +export type WorkItemConfigurationsCreateResponse = WorkItemConfiguration; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentExportConfiguration; - }; -}; +/** Optional parameters. */ +export interface WorkItemConfigurationsGetDefaultOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the update operation. - */ -export type ExportConfigurationsUpdateResponse = ApplicationInsightsComponentExportConfiguration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getDefault operation. */ +export type WorkItemConfigurationsGetDefaultResponse = WorkItemConfiguration; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentExportConfiguration; - }; -}; +/** Optional parameters. */ +export interface WorkItemConfigurationsDeleteOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type ComponentCurrentBillingFeaturesGetResponse = ApplicationInsightsComponentBillingFeatures & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WorkItemConfigurationsGetItemOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentBillingFeatures; - }; -}; +/** Contains response data for the getItem operation. */ +export type WorkItemConfigurationsGetItemResponse = WorkItemConfiguration; -/** - * Contains response data for the update operation. - */ -export type ComponentCurrentBillingFeaturesUpdateResponse = ApplicationInsightsComponentBillingFeatures & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WorkItemConfigurationsUpdateItemOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentBillingFeatures; - }; -}; +/** Contains response data for the updateItem operation. */ +export type WorkItemConfigurationsUpdateItemResponse = WorkItemConfiguration; -/** - * Contains response data for the get operation. - */ -export type ComponentQuotaStatusGetResponse = ApplicationInsightsComponentQuotaStatus & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface FavoritesListOptionalParams + extends coreClient.OperationOptions { + /** The type of favorite. Value can be either shared or user. */ + favoriteType?: FavoriteType; + /** Source type of favorite to return. When left out, the source type defaults to 'other' (not present in this enum). */ + sourceType?: FavoriteSourceType; + /** Flag indicating whether or not to return the full content for each applicable favorite. If false, only return summary content for favorites. */ + canFetchContent?: boolean; + /** Tags that must be present on each favorite returned. */ + tags?: string[]; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentQuotaStatus; - }; -}; +/** Contains response data for the list operation. */ +export type FavoritesListResponse = ApplicationInsightsComponentFavorite[]; -/** - * Contains response data for the get operation. - */ -export type ComponentFeatureCapabilitiesGetResponse = ApplicationInsightsComponentFeatureCapabilities & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface FavoritesGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentFeatureCapabilities; - }; -}; +/** Contains response data for the get operation. */ +export type FavoritesGetResponse = ApplicationInsightsComponentFavorite; -/** - * Contains response data for the get operation. - */ -export type ComponentAvailableFeaturesGetResponse = ApplicationInsightsComponentAvailableFeatures & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface FavoritesAddOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentAvailableFeatures; - }; -}; +/** Contains response data for the add operation. */ +export type FavoritesAddResponse = ApplicationInsightsComponentFavorite; -/** - * Contains response data for the list operation. - */ -export type ProactiveDetectionConfigurationsListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface FavoritesUpdateOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentProactiveDetectionConfiguration[]; - }; -}; +/** Contains response data for the update operation. */ +export type FavoritesUpdateResponse = ApplicationInsightsComponentFavorite; -/** - * Contains response data for the get operation. - */ -export type ProactiveDetectionConfigurationsGetResponse = ApplicationInsightsComponentProactiveDetectionConfiguration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface FavoritesDeleteOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentProactiveDetectionConfiguration; - }; -}; +/** Optional parameters. */ +export interface WebTestLocationsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the update operation. - */ -export type ProactiveDetectionConfigurationsUpdateResponse = ApplicationInsightsComponentProactiveDetectionConfiguration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type WebTestLocationsListResponse = ApplicationInsightsWebTestLocationsListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentProactiveDetectionConfiguration; - }; -}; +/** Optional parameters. */ +export interface WebTestsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type WorkItemConfigurationsListResponse = WorkItemConfigurationsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByResourceGroup operation. */ +export type WebTestsListByResourceGroupResponse = WebTestListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: WorkItemConfigurationsListResult; - }; -}; +/** Optional parameters. */ +export interface WebTestsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the create operation. - */ -export type WorkItemConfigurationsCreateResponse = WorkItemConfiguration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type WebTestsGetResponse = WebTest; - /** - * The response body as parsed JSON or XML - */ - parsedBody: WorkItemConfiguration; - }; -}; +/** Optional parameters. */ +export interface WebTestsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the getDefault operation. - */ -export type WorkItemConfigurationsGetDefaultResponse = WorkItemConfiguration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type WebTestsCreateOrUpdateResponse = WebTest; - /** - * The response body as parsed JSON or XML - */ - parsedBody: WorkItemConfiguration; - }; -}; +/** Optional parameters. */ +export interface WebTestsUpdateTagsOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the getItem operation. - */ -export type WorkItemConfigurationsGetItemResponse = WorkItemConfiguration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the updateTags operation. */ +export type WebTestsUpdateTagsResponse = WebTest; - /** - * The response body as parsed JSON or XML - */ - parsedBody: WorkItemConfiguration; - }; -}; +/** Optional parameters. */ +export interface WebTestsDeleteOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the updateItem operation. - */ -export type WorkItemConfigurationsUpdateItemResponse = WorkItemConfiguration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WebTestsListOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: WorkItemConfiguration; - }; -}; +/** Contains response data for the list operation. */ +export type WebTestsListResponse = WebTestListResult; -/** - * Contains response data for the list operation. - */ -export type FavoritesListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WebTestsListByComponentOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentFavorite[]; - }; -}; +/** Contains response data for the listByComponent operation. */ +export type WebTestsListByComponentResponse = WebTestListResult; -/** - * Contains response data for the get operation. - */ -export type FavoritesGetResponse = ApplicationInsightsComponentFavorite & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WebTestsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentFavorite; - }; -}; +/** Contains response data for the listByResourceGroupNext operation. */ +export type WebTestsListByResourceGroupNextResponse = WebTestListResult; -/** - * Contains response data for the add operation. - */ -export type FavoritesAddResponse = ApplicationInsightsComponentFavorite & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WebTestsListNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentFavorite; - }; -}; +/** Contains response data for the listNext operation. */ +export type WebTestsListNextResponse = WebTestListResult; -/** - * Contains response data for the update operation. - */ -export type FavoritesUpdateResponse = ApplicationInsightsComponentFavorite & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WebTestsListByComponentNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentFavorite; - }; -}; +/** Contains response data for the listByComponentNext operation. */ +export type WebTestsListByComponentNextResponse = WebTestListResult; -/** - * Contains response data for the list operation. - */ -export type WebTestLocationsListResponse = ApplicationInsightsWebTestLocationsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface AnalyticsItemsListOptionalParams + extends coreClient.OperationOptions { + /** Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component. */ + scope?: ItemScope; + /** Enum indicating the type of the Analytics item. */ + typeParam?: ItemTypeParameter; + /** Flag indicating whether or not to return the content of each applicable item. If false, only return the item information. */ + includeContent?: boolean; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsWebTestLocationsListResult; - }; -}; +/** Contains response data for the list operation. */ +export type AnalyticsItemsListResponse = ApplicationInsightsComponentAnalyticsItem[]; -/** - * Contains response data for the listByResourceGroup operation. - */ -export type WebTestsListByResourceGroupResponse = WebTestListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface AnalyticsItemsGetOptionalParams + extends coreClient.OperationOptions { + /** The Id of a specific item defined in the Application Insights component */ + id?: string; + /** The name of a specific item defined in the Application Insights component */ + name?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: WebTestListResult; - }; -}; +/** Contains response data for the get operation. */ +export type AnalyticsItemsGetResponse = ApplicationInsightsComponentAnalyticsItem; -/** - * Contains response data for the get operation. - */ -export type WebTestsGetResponse = WebTest & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface AnalyticsItemsPutOptionalParams + extends coreClient.OperationOptions { + /** Flag indicating whether or not to force save an item. This allows overriding an item if it already exists. */ + overrideItem?: boolean; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: WebTest; - }; -}; +/** Contains response data for the put operation. */ +export type AnalyticsItemsPutResponse = ApplicationInsightsComponentAnalyticsItem; -/** - * Contains response data for the createOrUpdate operation. - */ -export type WebTestsCreateOrUpdateResponse = WebTest & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface AnalyticsItemsDeleteOptionalParams + extends coreClient.OperationOptions { + /** The Id of a specific item defined in the Application Insights component */ + id?: string; + /** The name of a specific item defined in the Application Insights component */ + name?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: WebTest; - }; -}; +/** Optional parameters. */ +export interface WorkbookTemplatesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the updateTags operation. - */ -export type WebTestsUpdateTagsResponse = WebTest & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByResourceGroup operation. */ +export type WorkbookTemplatesListByResourceGroupResponse = WorkbookTemplatesListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: WebTest; - }; -}; +/** Optional parameters. */ +export interface WorkbookTemplatesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type WebTestsListResponse = WebTestListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type WorkbookTemplatesGetResponse = WorkbookTemplate; - /** - * The response body as parsed JSON or XML - */ - parsedBody: WebTestListResult; - }; -}; +/** Optional parameters. */ +export interface WorkbookTemplatesDeleteOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByComponent operation. - */ -export type WebTestsListByComponentResponse = WebTestListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WorkbookTemplatesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: WebTestListResult; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type WorkbookTemplatesCreateOrUpdateResponse = WorkbookTemplate; -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type WebTestsListByResourceGroupNextResponse = WebTestListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WorkbookTemplatesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Properties that need to be specified to patch a workbook template. */ + workbookTemplateUpdateParameters?: WorkbookTemplateUpdateParameters; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: WebTestListResult; - }; -}; +/** Contains response data for the update operation. */ +export type WorkbookTemplatesUpdateResponse = WorkbookTemplate; -/** - * Contains response data for the listNext operation. - */ -export type WebTestsListNextResponse = WebTestListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface MyWorkbooksListByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ + canFetchContent?: boolean; + /** Tags presents on each workbook returned. */ + tags?: string[]; + /** Azure Resource Id that will fetch all linked workbooks. */ + sourceId?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: WebTestListResult; - }; -}; +/** Contains response data for the listByResourceGroup operation. */ +export type MyWorkbooksListByResourceGroupResponse = MyWorkbooksListResult; -/** - * Contains response data for the listByComponentNext operation. - */ -export type WebTestsListByComponentNextResponse = WebTestListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface MyWorkbooksListBySubscriptionOptionalParams + extends coreClient.OperationOptions { + /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ + canFetchContent?: boolean; + /** Tags presents on each workbook returned. */ + tags?: string[]; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: WebTestListResult; - }; -}; +/** Contains response data for the listBySubscription operation. */ +export type MyWorkbooksListBySubscriptionResponse = MyWorkbooksListResult; -/** - * Contains response data for the list operation. - */ -export type AnalyticsItemsListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface MyWorkbooksGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentAnalyticsItem[]; - }; -}; +/** Contains response data for the get operation. */ +export type MyWorkbooksGetResponse = MyWorkbook; -/** - * Contains response data for the get operation. - */ -export type AnalyticsItemsGetResponse = ApplicationInsightsComponentAnalyticsItem & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface MyWorkbooksDeleteOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentAnalyticsItem; - }; -}; +/** Optional parameters. */ +export interface MyWorkbooksCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Azure Resource Id that will fetch all linked workbooks. */ + sourceId?: string; +} -/** - * Contains response data for the put operation. - */ -export type AnalyticsItemsPutResponse = ApplicationInsightsComponentAnalyticsItem & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type MyWorkbooksCreateOrUpdateResponse = MyWorkbook; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentAnalyticsItem; - }; -}; +/** Optional parameters. */ +export interface MyWorkbooksUpdateOptionalParams + extends coreClient.OperationOptions { + /** Azure Resource Id that will fetch all linked workbooks. */ + sourceId?: string; +} -/** - * Contains response data for the listByResourceGroup operation. - */ -export type WorkbooksListByResourceGroupResponse = WorkbooksListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type MyWorkbooksUpdateResponse = MyWorkbook; - /** - * The response body as parsed JSON or XML - */ - parsedBody: WorkbooksListResult; - }; -}; +/** Optional parameters. */ +export interface MyWorkbooksListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions { + /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ + canFetchContent?: boolean; + /** Tags presents on each workbook returned. */ + tags?: string[]; + /** Azure Resource Id that will fetch all linked workbooks. */ + sourceId?: string; +} -/** - * Contains response data for the get operation. - */ -export type WorkbooksGetResponse = Workbook & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByResourceGroupNext operation. */ +export type MyWorkbooksListByResourceGroupNextResponse = MyWorkbooksListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Workbook; - }; -}; +/** Optional parameters. */ +export interface MyWorkbooksListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions { + /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ + canFetchContent?: boolean; + /** Tags presents on each workbook returned. */ + tags?: string[]; +} -/** - * Contains response data for the createOrUpdate operation. - */ -export type WorkbooksCreateOrUpdateResponse = Workbook & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listBySubscriptionNext operation. */ +export type MyWorkbooksListBySubscriptionNextResponse = MyWorkbooksListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Workbook; - }; -}; +/** Optional parameters. */ +export interface WorkbooksListBySubscriptionOptionalParams + extends coreClient.OperationOptions { + /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ + canFetchContent?: boolean; + /** Tags presents on each workbook returned. */ + tags?: string[]; +} -/** - * Contains response data for the update operation. - */ -export type WorkbooksUpdateResponse = Workbook & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listBySubscription operation. */ +export type WorkbooksListBySubscriptionResponse = WorkbooksListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Workbook; - }; -}; +/** Optional parameters. */ +export interface WorkbooksListByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ + canFetchContent?: boolean; + /** Tags presents on each workbook returned. */ + tags?: string[]; + /** Azure Resource Id that will fetch all linked workbooks. */ + sourceId?: string; +} -/** - * Contains response data for the listByResourceGroup operation. - */ -export type MyWorkbooksListByResourceGroupResponse = MyWorkbooksListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByResourceGroup operation. */ +export type WorkbooksListByResourceGroupResponse = WorkbooksListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MyWorkbooksListResult; - }; -}; +/** Optional parameters. */ +export interface WorkbooksGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listBySubscription operation. - */ -export type MyWorkbooksListBySubscriptionResponse = MyWorkbooksListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type WorkbooksGetResponse = Workbook; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MyWorkbooksListResult; - }; -}; +/** Optional parameters. */ +export interface WorkbooksDeleteOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type MyWorkbooksGetResponse = MyWorkbook & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WorkbooksCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Azure Resource Id that will fetch all linked workbooks. */ + sourceId?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MyWorkbook; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type WorkbooksCreateOrUpdateResponse = Workbook; -/** - * Contains response data for the createOrUpdate operation. - */ -export type MyWorkbooksCreateOrUpdateResponse = MyWorkbook & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WorkbooksUpdateOptionalParams + extends coreClient.OperationOptions { + /** Azure Resource Id that will fetch all linked workbooks. */ + sourceId?: string; + /** Properties that need to be specified to create a new workbook. */ + workbookUpdateParameters?: WorkbookUpdateParameters; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MyWorkbook; - }; -}; +/** Contains response data for the update operation. */ +export type WorkbooksUpdateResponse = Workbook; -/** - * Contains response data for the update operation. - */ -export type MyWorkbooksUpdateResponse = MyWorkbook & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WorkbooksRevisionsListOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MyWorkbook; - }; -}; +/** Contains response data for the revisionsList operation. */ +export type WorkbooksRevisionsListResponse = WorkbooksListResult; -/** - * Contains response data for the list operation. - */ -export type ComponentsListResponse = ApplicationInsightsComponentListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WorkbooksRevisionGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentListResult; - }; -}; +/** Contains response data for the revisionGet operation. */ +export type WorkbooksRevisionGetResponse = Workbook; -/** - * Contains response data for the listByResourceGroup operation. - */ -export type ComponentsListByResourceGroupResponse = ApplicationInsightsComponentListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WorkbooksListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions { + /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ + canFetchContent?: boolean; + /** Tags presents on each workbook returned. */ + tags?: string[]; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentListResult; - }; -}; +/** Contains response data for the listBySubscriptionNext operation. */ +export type WorkbooksListBySubscriptionNextResponse = WorkbooksListResult; -/** - * Contains response data for the get operation. - */ -export type ComponentsGetResponse = ApplicationInsightsComponent & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WorkbooksListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions { + /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ + canFetchContent?: boolean; + /** Tags presents on each workbook returned. */ + tags?: string[]; + /** Azure Resource Id that will fetch all linked workbooks. */ + sourceId?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponent; - }; -}; +/** Contains response data for the listByResourceGroupNext operation. */ +export type WorkbooksListByResourceGroupNextResponse = WorkbooksListResult; -/** - * Contains response data for the createOrUpdate operation. - */ -export type ComponentsCreateOrUpdateResponse = ApplicationInsightsComponent & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface WorkbooksRevisionsListNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponent; - }; -}; +/** Contains response data for the revisionsListNext operation. */ +export type WorkbooksRevisionsListNextResponse = WorkbooksListResult; -/** - * Contains response data for the updateTags operation. - */ -export type ComponentsUpdateTagsResponse = ApplicationInsightsComponent & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ComponentsListOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponent; - }; -}; +/** Contains response data for the list operation. */ +export type ComponentsListResponse = ApplicationInsightsComponentListResult; -/** - * Contains response data for the purge operation. - */ -export type ComponentsPurgeResponse = ComponentPurgeResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ComponentsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ComponentPurgeResponse; - }; -}; +/** Contains response data for the listByResourceGroup operation. */ +export type ComponentsListByResourceGroupResponse = ApplicationInsightsComponentListResult; -/** - * Contains response data for the getPurgeStatus operation. - */ -export type ComponentsGetPurgeStatusResponse = ComponentPurgeStatusResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ComponentsDeleteOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ComponentPurgeStatusResponse; - }; -}; +/** Optional parameters. */ +export interface ComponentsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listNext operation. - */ -export type ComponentsListNextResponse = ApplicationInsightsComponentListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type ComponentsGetResponse = ApplicationInsightsComponent; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentListResult; - }; -}; +/** Optional parameters. */ +export interface ComponentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type ComponentsListByResourceGroupNextResponse = ApplicationInsightsComponentListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type ComponentsCreateOrUpdateResponse = ApplicationInsightsComponent; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationInsightsComponentListResult; - }; -}; +/** Optional parameters. */ +export interface ComponentsUpdateTagsOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type ComponentLinkedStorageAccountsGetResponse = ComponentLinkedStorageAccounts & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the updateTags operation. */ +export type ComponentsUpdateTagsResponse = ApplicationInsightsComponent; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ComponentLinkedStorageAccounts; - }; -}; +/** Optional parameters. */ +export interface ComponentsPurgeOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the createAndUpdate operation. - */ -export type ComponentLinkedStorageAccountsCreateAndUpdateResponse = ComponentLinkedStorageAccounts & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the purge operation. */ +export type ComponentsPurgeResponse = ComponentPurgeResponse; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ComponentLinkedStorageAccounts; - }; -}; +/** Optional parameters. */ +export interface ComponentsGetPurgeStatusOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the update operation. - */ -export type ComponentLinkedStorageAccountsUpdateResponse = ComponentLinkedStorageAccounts & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getPurgeStatus operation. */ +export type ComponentsGetPurgeStatusResponse = ComponentPurgeStatusResponse; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ComponentLinkedStorageAccounts; - }; -}; +/** Optional parameters. */ +export interface ComponentsListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type LiveTokenGetResponse = LiveTokenResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type ComponentsListNextResponse = ApplicationInsightsComponentListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: LiveTokenResponse; - }; -}; +/** Optional parameters. */ +export interface ComponentsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ComponentsListByResourceGroupNextResponse = ApplicationInsightsComponentListResult; + +/** Optional parameters. */ +export interface ComponentLinkedStorageAccountsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ComponentLinkedStorageAccountsGetResponse = ComponentLinkedStorageAccounts; + +/** Optional parameters. */ +export interface ComponentLinkedStorageAccountsCreateAndUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createAndUpdate operation. */ +export type ComponentLinkedStorageAccountsCreateAndUpdateResponse = ComponentLinkedStorageAccounts; + +/** Optional parameters. */ +export interface ComponentLinkedStorageAccountsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type ComponentLinkedStorageAccountsUpdateResponse = ComponentLinkedStorageAccounts; + +/** Optional parameters. */ +export interface ComponentLinkedStorageAccountsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface LiveTokenGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type LiveTokenGetResponse = LiveTokenResponse; + +/** Optional parameters. */ +export interface ApplicationInsightsManagementClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/models/liveTokenMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/liveTokenMappers.ts deleted file mode 100644 index be3acaac607d..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/liveTokenMappers.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ErrorResponse, - LiveTokenResponse -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/mappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/mappers.ts index facff92bf4e6..1b0a3199878a 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/mappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/mappers.ts @@ -1,92 +1,36 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import * as coreClient from "@azure/core-client"; -export const CloudError = CloudErrorMapper; -export const BaseResource = BaseResourceMapper; - -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - type: { - name: "String" - } - } - } - } -}; - -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const AnnotationsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "AnnotationsListResult", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Composite", - className: "OperationDisplay" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Annotation" + } + } } } } } }; -export const Annotation: msRest.CompositeMapper = { - serializedName: "Annotation", +export const Annotation: coreClient.CompositeMapper = { type: { name: "Composite", className: "Annotation", @@ -122,40 +66,17 @@ export const Annotation: msRest.CompositeMapper = { } }, relatedAnnotation: { + defaultValue: "null", serializedName: "RelatedAnnotation", - defaultValue: 'null', - type: { - name: "String" - } - } - } - } -}; - -export const InnerError: msRest.CompositeMapper = { - serializedName: "InnerError", - type: { - name: "Composite", - className: "InnerError", - modelProperties: { - diagnosticcontext: { - serializedName: "diagnosticcontext", type: { name: "String" } - }, - time: { - serializedName: "time", - type: { - name: "DateTime" - } } } } }; -export const AnnotationError: msRest.CompositeMapper = { - serializedName: "AnnotationError", +export const AnnotationError: coreClient.CompositeMapper = { type: { name: "Composite", className: "AnnotationError", @@ -183,36 +104,41 @@ export const AnnotationError: msRest.CompositeMapper = { } }; -export const APIKeyRequest: msRest.CompositeMapper = { - serializedName: "APIKeyRequest", +export const InnerError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "APIKeyRequest", + className: "InnerError", modelProperties: { - name: { - serializedName: "name", + diagnosticcontext: { + serializedName: "diagnosticcontext", type: { name: "String" } }, - linkedReadProperties: { - serializedName: "linkedReadProperties", + time: { + serializedName: "time", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "DateTime" } - }, - linkedWriteProperties: { - serializedName: "linkedWriteProperties", + } + } + } +}; + +export const ApplicationInsightsComponentAPIKeyListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationInsightsComponentAPIKeyListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ApplicationInsightsComponentAPIKey" } } } @@ -221,22 +147,21 @@ export const APIKeyRequest: msRest.CompositeMapper = { } }; -export const ApplicationInsightsComponentAPIKey: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentAPIKey", +export const ApplicationInsightsComponentAPIKey: coreClient.CompositeMapper = { type: { name: "Composite", className: "ApplicationInsightsComponentAPIKey", modelProperties: { id: { - readOnly: true, serializedName: "id", + readOnly: true, type: { name: "String" } }, apiKey: { - readOnly: true, serializedName: "apiKey", + readOnly: true, type: { name: "String" } @@ -279,86 +204,58 @@ export const ApplicationInsightsComponentAPIKey: msRest.CompositeMapper = { } }; -export const ApplicationInsightsComponentExportRequest: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentExportRequest", +export const APIKeyRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationInsightsComponentExportRequest", + className: "APIKeyRequest", modelProperties: { - recordTypes: { - serializedName: "RecordTypes", - type: { - name: "String" - } - }, - destinationType: { - serializedName: "DestinationType", - type: { - name: "String" - } - }, - destinationAddress: { - serializedName: "DestinationAddress", - type: { - name: "String" - } - }, - isEnabled: { - serializedName: "IsEnabled", - type: { - name: "String" - } - }, - notificationQueueEnabled: { - serializedName: "NotificationQueueEnabled", - type: { - name: "String" - } - }, - notificationQueueUri: { - serializedName: "NotificationQueueUri", - type: { - name: "String" - } - }, - destinationStorageSubscriptionId: { - serializedName: "DestinationStorageSubscriptionId", + name: { + serializedName: "name", type: { name: "String" } }, - destinationStorageLocationId: { - serializedName: "DestinationStorageLocationId", + linkedReadProperties: { + serializedName: "linkedReadProperties", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - destinationAccountId: { - serializedName: "DestinationAccountId", + linkedWriteProperties: { + serializedName: "linkedWriteProperties", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const ApplicationInsightsComponentExportConfiguration: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentExportConfiguration", +export const ApplicationInsightsComponentExportConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", className: "ApplicationInsightsComponentExportConfiguration", modelProperties: { exportId: { - readOnly: true, serializedName: "ExportId", + readOnly: true, type: { name: "String" } }, instrumentationKey: { - readOnly: true, serializedName: "InstrumentationKey", + readOnly: true, type: { name: "String" } @@ -370,64 +267,64 @@ export const ApplicationInsightsComponentExportConfiguration: msRest.CompositeMa } }, applicationName: { - readOnly: true, serializedName: "ApplicationName", + readOnly: true, type: { name: "String" } }, subscriptionId: { - readOnly: true, serializedName: "SubscriptionId", + readOnly: true, type: { name: "String" } }, resourceGroup: { - readOnly: true, serializedName: "ResourceGroup", + readOnly: true, type: { name: "String" } }, destinationStorageSubscriptionId: { - readOnly: true, serializedName: "DestinationStorageSubscriptionId", + readOnly: true, type: { name: "String" } }, destinationStorageLocationId: { - readOnly: true, serializedName: "DestinationStorageLocationId", + readOnly: true, type: { name: "String" } }, destinationAccountId: { - readOnly: true, serializedName: "DestinationAccountId", + readOnly: true, type: { name: "String" } }, destinationType: { - readOnly: true, serializedName: "DestinationType", + readOnly: true, type: { name: "String" } }, isUserEnabled: { - readOnly: true, serializedName: "IsUserEnabled", + readOnly: true, type: { name: "String" } }, lastUserUpdate: { - readOnly: true, serializedName: "LastUserUpdate", + readOnly: true, type: { name: "String" } @@ -439,43 +336,43 @@ export const ApplicationInsightsComponentExportConfiguration: msRest.CompositeMa } }, exportStatus: { - readOnly: true, serializedName: "ExportStatus", + readOnly: true, type: { name: "String" } }, lastSuccessTime: { - readOnly: true, serializedName: "LastSuccessTime", + readOnly: true, type: { name: "String" } }, lastGapTime: { - readOnly: true, serializedName: "LastGapTime", + readOnly: true, type: { name: "String" } }, permanentErrorReason: { - readOnly: true, serializedName: "PermanentErrorReason", + readOnly: true, type: { name: "String" } }, storageName: { - readOnly: true, serializedName: "StorageName", + readOnly: true, type: { name: "String" } }, containerName: { - readOnly: true, serializedName: "ContainerName", + readOnly: true, type: { name: "String" } @@ -484,56 +381,70 @@ export const ApplicationInsightsComponentExportConfiguration: msRest.CompositeMa } }; -export const ApplicationInsightsComponentDataVolumeCap: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentDataVolumeCap", +export const ApplicationInsightsComponentExportRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationInsightsComponentDataVolumeCap", + className: "ApplicationInsightsComponentExportRequest", modelProperties: { - cap: { - serializedName: "Cap", + recordTypes: { + serializedName: "RecordTypes", type: { - name: "Number" + name: "String" } }, - resetTime: { - readOnly: true, - serializedName: "ResetTime", + destinationType: { + serializedName: "DestinationType", type: { - name: "Number" + name: "String" } }, - warningThreshold: { - serializedName: "WarningThreshold", + destinationAddress: { + serializedName: "DestinationAddress", type: { - name: "Number" + name: "String" } }, - stopSendNotificationWhenHitThreshold: { - serializedName: "StopSendNotificationWhenHitThreshold", + isEnabled: { + serializedName: "IsEnabled", type: { - name: "Boolean" + name: "String" } }, - stopSendNotificationWhenHitCap: { - serializedName: "StopSendNotificationWhenHitCap", - type: { - name: "Boolean" + notificationQueueEnabled: { + serializedName: "NotificationQueueEnabled", + type: { + name: "String" } }, - maxHistoryCap: { - readOnly: true, - serializedName: "MaxHistoryCap", + notificationQueueUri: { + serializedName: "NotificationQueueUri", type: { - name: "Number" + name: "String" + } + }, + destinationStorageSubscriptionId: { + serializedName: "DestinationStorageSubscriptionId", + type: { + name: "String" + } + }, + destinationStorageLocationId: { + serializedName: "DestinationStorageLocationId", + type: { + name: "String" + } + }, + destinationAccountId: { + serializedName: "DestinationAccountId", + type: { + name: "String" } } } } }; -export const ApplicationInsightsComponentBillingFeatures: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentBillingFeatures", +export const ApplicationInsightsComponentBillingFeatures: coreClient.CompositeMapper = { type: { name: "Composite", className: "ApplicationInsightsComponentBillingFeatures", @@ -560,29 +471,75 @@ export const ApplicationInsightsComponentBillingFeatures: msRest.CompositeMapper } }; -export const ApplicationInsightsComponentQuotaStatus: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentQuotaStatus", +export const ApplicationInsightsComponentDataVolumeCap: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationInsightsComponentDataVolumeCap", + modelProperties: { + cap: { + serializedName: "Cap", + type: { + name: "Number" + } + }, + resetTime: { + serializedName: "ResetTime", + readOnly: true, + type: { + name: "Number" + } + }, + warningThreshold: { + serializedName: "WarningThreshold", + type: { + name: "Number" + } + }, + stopSendNotificationWhenHitThreshold: { + serializedName: "StopSendNotificationWhenHitThreshold", + type: { + name: "Boolean" + } + }, + stopSendNotificationWhenHitCap: { + serializedName: "StopSendNotificationWhenHitCap", + type: { + name: "Boolean" + } + }, + maxHistoryCap: { + serializedName: "MaxHistoryCap", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const ApplicationInsightsComponentQuotaStatus: coreClient.CompositeMapper = { type: { name: "Composite", className: "ApplicationInsightsComponentQuotaStatus", modelProperties: { appId: { - readOnly: true, serializedName: "AppId", + readOnly: true, type: { name: "String" } }, shouldBeThrottled: { - readOnly: true, serializedName: "ShouldBeThrottled", + readOnly: true, type: { name: "Boolean" } }, expirationTime: { - readOnly: true, serializedName: "ExpirationTime", + readOnly: true, type: { name: "String" } @@ -591,120 +548,119 @@ export const ApplicationInsightsComponentQuotaStatus: msRest.CompositeMapper = { } }; -export const ApplicationInsightsComponentFeatureCapabilities: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentFeatureCapabilities", +export const ApplicationInsightsComponentFeatureCapabilities: coreClient.CompositeMapper = { type: { name: "Composite", className: "ApplicationInsightsComponentFeatureCapabilities", modelProperties: { supportExportData: { - readOnly: true, serializedName: "SupportExportData", + readOnly: true, type: { name: "Boolean" } }, burstThrottlePolicy: { - readOnly: true, serializedName: "BurstThrottlePolicy", + readOnly: true, type: { name: "String" } }, metadataClass: { - readOnly: true, serializedName: "MetadataClass", + readOnly: true, type: { name: "String" } }, liveStreamMetrics: { - readOnly: true, serializedName: "LiveStreamMetrics", + readOnly: true, type: { name: "Boolean" } }, applicationMap: { - readOnly: true, serializedName: "ApplicationMap", + readOnly: true, type: { name: "Boolean" } }, workItemIntegration: { - readOnly: true, serializedName: "WorkItemIntegration", + readOnly: true, type: { name: "Boolean" } }, powerBIIntegration: { - readOnly: true, serializedName: "PowerBIIntegration", + readOnly: true, type: { name: "Boolean" } }, openSchema: { - readOnly: true, serializedName: "OpenSchema", + readOnly: true, type: { name: "Boolean" } }, proactiveDetection: { - readOnly: true, serializedName: "ProactiveDetection", + readOnly: true, type: { name: "Boolean" } }, analyticsIntegration: { - readOnly: true, serializedName: "AnalyticsIntegration", + readOnly: true, type: { name: "Boolean" } }, multipleStepWebTest: { - readOnly: true, serializedName: "MultipleStepWebTest", + readOnly: true, type: { name: "Boolean" } }, apiAccessLevel: { - readOnly: true, serializedName: "ApiAccessLevel", + readOnly: true, type: { name: "String" } }, trackingType: { - readOnly: true, serializedName: "TrackingType", + readOnly: true, type: { name: "String" } }, dailyCap: { - readOnly: true, serializedName: "DailyCap", + readOnly: true, type: { name: "Number" } }, dailyCapResetTime: { - readOnly: true, serializedName: "DailyCapResetTime", + readOnly: true, type: { name: "Number" } }, throttleRate: { - readOnly: true, serializedName: "ThrottleRate", + readOnly: true, type: { name: "Number" } @@ -713,102 +669,71 @@ export const ApplicationInsightsComponentFeatureCapabilities: msRest.CompositeMa } }; -export const ApplicationInsightsComponentFeatureCapability: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentFeatureCapability", +export const ApplicationInsightsComponentAvailableFeatures: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationInsightsComponentFeatureCapability", + className: "ApplicationInsightsComponentAvailableFeatures", modelProperties: { - name: { - readOnly: true, - serializedName: "Name", - type: { - name: "String" - } - }, - description: { - readOnly: true, - serializedName: "Description", - type: { - name: "String" - } - }, - value: { - readOnly: true, - serializedName: "Value", - type: { - name: "String" - } - }, - unit: { - readOnly: true, - serializedName: "Unit", - type: { - name: "String" - } - }, - meterId: { - readOnly: true, - serializedName: "MeterId", - type: { - name: "String" - } - }, - meterRateFrequency: { + result: { + serializedName: "Result", readOnly: true, - serializedName: "MeterRateFrequency", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationInsightsComponentFeature" + } + } } } } } }; -export const ApplicationInsightsComponentFeature: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentFeature", +export const ApplicationInsightsComponentFeature: coreClient.CompositeMapper = { type: { name: "Composite", className: "ApplicationInsightsComponentFeature", modelProperties: { featureName: { - readOnly: true, serializedName: "FeatureName", + readOnly: true, type: { name: "String" } }, meterId: { - readOnly: true, serializedName: "MeterId", + readOnly: true, type: { name: "String" } }, meterRateFrequency: { - readOnly: true, serializedName: "MeterRateFrequency", + readOnly: true, type: { name: "String" } }, resouceId: { - readOnly: true, serializedName: "ResouceId", + readOnly: true, type: { name: "String" } }, isHidden: { - readOnly: true, serializedName: "IsHidden", + readOnly: true, type: { name: "Boolean" } }, capabilities: { - readOnly: true, serializedName: "Capabilities", + readOnly: true, type: { name: "Sequence", element: { @@ -820,113 +745,82 @@ export const ApplicationInsightsComponentFeature: msRest.CompositeMapper = { } }, title: { - readOnly: true, serializedName: "Title", + readOnly: true, type: { name: "String" } }, isMainFeature: { - readOnly: true, serializedName: "IsMainFeature", + readOnly: true, type: { name: "Boolean" } }, supportedAddonFeatures: { - readOnly: true, serializedName: "SupportedAddonFeatures", - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationInsightsComponentAvailableFeatures: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentAvailableFeatures", - type: { - name: "Composite", - className: "ApplicationInsightsComponentAvailableFeatures", - modelProperties: { - result: { readOnly: true, - serializedName: "Result", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationInsightsComponentFeature" - } - } + name: "String" } } } } }; -export const ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentProactiveDetectionConfiguration_RuleDefinitions", +export const ApplicationInsightsComponentFeatureCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions", + className: "ApplicationInsightsComponentFeatureCapability", modelProperties: { name: { serializedName: "Name", - type: { - name: "String" - } - }, - displayName: { - serializedName: "DisplayName", + readOnly: true, type: { name: "String" } }, description: { serializedName: "Description", + readOnly: true, type: { name: "String" } }, - helpUrl: { - serializedName: "HelpUrl", + value: { + serializedName: "Value", + readOnly: true, type: { name: "String" } }, - isHidden: { - serializedName: "IsHidden", - type: { - name: "Boolean" - } - }, - isEnabledByDefault: { - serializedName: "IsEnabledByDefault", + unit: { + serializedName: "Unit", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - isInPreview: { - serializedName: "IsInPreview", + meterId: { + serializedName: "MeterId", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - supportsEmailNotifications: { - serializedName: "SupportsEmailNotifications", + meterRateFrequency: { + serializedName: "MeterRateFrequency", + readOnly: true, type: { - name: "Boolean" + name: "String" } } } } }; -export const ApplicationInsightsComponentProactiveDetectionConfiguration: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentProactiveDetectionConfiguration", +export const ApplicationInsightsComponentProactiveDetectionConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", className: "ApplicationInsightsComponentProactiveDetectionConfiguration", @@ -970,58 +864,98 @@ export const ApplicationInsightsComponentProactiveDetectionConfiguration: msRest serializedName: "RuleDefinitions", type: { name: "Composite", - className: "ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions" + className: + "ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions" } } } } }; -export const WorkItemConfiguration: msRest.CompositeMapper = { - serializedName: "WorkItemConfiguration", +export const ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkItemConfiguration", + className: + "ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions", modelProperties: { - connectorId: { - serializedName: "ConnectorId", + name: { + serializedName: "Name", type: { name: "String" } }, - configDisplayName: { - serializedName: "ConfigDisplayName", + displayName: { + serializedName: "DisplayName", type: { name: "String" } }, - isDefault: { - serializedName: "IsDefault", + description: { + serializedName: "Description", type: { - name: "Boolean" + name: "String" } }, - id: { - serializedName: "Id", + helpUrl: { + serializedName: "HelpUrl", type: { name: "String" } }, - configProperties: { - serializedName: "ConfigProperties", + isHidden: { + serializedName: "IsHidden", type: { - name: "String" + name: "Boolean" + } + }, + isEnabledByDefault: { + serializedName: "IsEnabledByDefault", + type: { + name: "Boolean" + } + }, + isInPreview: { + serializedName: "IsInPreview", + type: { + name: "Boolean" + } + }, + supportsEmailNotifications: { + serializedName: "SupportsEmailNotifications", + type: { + name: "Boolean" } } } } }; -export const WorkItemCreateConfiguration: msRest.CompositeMapper = { - serializedName: "WorkItemCreateConfiguration", +export const WorkItemConfigurationsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkItemCreateConfiguration", + className: "WorkItemConfigurationsListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkItemConfiguration" + } + } + } + } + } + } +}; + +export const WorkItemConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkItemConfiguration", modelProperties: { connectorId: { serializedName: "ConnectorId", @@ -1029,35 +963,35 @@ export const WorkItemCreateConfiguration: msRest.CompositeMapper = { name: "String" } }, - connectorDataConfiguration: { - serializedName: "ConnectorDataConfiguration", + configDisplayName: { + serializedName: "ConfigDisplayName", type: { name: "String" } }, - validateOnly: { - serializedName: "ValidateOnly", + isDefault: { + serializedName: "IsDefault", type: { name: "Boolean" } }, - workItemProperties: { - serializedName: "WorkItemProperties", + id: { + serializedName: "Id", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" + } + }, + configProperties: { + serializedName: "ConfigProperties", + type: { + name: "String" } } } } }; -export const WorkItemConfigurationError: msRest.CompositeMapper = { - serializedName: "WorkItemConfigurationError", +export const WorkItemConfigurationError: coreClient.CompositeMapper = { type: { name: "Composite", className: "WorkItemConfigurationError", @@ -1085,8 +1019,41 @@ export const WorkItemConfigurationError: msRest.CompositeMapper = { } }; -export const ApplicationInsightsComponentFavorite: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentFavorite", +export const WorkItemCreateConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkItemCreateConfiguration", + modelProperties: { + connectorId: { + serializedName: "ConnectorId", + type: { + name: "String" + } + }, + connectorDataConfiguration: { + serializedName: "ConnectorDataConfiguration", + type: { + name: "String" + } + }, + validateOnly: { + serializedName: "ValidateOnly", + type: { + name: "Boolean" + } + }, + workItemProperties: { + serializedName: "WorkItemProperties", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ApplicationInsightsComponentFavorite: coreClient.CompositeMapper = { type: { name: "Composite", className: "ApplicationInsightsComponentFavorite", @@ -1110,8 +1077,8 @@ export const ApplicationInsightsComponentFavorite: msRest.CompositeMapper = { } }, favoriteId: { - readOnly: true, serializedName: "FavoriteId", + readOnly: true, type: { name: "String" } @@ -1120,10 +1087,7 @@ export const ApplicationInsightsComponentFavorite: msRest.CompositeMapper = { serializedName: "FavoriteType", type: { name: "Enum", - allowedValues: [ - "shared", - "user" - ] + allowedValues: ["shared", "user"] } }, sourceType: { @@ -1133,8 +1097,8 @@ export const ApplicationInsightsComponentFavorite: msRest.CompositeMapper = { } }, timeModified: { - readOnly: true, serializedName: "TimeModified", + readOnly: true, type: { name: "String" } @@ -1163,8 +1127,8 @@ export const ApplicationInsightsComponentFavorite: msRest.CompositeMapper = { } }, userId: { - readOnly: true, serializedName: "UserId", + readOnly: true, type: { name: "String" } @@ -1173,102 +1137,80 @@ export const ApplicationInsightsComponentFavorite: msRest.CompositeMapper = { } }; -export const ApplicationInsightsComponentWebTestLocation: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentWebTestLocation", +export const ApplicationInsightsWebTestLocationsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationInsightsComponentWebTestLocation", + className: "ApplicationInsightsWebTestLocationsListResult", modelProperties: { - displayName: { - readOnly: true, - serializedName: "DisplayName", - type: { - name: "String" - } - }, - tag: { - readOnly: true, - serializedName: "Tag", + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationInsightsComponentWebTestLocation" + } + } } } } } }; -export const WebtestsResource: msRest.CompositeMapper = { - serializedName: "WebtestsResource", +export const ApplicationInsightsComponentWebTestLocation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WebtestsResource", + className: "ApplicationInsightsComponentWebTestLocation", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { + displayName: { + serializedName: "DisplayName", readOnly: true, - serializedName: "name", type: { name: "String" } }, - type: { + tag: { + serializedName: "Tag", readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - location: { - required: true, - serializedName: "location", type: { name: "String" } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } } } } }; -export const TagsResource: msRest.CompositeMapper = { - serializedName: "TagsResource", +export const WebTestListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TagsResource", + className: "WebTestListResult", modelProperties: { - tags: { - serializedName: "tags", + value: { + serializedName: "value", + required: true, type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "WebTest" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const WebTestGeolocation: msRest.CompositeMapper = { - serializedName: "WebTestGeolocation", +export const WebTestGeolocation: coreClient.CompositeMapper = { type: { name: "Composite", className: "WebTestGeolocation", @@ -1283,8 +1225,7 @@ export const WebTestGeolocation: msRest.CompositeMapper = { } }; -export const WebTestPropertiesConfiguration: msRest.CompositeMapper = { - serializedName: "WebTestProperties_Configuration", +export const WebTestPropertiesConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", className: "WebTestPropertiesConfiguration", @@ -1299,131 +1240,67 @@ export const WebTestPropertiesConfiguration: msRest.CompositeMapper = { } }; -export const WebTest: msRest.CompositeMapper = { - serializedName: "WebTest", +export const WebtestsResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WebTest", + className: "WebtestsResource", modelProperties: { - ...WebtestsResource.type.modelProperties, - kind: { - serializedName: "kind", - defaultValue: 'ping', - type: { - name: "Enum", - allowedValues: [ - "ping", - "multistep" - ] - } - }, - syntheticMonitorId: { - required: true, - serializedName: "properties.SyntheticMonitorId", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - webTestName: { - required: true, - serializedName: "properties.Name", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - description: { - serializedName: "properties.Description", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - enabled: { - serializedName: "properties.Enabled", + location: { + serializedName: "location", + required: true, type: { - name: "Boolean" + name: "String" } }, - frequency: { - serializedName: "properties.Frequency", - defaultValue: 300, + tags: { + serializedName: "tags", type: { - name: "Number" + name: "Dictionary", + value: { type: { name: "String" } } } - }, - timeout: { - serializedName: "properties.Timeout", - defaultValue: 30, + } + } + } +}; + +export const TagsResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TagsResource", + modelProperties: { + tags: { + serializedName: "tags", type: { - name: "Number" - } - }, - webTestKind: { - required: true, - serializedName: "properties.Kind", - defaultValue: 'ping', - type: { - name: "Enum", - allowedValues: [ - "ping", - "multistep" - ] - } - }, - retryEnabled: { - serializedName: "properties.RetryEnabled", - type: { - name: "Boolean" - } - }, - locations: { - required: true, - serializedName: "properties.Locations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WebTestGeolocation" - } - } - } - }, - configuration: { - serializedName: "properties.Configuration", - type: { - name: "Composite", - className: "WebTestPropertiesConfiguration" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationInsightsComponentAnalyticsItemProperties: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentAnalyticsItemProperties", - type: { - name: "Composite", - className: "ApplicationInsightsComponentAnalyticsItemProperties", - modelProperties: { - functionAlias: { - serializedName: "functionAlias", - type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const ApplicationInsightsComponentAnalyticsItem: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentAnalyticsItem", +export const ApplicationInsightsComponentAnalyticsItem: coreClient.CompositeMapper = { type: { name: "Composite", className: "ApplicationInsightsComponentAnalyticsItem", @@ -1447,8 +1324,8 @@ export const ApplicationInsightsComponentAnalyticsItem: msRest.CompositeMapper = } }, version: { - readOnly: true, serializedName: "Version", + readOnly: true, type: { name: "String" } @@ -1466,15 +1343,15 @@ export const ApplicationInsightsComponentAnalyticsItem: msRest.CompositeMapper = } }, timeCreated: { - readOnly: true, serializedName: "TimeCreated", + readOnly: true, type: { name: "String" } }, timeModified: { - readOnly: true, serializedName: "TimeModified", + readOnly: true, type: { name: "String" } @@ -1490,46 +1367,34 @@ export const ApplicationInsightsComponentAnalyticsItem: msRest.CompositeMapper = } }; -export const WorkbookResource: msRest.CompositeMapper = { - serializedName: "WorkbookResource", +export const ApplicationInsightsComponentAnalyticsItemProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkbookResource", + className: "ApplicationInsightsComponentAnalyticsItemProperties", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - location: { - serializedName: "location", + functionAlias: { + serializedName: "functionAlias", type: { name: "String" } - }, - tags: { - serializedName: "tags", + } + } + } +}; + +export const WorkbookTemplatesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkbookTemplatesListResult", + modelProperties: { + value: { + serializedName: "value", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "WorkbookTemplate" } } } @@ -1538,129 +1403,137 @@ export const WorkbookResource: msRest.CompositeMapper = { } }; -export const Workbook: msRest.CompositeMapper = { - serializedName: "Workbook", +export const WorkbookTemplateGallery: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Workbook", + className: "WorkbookTemplateGallery", modelProperties: { - ...WorkbookResource.type.modelProperties, - kind: { - serializedName: "kind", + name: { + serializedName: "name", type: { name: "String" } }, - workbookName: { - required: true, - serializedName: "properties.name", + category: { + serializedName: "category", type: { name: "String" } }, - serializedData: { - required: true, - serializedName: "properties.serializedData", + type: { + serializedName: "type", type: { name: "String" } }, - version: { - serializedName: "properties.version", + order: { + serializedName: "order", type: { - name: "String" + name: "Number" } }, - workbookId: { - required: true, - serializedName: "properties.workbookId", + resourceType: { + serializedName: "resourceType", type: { name: "String" } - }, - sharedTypeKind: { - required: true, - serializedName: "properties.kind", - defaultValue: 'shared', + } + } + } +}; + +export const WorkbookTemplateLocalizedGallery: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkbookTemplateLocalizedGallery", + modelProperties: { + templateData: { + serializedName: "templateData", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } }, - timeModified: { + galleries: { + serializedName: "galleries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkbookTemplateGallery" + } + } + } + } + } + } +}; + +export const WorkbookTemplateResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkbookTemplateResource", + modelProperties: { + id: { + serializedName: "id", readOnly: true, - serializedName: "properties.timeModified", type: { name: "String" } }, - category: { - required: true, - serializedName: "properties.category", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - workbookTags: { - serializedName: "properties.tags", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - userId: { + location: { + serializedName: "location", required: true, - serializedName: "properties.userId", type: { name: "String" } }, - sourceResourceId: { - serializedName: "properties.sourceResourceId", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const LinkProperties: msRest.CompositeMapper = { - serializedName: "LinkProperties", +export const WorkbookTemplateError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinkProperties", + className: "WorkbookTemplateError", modelProperties: { - sourceId: { - serializedName: "sourceId", - type: { - name: "String" - } - }, - targetId: { - serializedName: "targetId", - type: { - name: "String" - } - }, - category: { - serializedName: "category", + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "WorkbookTemplateErrorBody" } } } } }; -export const ErrorFieldContract: msRest.CompositeMapper = { - serializedName: "ErrorFieldContract", +export const WorkbookTemplateErrorBody: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorFieldContract", + className: "WorkbookTemplateErrorBody", modelProperties: { code: { serializedName: "code", @@ -1674,21 +1547,26 @@ export const ErrorFieldContract: msRest.CompositeMapper = { name: "String" } }, - target: { - serializedName: "target", + details: { + serializedName: "details", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkbookTemplateErrorFieldContract" + } + } } } } } }; -export const WorkbookError: msRest.CompositeMapper = { - serializedName: "WorkbookError", +export const WorkbookTemplateErrorFieldContract: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkbookError", + className: "WorkbookTemplateErrorFieldContract", modelProperties: { code: { serializedName: "code", @@ -1702,59 +1580,72 @@ export const WorkbookError: msRest.CompositeMapper = { name: "String" } }, - details: { - serializedName: "details", + target: { + serializedName: "target", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorFieldContract" - } - } + name: "String" } } } } }; -export const MyWorkbookResource: msRest.CompositeMapper = { - serializedName: "MyWorkbookResource", +export const WorkbookTemplateUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MyWorkbookResource", + className: "WorkbookTemplateUpdateParameters", modelProperties: { - id: { - serializedName: "id", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - name: { - serializedName: "name", + priority: { + serializedName: "properties.priority", type: { - name: "String" + name: "Number" } }, - type: { - serializedName: "type", + author: { + serializedName: "properties.author", type: { name: "String" } }, - location: { - serializedName: "location", + templateData: { + serializedName: "properties.templateData", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } }, - tags: { - serializedName: "tags", + galleries: { + serializedName: "properties.galleries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkbookTemplateGallery" + } + } + } + }, + localized: { + serializedName: "properties.localized", type: { name: "Dictionary", value: { type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkbookTemplateLocalizedGallery" + } + } } } } @@ -1763,73 +1654,26 @@ export const MyWorkbookResource: msRest.CompositeMapper = { } }; -export const MyWorkbook: msRest.CompositeMapper = { - serializedName: "MyWorkbook", +export const MyWorkbooksListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MyWorkbook", + className: "MyWorkbooksListResult", modelProperties: { - ...MyWorkbookResource.type.modelProperties, - kind: { - serializedName: "kind", - type: { - name: "String" - } - }, - displayName: { - required: true, - serializedName: "properties.displayName", - type: { - name: "String" - } - }, - serializedData: { - required: true, - serializedName: "properties.serializedData", - type: { - name: "String" - } - }, - version: { - serializedName: "properties.version", - type: { - name: "String" - } - }, - timeModified: { - readOnly: true, - serializedName: "properties.timeModified", - type: { - name: "String" - } - }, - category: { - required: true, - serializedName: "properties.category", - type: { - name: "String" - } - }, - myWorkbookTags: { - serializedName: "properties.tags", + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "MyWorkbook" } } } }, - userId: { - readOnly: true, - serializedName: "properties.userId", - type: { - name: "String" - } - }, - sourceId: { - serializedName: "properties.sourceId", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -1838,69 +1682,82 @@ export const MyWorkbook: msRest.CompositeMapper = { } }; -export const MyWorkbookError: msRest.CompositeMapper = { - serializedName: "MyWorkbookError", +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MyWorkbookError", + className: "SystemData", modelProperties: { - code: { - serializedName: "code", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - message: { - serializedName: "message", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - details: { - serializedName: "details", + createdAt: { + serializedName: "createdAt", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorFieldContract" - } - } + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" } } } } }; -export const ComponentsResource: msRest.CompositeMapper = { - serializedName: "ComponentsResource", +export const MyWorkbookResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComponentsResource", + className: "MyWorkbookResource", modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "MyWorkbookManagedIdentity" + } + }, id: { - readOnly: true, serializedName: "id", type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", type: { name: "String" } }, location: { - required: true, serializedName: "location", type: { name: "String" @@ -1910,31 +1767,34 @@ export const ComponentsResource: msRest.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { - type: { - name: "String" - } - } + value: { type: { name: "String" } } + } + }, + etag: { + serializedName: "etag", + type: { + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const PrivateLinkScopedResource: msRest.CompositeMapper = { - serializedName: "PrivateLinkScopedResource", +export const MyWorkbookManagedIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkScopedResource", + className: "MyWorkbookManagedIdentity", modelProperties: { - resourceId: { - serializedName: "ResourceId", + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { - name: "String" + name: "Composite", + className: "MyWorkbookUserAssignedIdentities" } }, - scopeId: { - serializedName: "ScopeId", + type: { + serializedName: "type", type: { name: "String" } @@ -1943,240 +1803,326 @@ export const PrivateLinkScopedResource: msRest.CompositeMapper = { } }; -export const ApplicationInsightsComponent: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponent", +export const MyWorkbookUserAssignedIdentities: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationInsightsComponent", + className: "MyWorkbookUserAssignedIdentities", modelProperties: { - ...ComponentsResource.type.modelProperties, - kind: { - required: true, - serializedName: "kind", - type: { - name: "String" - } - }, - applicationId: { + principalId: { + serializedName: "principalId", readOnly: true, - serializedName: "properties.ApplicationId", type: { name: "String" } }, - appId: { + tenantId: { + serializedName: "tenantId", readOnly: true, - serializedName: "properties.AppId", type: { name: "String" } - }, - applicationType: { - required: true, - serializedName: "properties.Application_Type", - defaultValue: 'web', + } + } + } +}; + +export const MyWorkbookError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MyWorkbookError", + modelProperties: { + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ErrorDefinition" } - }, - flowType: { - serializedName: "properties.Flow_Type", - defaultValue: 'Bluefield', + } + } + } +}; + +export const ErrorDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDefinition", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, type: { name: "String" } }, - requestSource: { - serializedName: "properties.Request_Source", - defaultValue: 'rest', + message: { + serializedName: "message", + readOnly: true, type: { name: "String" } }, - instrumentationKey: { + innererror: { + serializedName: "innererror", readOnly: true, - serializedName: "properties.InstrumentationKey", type: { - name: "String" + name: "any" } - }, - creationDate: { + } + } + } +}; + +export const WorkbooksListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkbooksListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, - serializedName: "properties.CreationDate", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Workbook" + } + } } }, - tenantId: { - readOnly: true, - serializedName: "properties.TenantId", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - hockeyAppId: { - serializedName: "properties.HockeyAppId", + } + } + } +}; + +export const ManagedServiceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedServiceIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "String" + name: "Uuid" } }, - hockeyAppToken: { + tenantId: { + serializedName: "tenantId", readOnly: true, - serializedName: "properties.HockeyAppToken", type: { - name: "String" + name: "Uuid" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + type: { + serializedName: "type", + required: true, type: { name: "String" } }, - samplingPercentage: { - serializedName: "properties.SamplingPercentage", + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { - name: "Number" + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } } - }, - connectionString: { + } + } + } +}; + +export const UserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", readOnly: true, - serializedName: "properties.ConnectionString", type: { - name: "String" + name: "Uuid" } }, - retentionInDays: { - serializedName: "properties.RetentionInDays", - defaultValue: 90, + clientId: { + serializedName: "clientId", + readOnly: true, type: { - name: "Number" + name: "Uuid" } - }, - disableIpMasking: { - serializedName: "properties.DisableIpMasking", + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - immediatePurgeDataOn30Days: { - serializedName: "properties.ImmediatePurgeDataOn30Days", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - privateLinkScopedResources: { + type: { + serializedName: "type", readOnly: true, - serializedName: "properties.PrivateLinkScopedResources", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkScopedResource" - } - } + name: "String" } - }, - publicNetworkAccessForIngestion: { - serializedName: "properties.publicNetworkAccessForIngestion", - defaultValue: 'Enabled', + } + } + } +}; + +export const WorkbookError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkbookError", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "WorkbookErrorDefinition" + } + } + } + } +}; + +export const WorkbookErrorDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkbookErrorDefinition", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, type: { name: "String" } }, - publicNetworkAccessForQuery: { - serializedName: "properties.publicNetworkAccessForQuery", - defaultValue: 'Enabled', + message: { + serializedName: "message", + readOnly: true, type: { name: "String" } }, - ingestionMode: { - serializedName: "properties.IngestionMode", - defaultValue: 'ApplicationInsights', + innerError: { + serializedName: "innerError", + readOnly: true, type: { - name: "String" + name: "any" } } } } }; -export const ComponentPurgeBodyFilters: msRest.CompositeMapper = { - serializedName: "ComponentPurgeBodyFilters", +export const WorkbookUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComponentPurgeBodyFilters", + className: "WorkbookUpdateParameters", modelProperties: { - column: { - serializedName: "column", + kind: { + serializedName: "kind", type: { name: "String" } }, - operator: { - serializedName: "operator", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - value: { - serializedName: "value", + displayName: { + serializedName: "properties.displayName", type: { - name: "Object" + name: "String" } }, - key: { - serializedName: "key", + serializedData: { + serializedName: "properties.serializedData", type: { name: "String" } - } - } - } -}; - -export const ComponentPurgeBody: msRest.CompositeMapper = { - serializedName: "ComponentPurgeBody", - type: { - name: "Composite", - className: "ComponentPurgeBody", - modelProperties: { - table: { - required: true, - serializedName: "table", + }, + category: { + serializedName: "properties.category", type: { name: "String" } }, - filters: { - required: true, - serializedName: "filters", + tagsPropertiesTags: { + serializedName: "properties.tags", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ComponentPurgeBodyFilters" + name: "String" } } } + }, + description: { + serializedName: "properties.description", + nullable: true, + type: { + name: "String" + } + }, + revision: { + serializedName: "properties.revision", + nullable: true, + type: { + name: "String" + } } } } }; -export const ComponentPurgeResponse: msRest.CompositeMapper = { - serializedName: "ComponentPurgeResponse", +export const ApplicationInsightsComponentListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComponentPurgeResponse", + className: "ApplicationInsightsComponentListResult", modelProperties: { - operationId: { + value: { + serializedName: "value", required: true, - serializedName: "operationId", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationInsightsComponent" + } + } + } + }, + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -2185,15 +2131,19 @@ export const ComponentPurgeResponse: msRest.CompositeMapper = { } }; -export const ComponentPurgeStatusResponse: msRest.CompositeMapper = { - serializedName: "ComponentPurgeStatusResponse", +export const PrivateLinkScopedResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComponentPurgeStatusResponse", + className: "PrivateLinkScopedResource", modelProperties: { - status: { - required: true, - serializedName: "status", + resourceId: { + serializedName: "ResourceId", + type: { + name: "String" + } + }, + scopeId: { + serializedName: "ScopeId", type: { name: "String" } @@ -2202,57 +2152,81 @@ export const ComponentPurgeStatusResponse: msRest.CompositeMapper = { } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const ComponentsResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "ComponentsResource", modelProperties: { id: { - readOnly: true, serializedName: "id", + readOnly: true, type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + required: true, type: { name: "String" } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } } } } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const ErrorResponseComponents: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "ErrorResponseComponents", modelProperties: { - ...Resource.type.modelProperties + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponseComponentsError" + } + } } } }; -export const ComponentLinkedStorageAccounts: msRest.CompositeMapper = { - serializedName: "ComponentLinkedStorageAccounts", +export const ErrorResponseComponentsError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComponentLinkedStorageAccounts", + className: "ErrorResponseComponentsError", modelProperties: { - ...ProxyResource.type.modelProperties, - linkedStorageAccount: { - serializedName: "properties.linkedStorageAccount", + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, type: { name: "String" } @@ -2261,43 +2235,60 @@ export const ComponentLinkedStorageAccounts: msRest.CompositeMapper = { } }; -export const ComponentLinkedStorageAccountsPatch: msRest.CompositeMapper = { - serializedName: "ComponentLinkedStorageAccountsPatch", +export const ComponentPurgeBody: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComponentLinkedStorageAccountsPatch", + className: "ComponentPurgeBody", modelProperties: { - linkedStorageAccount: { - serializedName: "properties.linkedStorageAccount", + table: { + serializedName: "table", + required: true, type: { name: "String" } + }, + filters: { + serializedName: "filters", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComponentPurgeBodyFilters" + } + } + } } } } }; -export const TrackedResource: msRest.CompositeMapper = { - serializedName: "TrackedResource", +export const ComponentPurgeBodyFilters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "ComponentPurgeBodyFilters", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + column: { + serializedName: "column", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } }, - location: { - required: true, - serializedName: "location", + operator: { + serializedName: "operator", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "any" + } + }, + key: { + serializedName: "key", type: { name: "String" } @@ -2306,16 +2297,14 @@ export const TrackedResource: msRest.CompositeMapper = { } }; -export const AzureEntityResource: msRest.CompositeMapper = { - serializedName: "AzureEntityResource", +export const ComponentPurgeResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureEntityResource", + className: "ComponentPurgeResponse", modelProperties: { - ...Resource.type.modelProperties, - etag: { - readOnly: true, - serializedName: "etag", + operationId: { + serializedName: "operationId", + required: true, type: { name: "String" } @@ -2324,15 +2313,14 @@ export const AzureEntityResource: msRest.CompositeMapper = { } }; -export const LiveTokenResponse: msRest.CompositeMapper = { - serializedName: "LiveTokenResponse", +export const ComponentPurgeStatusResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LiveTokenResponse", + className: "ComponentPurgeStatusResponse", modelProperties: { - liveToken: { - readOnly: true, - serializedName: "liveToken", + status: { + serializedName: "status", + required: true, type: { name: "String" } @@ -2341,95 +2329,89 @@ export const LiveTokenResponse: msRest.CompositeMapper = { } }; -export const OperationInfo: msRest.CompositeMapper = { - serializedName: "OperationInfo", +export const ErrorResponseLinkedStorage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationInfo", + className: "ErrorResponseLinkedStorage", modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - type: { - name: "String" - } - }, - description: { - serializedName: "description", + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ErrorResponseLinkedStorageError" } } } } }; -export const OperationLive: msRest.CompositeMapper = { - serializedName: "OperationLive", +export const ErrorResponseLinkedStorageError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationLive", + className: "ErrorResponseLinkedStorageError", modelProperties: { - name: { - serializedName: "name", + code: { + serializedName: "code", + readOnly: true, type: { name: "String" } }, - display: { - serializedName: "display", + message: { + serializedName: "message", + readOnly: true, type: { - name: "Composite", - className: "OperationInfo" + name: "String" } - }, - origin: { - serializedName: "origin", + } + } + } +}; + +export const ComponentLinkedStorageAccountsPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComponentLinkedStorageAccountsPatch", + modelProperties: { + linkedStorageAccount: { + serializedName: "properties.linkedStorageAccount", type: { name: "String" } - }, - properties: { - serializedName: "properties", + } + } + } +}; + +export const LiveTokenResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveTokenResponse", + modelProperties: { + liveToken: { + serializedName: "liveToken", + readOnly: true, type: { - name: "Object" + name: "String" } } } } }; -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", +export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "ErrorResponse", modelProperties: { - value: { - serializedName: "", + code: { + serializedName: "code", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + message: { + serializedName: "message", type: { name: "String" } @@ -2438,95 +2420,95 @@ export const OperationListResult: msRest.CompositeMapper = { } }; -export const OperationsListResult: msRest.CompositeMapper = { - serializedName: "OperationsListResult", +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationsListResult", + className: "Operation", modelProperties: { - value: { - serializedName: "", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationLive" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + display: { + serializedName: "display", type: { - name: "String" + name: "Composite", + className: "OperationDisplay" } } } } }; -export const AnnotationsListResult: msRest.CompositeMapper = { - serializedName: "AnnotationsListResult", +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AnnotationsListResult", + className: "OperationDisplay", modelProperties: { - value: { - readOnly: true, - serializedName: "", + provider: { + serializedName: "provider", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Annotation" - } - } + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" } } } } }; -export const ApplicationInsightsComponentAPIKeyListResult: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentAPIKeyListResult", +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationInsightsComponentAPIKeyListResult", + className: "OperationListResult", modelProperties: { value: { - required: true, - serializedName: "", + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ApplicationInsightsComponentAPIKey" + className: "Operation" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const WorkItemConfigurationsListResult: msRest.CompositeMapper = { - serializedName: "WorkItemConfigurationsListResult", +export const InnerErrorTrace: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkItemConfigurationsListResult", + className: "InnerErrorTrace", modelProperties: { - value: { + trace: { + serializedName: "trace", readOnly: true, - serializedName: "", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "WorkItemConfiguration" + name: "String" } } } @@ -2535,21 +2517,19 @@ export const WorkItemConfigurationsListResult: msRest.CompositeMapper = { } }; -export const ApplicationInsightsWebTestLocationsListResult: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsWebTestLocationsListResult", +export const WorkbookInnerErrorTrace: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationInsightsWebTestLocationsListResult", + className: "WorkbookInnerErrorTrace", modelProperties: { - value: { - required: true, - serializedName: "", + trace: { + serializedName: "trace", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ApplicationInsightsComponentWebTestLocation" + name: "String" } } } @@ -2558,21 +2538,19 @@ export const ApplicationInsightsWebTestLocationsListResult: msRest.CompositeMapp } }; -export const WebTestListResult: msRest.CompositeMapper = { - serializedName: "webTestListResult", +export const OperationsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WebTestListResult", + className: "OperationsListResult", modelProperties: { value: { - required: true, - serializedName: "", + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "WebTest" + className: "OperationLive" } } } @@ -2587,73 +2565,690 @@ export const WebTestListResult: msRest.CompositeMapper = { } }; -export const WorkbooksListResult: msRest.CompositeMapper = { - serializedName: "WorkbooksListResult", +export const OperationLive: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkbooksListResult", + className: "OperationLive", modelProperties: { - value: { - readOnly: true, - serializedName: "", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Workbook" - } - } + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationInfo" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { type: { name: "any" } } } } } } }; -export const MyWorkbooksListResult: msRest.CompositeMapper = { - serializedName: "MyWorkbooksListResult", +export const OperationInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MyWorkbooksListResult", + className: "OperationInfo", modelProperties: { - value: { - readOnly: true, - serializedName: "", + provider: { + serializedName: "provider", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MyWorkbook" - } - } + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" } } } } }; -export const ApplicationInsightsComponentListResult: msRest.CompositeMapper = { - serializedName: "ApplicationInsightsComponentListResult", +export const WebTest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationInsightsComponentListResult", + className: "WebTest", modelProperties: { - value: { - required: true, - serializedName: "", + ...WebtestsResource.type.modelProperties, + kind: { + serializedName: "kind", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationInsightsComponent" - } - } + name: "Enum", + allowedValues: ["ping", "multistep"] } }, - nextLink: { - serializedName: "nextLink", + syntheticMonitorId: { + serializedName: "properties.SyntheticMonitorId", + type: { + name: "String" + } + }, + webTestName: { + serializedName: "properties.Name", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.Description", + type: { + name: "String" + } + }, + enabled: { + serializedName: "properties.Enabled", + type: { + name: "Boolean" + } + }, + frequency: { + defaultValue: 300, + serializedName: "properties.Frequency", + type: { + name: "Number" + } + }, + timeout: { + defaultValue: 30, + serializedName: "properties.Timeout", + type: { + name: "Number" + } + }, + webTestKind: { + serializedName: "properties.Kind", + type: { + name: "Enum", + allowedValues: ["ping", "multistep"] + } + }, + retryEnabled: { + serializedName: "properties.RetryEnabled", + type: { + name: "Boolean" + } + }, + locations: { + serializedName: "properties.Locations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WebTestGeolocation" + } + } + } + }, + configuration: { + serializedName: "properties.Configuration", + type: { + name: "Composite", + className: "WebTestPropertiesConfiguration" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const WorkbookTemplate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkbookTemplate", + modelProperties: { + ...WorkbookTemplateResource.type.modelProperties, + priority: { + serializedName: "properties.priority", + type: { + name: "Number" + } + }, + author: { + serializedName: "properties.author", + type: { + name: "String" + } + }, + templateData: { + serializedName: "properties.templateData", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + galleries: { + serializedName: "properties.galleries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkbookTemplateGallery" + } + } + } + }, + localized: { + serializedName: "properties.localized", + type: { + name: "Dictionary", + value: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkbookTemplateLocalizedGallery" + } + } + } + } + } + } + } + } +}; + +export const MyWorkbook: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MyWorkbook", + modelProperties: { + ...MyWorkbookResource.type.modelProperties, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + serializedData: { + serializedName: "properties.serializedData", + nullable: true, + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + timeModified: { + serializedName: "properties.timeModified", + readOnly: true, + type: { + name: "String" + } + }, + category: { + serializedName: "properties.category", + type: { + name: "String" + } + }, + tagsPropertiesTags: { + serializedName: "properties.tags", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + userId: { + serializedName: "properties.userId", + readOnly: true, + type: { + name: "String" + } + }, + sourceId: { + serializedName: "properties.sourceId", + type: { + name: "String" + } + }, + storageUri: { + serializedName: "properties.storageUri", + nullable: true, + type: { + name: "String" + } + } + } + } +}; + +export const WorkbookResourceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkbookResourceIdentity", + modelProperties: { + ...ManagedServiceIdentity.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 ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const ApplicationInsightsComponent: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationInsightsComponent", + modelProperties: { + ...ComponentsResource.type.modelProperties, + kind: { + serializedName: "kind", + required: true, + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + applicationId: { + serializedName: "properties.ApplicationId", + readOnly: true, + type: { + name: "String" + } + }, + appId: { + serializedName: "properties.AppId", + readOnly: true, + type: { + name: "String" + } + }, + namePropertiesName: { + serializedName: "properties.Name", + readOnly: true, + type: { + name: "String" + } + }, + applicationType: { + defaultValue: "web", + serializedName: "properties.Application_Type", + type: { + name: "String" + } + }, + flowType: { + defaultValue: "Bluefield", + serializedName: "properties.Flow_Type", + type: { + name: "String" + } + }, + requestSource: { + defaultValue: "rest", + serializedName: "properties.Request_Source", + type: { + name: "String" + } + }, + instrumentationKey: { + serializedName: "properties.InstrumentationKey", + readOnly: true, + type: { + name: "String" + } + }, + creationDate: { + serializedName: "properties.CreationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + tenantId: { + serializedName: "properties.TenantId", + readOnly: true, + type: { + name: "String" + } + }, + hockeyAppId: { + serializedName: "properties.HockeyAppId", + type: { + name: "String" + } + }, + hockeyAppToken: { + serializedName: "properties.HockeyAppToken", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + samplingPercentage: { + serializedName: "properties.SamplingPercentage", + type: { + name: "Number" + } + }, + connectionString: { + serializedName: "properties.ConnectionString", + readOnly: true, + type: { + name: "String" + } + }, + retentionInDays: { + serializedName: "properties.RetentionInDays", + type: { + name: "Number" + } + }, + disableIpMasking: { + serializedName: "properties.DisableIpMasking", + type: { + name: "Boolean" + } + }, + immediatePurgeDataOn30Days: { + serializedName: "properties.ImmediatePurgeDataOn30Days", + type: { + name: "Boolean" + } + }, + workspaceResourceId: { + serializedName: "properties.WorkspaceResourceId", + type: { + name: "String" + } + }, + laMigrationDate: { + serializedName: "properties.LaMigrationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + privateLinkScopedResources: { + serializedName: "properties.PrivateLinkScopedResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkScopedResource" + } + } + } + }, + publicNetworkAccessForIngestion: { + defaultValue: "Enabled", + serializedName: "properties.publicNetworkAccessForIngestion", + type: { + name: "String" + } + }, + publicNetworkAccessForQuery: { + defaultValue: "Enabled", + serializedName: "properties.publicNetworkAccessForQuery", + type: { + name: "String" + } + }, + ingestionMode: { + defaultValue: "LogAnalytics", + serializedName: "properties.IngestionMode", + type: { + name: "String" + } + }, + disableLocalAuth: { + serializedName: "properties.DisableLocalAuth", + type: { + name: "Boolean" + } + }, + forceCustomerStorageForProfiler: { + serializedName: "properties.ForceCustomerStorageForProfiler", + type: { + name: "Boolean" + } + } + } + } +}; + +export const WorkbookResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkbookResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "WorkbookResourceIdentity" + } + }, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const ComponentLinkedStorageAccounts: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComponentLinkedStorageAccounts", + modelProperties: { + ...ProxyResource.type.modelProperties, + linkedStorageAccount: { + serializedName: "properties.linkedStorageAccount", + type: { + name: "String" + } + } + } + } +}; + +export const Workbook: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Workbook", + modelProperties: { + ...WorkbookResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + serializedData: { + serializedName: "properties.serializedData", + nullable: true, + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + timeModified: { + serializedName: "properties.timeModified", + readOnly: true, + type: { + name: "DateTime" + } + }, + category: { + serializedName: "properties.category", + type: { + name: "String" + } + }, + tagsPropertiesTags: { + serializedName: "properties.tags", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + userId: { + serializedName: "properties.userId", + readOnly: true, + type: { + name: "String" + } + }, + sourceId: { + serializedName: "properties.sourceId", + type: { + name: "String" + } + }, + storageUri: { + serializedName: "properties.storageUri", + nullable: true, + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + nullable: true, + type: { + name: "String" + } + }, + revision: { + serializedName: "properties.revision", + readOnly: true, + nullable: true, type: { name: "String" } diff --git a/sdk/applicationinsights/arm-appinsights/src/models/myWorkbooksMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/myWorkbooksMappers.ts deleted file mode 100644 index 10b24a7aaea7..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/myWorkbooksMappers.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponent, - ApplicationInsightsComponentProactiveDetectionConfiguration, - ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, - AzureEntityResource, - BaseResource, - ComponentLinkedStorageAccounts, - ComponentsResource, - ErrorFieldContract, - MyWorkbook, - MyWorkbookError, - MyWorkbookResource, - MyWorkbooksListResult, - PrivateLinkScopedResource, - ProxyResource, - Resource, - TrackedResource, - WebTest, - WebTestGeolocation, - WebTestPropertiesConfiguration, - WebtestsResource, - Workbook, - WorkbookResource -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/operationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/operationsMappers.ts deleted file mode 100644 index cdf9b64cd39d..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/operationsMappers.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - CloudError, - ErrorResponse, - Operation, - OperationDisplay, - OperationInfo, - OperationListResult, - OperationLive, - OperationsListResult -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/parameters.ts b/sdk/applicationinsights/arm-appinsights/src/models/parameters.ts index 6e3e12a770dc..6efff1734966 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/parameters.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/parameters.ts @@ -1,415 +1,599 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + Annotation as AnnotationMapper, + APIKeyRequest as APIKeyRequestMapper, + ApplicationInsightsComponentExportRequest as ApplicationInsightsComponentExportRequestMapper, + ApplicationInsightsComponentBillingFeatures as ApplicationInsightsComponentBillingFeaturesMapper, + ApplicationInsightsComponentProactiveDetectionConfiguration as ApplicationInsightsComponentProactiveDetectionConfigurationMapper, + WorkItemCreateConfiguration as WorkItemCreateConfigurationMapper, + ApplicationInsightsComponentFavorite as ApplicationInsightsComponentFavoriteMapper, + WebTest as WebTestMapper, + TagsResource as TagsResourceMapper, + ApplicationInsightsComponentAnalyticsItem as ApplicationInsightsComponentAnalyticsItemMapper, + WorkbookTemplate as WorkbookTemplateMapper, + WorkbookTemplateUpdateParameters as WorkbookTemplateUpdateParametersMapper, + MyWorkbook as MyWorkbookMapper, + Workbook as WorkbookMapper, + WorkbookUpdateParameters as WorkbookUpdateParametersMapper, + ApplicationInsightsComponent as ApplicationInsightsComponentMapper, + ComponentPurgeBody as ComponentPurgeBodyMapper, + ComponentLinkedStorageAccounts as ComponentLinkedStorageAccountsMapper, + ComponentLinkedStorageAccountsPatch as ComponentLinkedStorageAccountsPatchMapper +} from "../models/mappers"; -export const acceptLanguage: msRest.OperationParameter = { - parameterPath: "acceptLanguage", +export const accept: OperationParameter = { + parameterPath: "accept", mapper: { - serializedName: "accept-language", - defaultValue: 'en-US', + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", type: { name: "String" } } }; -export const annotationId: msRest.OperationURLParameter = { - parameterPath: "annotationId", + +export const $host: OperationURLParameter = { + parameterPath: "$host", mapper: { + serializedName: "$host", required: true, - serializedName: "annotationId", type: { name: "String" } - } + }, + skipEncoding: true }; -export const apiVersion0: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2015-05-01', constraints: { + MaxLength: 90, MinLength: 1 }, + serializedName: "resourceGroupName", + required: true, type: { name: "String" } } }; -export const apiVersion1: msRest.OperationQueryParameter = { + +export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - required: true, + defaultValue: "2015-05-01", isConstant: true, serializedName: "api-version", - defaultValue: '2020-06-02-preview', - constraints: { - MinLength: 1 - }, type: { name: "String" } } }; -export const apiVersion2: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2018-05-01-preview', constraints: { MinLength: 1 }, + serializedName: "subscriptionId", + required: true, type: { name: "String" } } }; -export const apiVersion3: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", + +export const resourceName: OperationURLParameter = { + parameterPath: "resourceName", mapper: { + serializedName: "resourceName", required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2020-03-01-preview', - constraints: { - MinLength: 1 - }, type: { name: "String" } } }; -export const canFetchContent: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "canFetchContent" - ], + +export const start: OperationQueryParameter = { + parameterPath: "start", mapper: { - serializedName: "canFetchContent", + serializedName: "start", + required: true, type: { - name: "Boolean" + name: "String" } } }; -export const category: msRest.OperationQueryParameter = { - parameterPath: "category", + +export const end: OperationQueryParameter = { + parameterPath: "end", mapper: { + serializedName: "end", required: true, - serializedName: "category", type: { name: "String" } } }; -export const componentName: msRest.OperationURLParameter = { - parameterPath: "componentName", + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { - required: true, - serializedName: "componentName", + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", type: { name: "String" } } }; -export const configurationId: msRest.OperationURLParameter = { - parameterPath: "configurationId", + +export const annotationProperties: OperationParameter = { + parameterPath: "annotationProperties", + mapper: AnnotationMapper +}; + +export const annotationId: OperationURLParameter = { + parameterPath: "annotationId", mapper: { + serializedName: "annotationId", required: true, - serializedName: "ConfigurationId", type: { name: "String" } } }; -export const end: msRest.OperationQueryParameter = { - parameterPath: "end", + +export const aPIKeyProperties: OperationParameter = { + parameterPath: "aPIKeyProperties", + mapper: APIKeyRequestMapper +}; + +export const keyId: OperationURLParameter = { + parameterPath: "keyId", mapper: { + serializedName: "keyId", required: true, - serializedName: "end", type: { name: "String" } } }; -export const exportId: msRest.OperationURLParameter = { + +export const exportProperties: OperationParameter = { + parameterPath: "exportProperties", + mapper: ApplicationInsightsComponentExportRequestMapper +}; + +export const exportId: OperationURLParameter = { parameterPath: "exportId", mapper: { - required: true, serializedName: "exportId", + required: true, type: { name: "String" } } }; -export const favoriteId: msRest.OperationURLParameter = { - parameterPath: "favoriteId", + +export const billingFeaturesProperties: OperationParameter = { + parameterPath: "billingFeaturesProperties", + mapper: ApplicationInsightsComponentBillingFeaturesMapper +}; + +export const configurationId: OperationURLParameter = { + parameterPath: "configurationId", mapper: { + serializedName: "ConfigurationId", required: true, - serializedName: "favoriteId", type: { name: "String" } } }; -export const favoriteType: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "favoriteType" - ], + +export const proactiveDetectionProperties: OperationParameter = { + parameterPath: "proactiveDetectionProperties", + mapper: ApplicationInsightsComponentProactiveDetectionConfigurationMapper +}; + +export const workItemConfigurationProperties: OperationParameter = { + parameterPath: "workItemConfigurationProperties", + mapper: WorkItemCreateConfigurationMapper +}; + +export const workItemConfigId: OperationURLParameter = { + parameterPath: "workItemConfigId", + mapper: { + serializedName: "workItemConfigId", + required: true, + type: { + name: "String" + } + } +}; + +export const favoriteType: OperationQueryParameter = { + parameterPath: ["options", "favoriteType"], mapper: { serializedName: "favoriteType", - defaultValue: 'shared', type: { name: "Enum", - allowedValues: [ - "shared", - "user" - ] + allowedValues: ["shared", "user"] } } }; -export const id: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "id" - ], + +export const sourceType: OperationQueryParameter = { + parameterPath: ["options", "sourceType"], mapper: { - serializedName: "id", + serializedName: "sourceType", type: { name: "String" } } }; -export const includeContent: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "includeContent" - ], + +export const canFetchContent: OperationQueryParameter = { + parameterPath: ["options", "canFetchContent"], mapper: { - serializedName: "includeContent", + serializedName: "canFetchContent", type: { name: "Boolean" } } }; -export const keyId: msRest.OperationURLParameter = { - parameterPath: "keyId", + +export const tags: OperationQueryParameter = { + parameterPath: ["options", "tags"], mapper: { + serializedName: "tags", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: "CSV" +}; + +export const favoriteId: OperationURLParameter = { + parameterPath: "favoriteId", + mapper: { + serializedName: "favoriteId", required: true, - serializedName: "keyId", type: { name: "String" } } }; -export const name: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "name" - ], + +export const favoriteProperties: OperationParameter = { + parameterPath: "favoriteProperties", + mapper: ApplicationInsightsComponentFavoriteMapper +}; + +export const webTestName: OperationURLParameter = { + parameterPath: "webTestName", mapper: { - serializedName: "name", + serializedName: "webTestName", + required: true, type: { name: "String" } } }; -export const nextPageLink: msRest.OperationURLParameter = { - parameterPath: "nextPageLink", + +export const webTestDefinition: OperationParameter = { + parameterPath: "webTestDefinition", + mapper: WebTestMapper +}; + +export const webTestTags: OperationParameter = { + parameterPath: "webTestTags", + mapper: TagsResourceMapper +}; + +export const componentName: OperationURLParameter = { + parameterPath: "componentName", mapper: { + serializedName: "componentName", required: true, + type: { + name: "String" + } + } +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { serializedName: "nextLink", + required: true, type: { name: "String" } }, skipEncoding: true }; -export const overrideItem: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "overrideItem" - ], + +export const scopePath: OperationURLParameter = { + parameterPath: "scopePath", mapper: { - serializedName: "overrideItem", + serializedName: "scopePath", + required: true, type: { - name: "Boolean" + name: "String" } } }; -export const purgeId: msRest.OperationURLParameter = { - parameterPath: "purgeId", + +export const scope: OperationQueryParameter = { + parameterPath: ["options", "scope"], mapper: { - required: true, - serializedName: "purgeId", + serializedName: "scope", type: { name: "String" } } }; -export const resourceGroupName: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", + +export const typeParam: OperationQueryParameter = { + parameterPath: ["options", "typeParam"], mapper: { - required: true, - serializedName: "resourceGroupName", - constraints: { - MaxLength: 90, - MinLength: 1, - Pattern: /^[-\w\._\(\)]+$/ - }, + defaultValue: "none", + serializedName: "type", type: { name: "String" } } }; -export const resourceName: msRest.OperationURLParameter = { - parameterPath: "resourceName", + +export const includeContent: OperationQueryParameter = { + parameterPath: ["options", "includeContent"], mapper: { - required: true, - serializedName: "resourceName", + serializedName: "includeContent", + type: { + name: "Boolean" + } + } +}; + +export const id: OperationQueryParameter = { + parameterPath: ["options", "id"], + mapper: { + serializedName: "id", type: { name: "String" } } }; -export const resourceUri: msRest.OperationURLParameter = { - parameterPath: "resourceUri", + +export const name: OperationQueryParameter = { + parameterPath: ["options", "name"], mapper: { - required: true, - serializedName: "resourceUri", + serializedName: "name", type: { name: "String" } - }, - skipEncoding: true + } +}; + +export const itemProperties: OperationParameter = { + parameterPath: "itemProperties", + mapper: ApplicationInsightsComponentAnalyticsItemMapper }; -export const scope: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "scope" - ], + +export const overrideItem: OperationQueryParameter = { + parameterPath: ["options", "overrideItem"], mapper: { - serializedName: "scope", - defaultValue: 'shared', + serializedName: "overrideItem", + type: { + name: "Boolean" + } + } +}; + +export const apiVersion1: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2020-11-20", + isConstant: true, + serializedName: "api-version", type: { name: "String" } } }; -export const scopePath: msRest.OperationURLParameter = { - parameterPath: "scopePath", + +export const workbookTemplateProperties: OperationParameter = { + parameterPath: "workbookTemplateProperties", + mapper: WorkbookTemplateMapper +}; + +export const workbookTemplateUpdateParameters: OperationParameter = { + parameterPath: ["options", "workbookTemplateUpdateParameters"], + mapper: WorkbookTemplateUpdateParametersMapper +}; + +export const category: OperationQueryParameter = { + parameterPath: "category", mapper: { + serializedName: "category", required: true, - serializedName: "scopePath", type: { name: "String" } } }; -export const sourceType: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "sourceType" - ], + +export const sourceId: OperationQueryParameter = { + parameterPath: ["options", "sourceId"], mapper: { - serializedName: "sourceType", + serializedName: "sourceId", type: { name: "String" } } }; -export const start: msRest.OperationQueryParameter = { - parameterPath: "start", + +export const apiVersion2: OperationQueryParameter = { + parameterPath: "apiVersion", mapper: { - required: true, - serializedName: "start", + defaultValue: "2021-03-08", + isConstant: true, + serializedName: "api-version", type: { name: "String" } } }; -export const storageType: msRest.OperationURLParameter = { - parameterPath: "storageType", + +export const workbookProperties: OperationParameter = { + parameterPath: "workbookProperties", + mapper: MyWorkbookMapper +}; + +export const apiVersion3: OperationQueryParameter = { + parameterPath: "apiVersion", mapper: { - required: true, + defaultValue: "2021-08-01", isConstant: true, - serializedName: "storageType", - defaultValue: 'ServiceProfiler', + serializedName: "api-version", type: { name: "String" } } }; -export const subscriptionId: msRest.OperationURLParameter = { - parameterPath: "subscriptionId", + +export const workbookProperties1: OperationParameter = { + parameterPath: "workbookProperties", + mapper: WorkbookMapper +}; + +export const workbookUpdateParameters: OperationParameter = { + parameterPath: ["options", "workbookUpdateParameters"], + mapper: WorkbookUpdateParametersMapper +}; + +export const revisionId: OperationURLParameter = { + parameterPath: "revisionId", mapper: { + serializedName: "revisionId", required: true, - serializedName: "subscriptionId", - constraints: { - MinLength: 1 - }, type: { name: "String" } } }; -export const tags: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "tags" - ], + +export const apiVersion4: OperationQueryParameter = { + parameterPath: "apiVersion", mapper: { - serializedName: "tags", + defaultValue: "2020-02-02", + isConstant: true, + serializedName: "api-version", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } - }, - collectionFormat: msRest.QueryCollectionFormat.Csv + } +}; + +export const insightProperties: OperationParameter = { + parameterPath: "insightProperties", + mapper: ApplicationInsightsComponentMapper +}; + +export const componentTags: OperationParameter = { + parameterPath: "componentTags", + mapper: TagsResourceMapper +}; + +export const body: OperationParameter = { + parameterPath: "body", + mapper: ComponentPurgeBodyMapper }; -export const type: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "type" - ], + +export const purgeId: OperationURLParameter = { + parameterPath: "purgeId", mapper: { - serializedName: "type", - defaultValue: 'none', + serializedName: "purgeId", + required: true, type: { name: "String" } } }; -export const webTestName: msRest.OperationURLParameter = { - parameterPath: "webTestName", + +export const apiVersion5: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2020-03-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const storageType: OperationURLParameter = { + parameterPath: "storageType", mapper: { + serializedName: "storageType", required: true, - serializedName: "webTestName", type: { name: "String" } } }; -export const workItemConfigId: msRest.OperationURLParameter = { - parameterPath: "workItemConfigId", + +export const linkedStorageAccountsProperties: OperationParameter = { + parameterPath: "linkedStorageAccountsProperties", + mapper: ComponentLinkedStorageAccountsMapper +}; + +export const linkedStorageAccountsProperties1: OperationParameter = { + parameterPath: "linkedStorageAccountsProperties", + mapper: ComponentLinkedStorageAccountsPatchMapper +}; + +export const resourceUri: OperationURLParameter = { + parameterPath: "resourceUri", mapper: { + serializedName: "resourceUri", required: true, - serializedName: "workItemConfigId", + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const apiVersion6: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-10-14", + isConstant: true, + serializedName: "api-version", type: { name: "String" } diff --git a/sdk/applicationinsights/arm-appinsights/src/models/proactiveDetectionConfigurationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/proactiveDetectionConfigurationsMappers.ts deleted file mode 100644 index ebd37de45598..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/proactiveDetectionConfigurationsMappers.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponent, - ApplicationInsightsComponentProactiveDetectionConfiguration, - ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, - AzureEntityResource, - BaseResource, - CloudError, - ComponentLinkedStorageAccounts, - ComponentsResource, - MyWorkbook, - MyWorkbookResource, - PrivateLinkScopedResource, - ProxyResource, - Resource, - TrackedResource, - WebTest, - WebTestGeolocation, - WebTestPropertiesConfiguration, - WebtestsResource, - Workbook, - WorkbookResource -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/webTestLocationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/webTestLocationsMappers.ts deleted file mode 100644 index 97c2505df574..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/webTestLocationsMappers.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponentWebTestLocation, - ApplicationInsightsWebTestLocationsListResult, - CloudError -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/webTestsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/webTestsMappers.ts deleted file mode 100644 index ec04977b0d47..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/webTestsMappers.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponent, - ApplicationInsightsComponentProactiveDetectionConfiguration, - ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, - AzureEntityResource, - BaseResource, - CloudError, - ComponentLinkedStorageAccounts, - ComponentsResource, - MyWorkbook, - MyWorkbookResource, - PrivateLinkScopedResource, - ProxyResource, - Resource, - TagsResource, - TrackedResource, - WebTest, - WebTestGeolocation, - WebTestListResult, - WebTestPropertiesConfiguration, - WebtestsResource, - Workbook, - WorkbookResource -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/workItemConfigurationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/workItemConfigurationsMappers.ts deleted file mode 100644 index 27d2702c8d87..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/workItemConfigurationsMappers.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - CloudError, - InnerError, - WorkItemConfiguration, - WorkItemConfigurationError, - WorkItemConfigurationsListResult, - WorkItemCreateConfiguration -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/workbooksMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/workbooksMappers.ts deleted file mode 100644 index f3c315638737..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/models/workbooksMappers.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ApplicationInsightsComponent, - ApplicationInsightsComponentProactiveDetectionConfiguration, - ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, - AzureEntityResource, - BaseResource, - ComponentLinkedStorageAccounts, - ComponentsResource, - ErrorFieldContract, - MyWorkbook, - MyWorkbookResource, - PrivateLinkScopedResource, - ProxyResource, - Resource, - TrackedResource, - WebTest, - WebTestGeolocation, - WebTestPropertiesConfiguration, - WebtestsResource, - Workbook, - WorkbookError, - WorkbookResource, - WorkbooksListResult -} from "../models/mappers"; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/aPIKeys.ts b/sdk/applicationinsights/arm-appinsights/src/operations/aPIKeys.ts index b4f369ebc52b..8ae689bbaeb3 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/aPIKeys.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/aPIKeys.ts @@ -1,28 +1,40 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/aPIKeysMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { APIKeys } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + ApplicationInsightsComponentAPIKey, + APIKeysListOptionalParams, + APIKeysListResponse, + APIKeyRequest, + APIKeysCreateOptionalParams, + APIKeysCreateResponse, + APIKeysDeleteOptionalParams, + APIKeysDeleteResponse, + APIKeysGetOptionalParams, + APIKeysGetResponse +} from "../models"; -/** Class representing a APIKeys. */ -export class APIKeys { - private readonly client: ApplicationInsightsManagementClientContext; +/// +/** Class containing APIKeys operations. */ +export class APIKeysImpl implements APIKeys { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a APIKeys. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class APIKeys class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,71 +42,85 @@ export class APIKeys { * Gets a list of API keys of an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + public list( + resourceGroupName: string, + resourceName: string, + options?: APIKeysListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, resourceName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, resourceName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + options?: APIKeysListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, resourceName, options); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + options?: APIKeysListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + /** + * Gets a list of API keys of an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + resourceGroupName: string, + resourceName: string, + options?: APIKeysListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + listOperationSpec + ); } /** * Create an API Key of an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param aPIKeyProperties Properties that need to be specified to create an API key of a - * Application Insights component. - * @param [options] The optional parameters - * @returns Promise - */ - create(resourceGroupName: string, resourceName: string, aPIKeyProperties: Models.APIKeyRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param aPIKeyProperties Properties that need to be specified to create an API key of a - * Application Insights component. - * @param callback The callback - */ - create(resourceGroupName: string, resourceName: string, aPIKeyProperties: Models.APIKeyRequest, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param aPIKeyProperties Properties that need to be specified to create an API key of a - * Application Insights component. - * @param options The optional parameters - * @param callback The callback + * @param aPIKeyProperties Properties that need to be specified to create an API key of a Application + * Insights component. + * @param options The options parameters. */ - create(resourceGroupName: string, resourceName: string, aPIKeyProperties: Models.APIKeyRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, resourceName: string, aPIKeyProperties: Models.APIKeyRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create( + resourceGroupName: string, + resourceName: string, + aPIKeyProperties: APIKeyRequest, + options?: APIKeysCreateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - aPIKeyProperties, - options - }, - createOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, aPIKeyProperties, options }, + createOperationSpec + ); } /** @@ -102,35 +128,18 @@ export class APIKeys { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, resourceName: string, keyId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, keyId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, resourceName: string, keyId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, keyId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + resourceName: string, + keyId: string, + options?: APIKeysDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - keyId, - options - }, - deleteMethodOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, keyId, options }, + deleteOperationSpec + ); } /** @@ -138,145 +147,100 @@ export class APIKeys { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, keyId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, keyId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, keyId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, keyId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + keyId: string, + options?: APIKeysGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - keyId, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, keyId, options }, + getOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys", + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponentAPIKeyListResult + } + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ApplicationInsightsComponentAPIKeyListResult - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApplicationInsightsComponentAPIKey } }, - serializer -}; - -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys", + requestBody: Parameters.aPIKeyProperties, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "aPIKeyProperties", - mapper: { - ...Mappers.APIKeyRequest, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}", + httpMethod: "DELETE", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentAPIKey - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.keyId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentAPIKey - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.keyId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplicationInsightsComponentAPIKey - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts b/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts index 6ab9ebbc360f..e82a0517d7d6 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts @@ -1,28 +1,37 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/analyticsItemsMappers"; +import { AnalyticsItems } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + ItemScopePath, + AnalyticsItemsListOptionalParams, + AnalyticsItemsListResponse, + AnalyticsItemsGetOptionalParams, + AnalyticsItemsGetResponse, + ApplicationInsightsComponentAnalyticsItem, + AnalyticsItemsPutOptionalParams, + AnalyticsItemsPutResponse, + AnalyticsItemsDeleteOptionalParams +} from "../models"; -/** Class representing a AnalyticsItems. */ -export class AnalyticsItems { - private readonly client: ApplicationInsightsManagementClientContext; +/** Class containing AnalyticsItems operations. */ +export class AnalyticsItemsImpl implements AnalyticsItems { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a AnalyticsItems. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class AnalyticsItems class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,202 +39,95 @@ export class AnalyticsItems { * Gets a list of Analytics Items defined within an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' - * @param [options] The optional parameters - * @returns Promise + * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared + * between all users with access to the Application Insights component. + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options?: Models.AnalyticsItemsListOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options: Models.AnalyticsItemsListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options?: Models.AnalyticsItemsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + resourceGroupName: string, + resourceName: string, + scopePath: ItemScopePath, + options?: AnalyticsItemsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - scopePath, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, scopePath, options }, + listOperationSpec + ); } /** * Gets a specific Analytics Items defined within an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options?: Models.AnalyticsItemsGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' - * @param callback The callback + * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared + * between all users with access to the Application Insights component. + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options: Models.AnalyticsItemsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options?: Models.AnalyticsItemsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + scopePath: ItemScopePath, + options?: AnalyticsItemsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - scopePath, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, scopePath, options }, + getOperationSpec + ); } /** * Adds or Updates a specific Analytics Item within an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' - * @param itemProperties Properties that need to be specified to create a new item and add it to an - * Application Insights component. - * @param [options] The optional parameters - * @returns Promise - */ - put(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, itemProperties: Models.ApplicationInsightsComponentAnalyticsItem, options?: Models.AnalyticsItemsPutOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' - * @param itemProperties Properties that need to be specified to create a new item and add it to an - * Application Insights component. - * @param callback The callback - */ - put(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, itemProperties: Models.ApplicationInsightsComponentAnalyticsItem, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' + * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared + * between all users with access to the Application Insights component. * @param itemProperties Properties that need to be specified to create a new item and add it to an - * Application Insights component. - * @param options The optional parameters - * @param callback The callback + * Application Insights component. + * @param options The options parameters. */ - put(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, itemProperties: Models.ApplicationInsightsComponentAnalyticsItem, options: Models.AnalyticsItemsPutOptionalParams, callback: msRest.ServiceCallback): void; - put(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, itemProperties: Models.ApplicationInsightsComponentAnalyticsItem, options?: Models.AnalyticsItemsPutOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + put( + resourceGroupName: string, + resourceName: string, + scopePath: ItemScopePath, + itemProperties: ApplicationInsightsComponentAnalyticsItem, + options?: AnalyticsItemsPutOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - scopePath, - itemProperties, - options - }, - putOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, scopePath, itemProperties, options }, + putOperationSpec + ); } /** * Deletes a specific Analytics Items defined within an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options?: Models.AnalyticsItemsDeleteMethodOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. Possible values - * include: 'analyticsItems', 'myanalyticsItems' - * @param options The optional parameters - * @param callback The callback + * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared + * between all users with access to the Application Insights component. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options: Models.AnalyticsItemsDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, scopePath: Models.ItemScopePath, options?: Models.AnalyticsItemsDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + resourceName: string, + scopePath: ItemScopePath, + options?: AnalyticsItemsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - scopePath, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, resourceName, scopePath, options }, + deleteOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.scopePath - ], - queryParameters: [ - Parameters.apiVersion0, - Parameters.scope, - Parameters.type, - Parameters.includeContent - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -236,98 +138,78 @@ const listOperationSpec: msRest.OperationSpec = { } } } - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item", + queryParameters: [ + Parameters.apiVersion, + Parameters.scope, + Parameters.typeParam, + Parameters.includeContent + ], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.resourceName, Parameters.scopePath ], - queryParameters: [ - Parameters.apiVersion0, - Parameters.id, - Parameters.name - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentAnalyticsItem - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const putOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item", + queryParameters: [Parameters.apiVersion, Parameters.id, Parameters.name], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.resourceName, Parameters.scopePath ], - queryParameters: [ - Parameters.apiVersion0, - Parameters.overrideItem - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "itemProperties", - mapper: { - ...Mappers.ApplicationInsightsComponentAnalyticsItem, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const putOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentAnalyticsItem - }, - default: { - bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.itemProperties, + queryParameters: [Parameters.apiVersion, Parameters.overrideItem], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.scopePath + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item", + responses: { 200: {} }, + queryParameters: [Parameters.apiVersion, Parameters.id, Parameters.name], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.resourceName, Parameters.scopePath ], - queryParameters: [ - Parameters.apiVersion0, - Parameters.id, - Parameters.name - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts index b9b3f4e1015d..56d88e05634b 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts @@ -1,28 +1,38 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/annotationsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Annotations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + Annotation, + AnnotationsListOptionalParams, + AnnotationsListResponse, + AnnotationsCreateOptionalParams, + AnnotationsCreateResponse, + AnnotationsDeleteOptionalParams, + AnnotationsGetOptionalParams, + AnnotationsGetResponse +} from "../models"; -/** Class representing a Annotations. */ -export class Annotations { - private readonly client: ApplicationInsightsManagementClientContext; +/// +/** Class containing Annotations operations. */ +export class AnnotationsImpl implements Annotations { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a Annotations. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Annotations class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,43 +40,99 @@ export class Annotations { * Gets the list of annotations for a component for given time range * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from - * current date. + * @param start The start time to query from for annotations, cannot be older than 90 days from current + * date. * @param end The end time to query for annotations. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, start: string, end: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from - * current date. - * @param end The end time to query for annotations. - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, start: string, end: string, callback: msRest.ServiceCallback): void; + public list( + resourceGroupName: string, + resourceName: string, + start: string, + end: string, + options?: AnnotationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + resourceName, + start, + end, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + resourceName, + start, + end, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + start: string, + end: string, + options?: AnnotationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + resourceName, + start, + end, + options + ); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + start: string, + end: string, + options?: AnnotationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + start, + end, + options + )) { + yield* page; + } + } + /** + * Gets the list of annotations for a component for given time range * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from - * current date. + * @param start The start time to query from for annotations, cannot be older than 90 days from current + * date. * @param end The end time to query for annotations. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, start: string, end: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, resourceName: string, start: string, end: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + resourceGroupName: string, + resourceName: string, + start: string, + end: string, + options?: AnnotationsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - start, - end, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, start, end, options }, + listOperationSpec + ); } /** @@ -74,38 +140,19 @@ export class Annotations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationProperties Properties that need to be specified to create an annotation of a - * Application Insights component. - * @param [options] The optional parameters - * @returns Promise - */ - create(resourceGroupName: string, resourceName: string, annotationProperties: Models.Annotation, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationProperties Properties that need to be specified to create an annotation of a - * Application Insights component. - * @param callback The callback + * Application Insights component. + * @param options The options parameters. */ - create(resourceGroupName: string, resourceName: string, annotationProperties: Models.Annotation, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationProperties Properties that need to be specified to create an annotation of a - * Application Insights component. - * @param options The optional parameters - * @param callback The callback - */ - create(resourceGroupName: string, resourceName: string, annotationProperties: Models.Annotation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, resourceName: string, annotationProperties: Models.Annotation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create( + resourceGroupName: string, + resourceName: string, + annotationProperties: Annotation, + options?: AnnotationsCreateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - annotationProperties, - options - }, - createOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, annotationProperties, options }, + createOperationSpec + ); } /** @@ -113,38 +160,19 @@ export class Annotations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights - * component. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights - * component. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights - * component. - * @param options The optional parameters - * @param callback The callback + * component. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, annotationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + resourceName: string, + annotationId: string, + options?: AnnotationsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - annotationId, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, resourceName, annotationId, options }, + deleteOperationSpec + ); } /** @@ -152,59 +180,28 @@ export class Annotations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights - * component. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, resourceName: string, annotationId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights - * component. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, annotationId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights - * component. - * @param options The optional parameters - * @param callback The callback + * component. + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, annotationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, annotationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + annotationId: string, + options?: AnnotationsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - annotationId, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, annotationId, options }, + getOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion0, - Parameters.start, - Parameters.end - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.AnnotationsListResult @@ -213,42 +210,26 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AnnotationError } }, - serializer -}; - -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations", + queryParameters: [Parameters.apiVersion, Parameters.start, Parameters.end], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "annotationProperties", - mapper: { - ...Mappers.Annotation, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations", + httpMethod: "PUT", responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", - element: { - type: { - name: "Composite", - className: "Annotation" - } - } + element: { type: { name: "Composite", className: "Annotation" } } } } }, @@ -256,60 +237,43 @@ const createOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AnnotationError } }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}", + requestBody: Parameters.annotationProperties, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.resourceName, - Parameters.annotationId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceName ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}", +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}", + httpMethod: "DELETE", + responses: { 200: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.annotationId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}", + httpMethod: "GET", responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", - element: { - type: { - name: "Composite", - className: "Annotation" - } - } + element: { type: { name: "Composite", className: "Annotation" } } } } }, @@ -317,5 +281,14 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AnnotationError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.annotationId + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts index e5ce8d5f1604..cb112acafb6c 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts @@ -1,28 +1,31 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/componentAvailableFeaturesMappers"; +import { ComponentAvailableFeatures } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + ComponentAvailableFeaturesGetOptionalParams, + ComponentAvailableFeaturesGetResponse +} from "../models"; -/** Class representing a ComponentAvailableFeatures. */ -export class ComponentAvailableFeatures { - private readonly client: ApplicationInsightsManagementClientContext; +/** Class containing ComponentAvailableFeatures operations. */ +export class ComponentAvailableFeaturesImpl + implements ComponentAvailableFeatures { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a ComponentAvailableFeatures. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class ComponentAvailableFeatures class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,58 +33,38 @@ export class ComponentAvailableFeatures { * Returns all available features of the application insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + options?: ComponentAvailableFeaturesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + getOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/getavailablebillingfeatures", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/getavailablebillingfeatures", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentAvailableFeatures - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts index 8c309bc2b2f2..a3acc0fa2123 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts @@ -1,28 +1,34 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/componentCurrentBillingFeaturesMappers"; +import { ComponentCurrentBillingFeatures } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + ComponentCurrentBillingFeaturesGetOptionalParams, + ComponentCurrentBillingFeaturesGetResponse, + ApplicationInsightsComponentBillingFeatures, + ComponentCurrentBillingFeaturesUpdateOptionalParams, + ComponentCurrentBillingFeaturesUpdateResponse +} from "../models"; -/** Class representing a ComponentCurrentBillingFeatures. */ -export class ComponentCurrentBillingFeatures { - private readonly client: ApplicationInsightsManagementClientContext; +/** Class containing ComponentCurrentBillingFeatures operations. */ +export class ComponentCurrentBillingFeaturesImpl + implements ComponentCurrentBillingFeatures { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a ComponentCurrentBillingFeatures. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class ComponentCurrentBillingFeatures class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,129 +36,79 @@ export class ComponentCurrentBillingFeatures { * Returns current billing features for an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + options?: ComponentCurrentBillingFeaturesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + getOperationSpec + ); } /** * Update current billing features for an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features - * for an Application Insights component. - * @param [options] The optional parameters - * @returns Promise + * @param billingFeaturesProperties Properties that need to be specified to update billing features for + * an Application Insights component. + * @param options The options parameters. */ - update(resourceGroupName: string, resourceName: string, billingFeaturesProperties: Models.ApplicationInsightsComponentBillingFeatures, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features - * for an Application Insights component. - * @param callback The callback - */ - update(resourceGroupName: string, resourceName: string, billingFeaturesProperties: Models.ApplicationInsightsComponentBillingFeatures, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features - * for an Application Insights component. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, resourceName: string, billingFeaturesProperties: Models.ApplicationInsightsComponentBillingFeatures, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, resourceName: string, billingFeaturesProperties: Models.ApplicationInsightsComponentBillingFeatures, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + resourceGroupName: string, + resourceName: string, + billingFeaturesProperties: ApplicationInsightsComponentBillingFeatures, + options?: ComponentCurrentBillingFeaturesUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - billingFeaturesProperties, - options - }, - updateOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, billingFeaturesProperties, options }, + updateOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentBillingFeatures - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "billingFeaturesProperties", - mapper: { - ...Mappers.ApplicationInsightsComponentBillingFeatures, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentBillingFeatures - }, - default: { - bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.billingFeaturesProperties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts index de36f7cae22c..4b383c42e0c0 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts @@ -1,28 +1,31 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/componentFeatureCapabilitiesMappers"; +import { ComponentFeatureCapabilities } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + ComponentFeatureCapabilitiesGetOptionalParams, + ComponentFeatureCapabilitiesGetResponse +} from "../models"; -/** Class representing a ComponentFeatureCapabilities. */ -export class ComponentFeatureCapabilities { - private readonly client: ApplicationInsightsManagementClientContext; +/** Class containing ComponentFeatureCapabilities operations. */ +export class ComponentFeatureCapabilitiesImpl + implements ComponentFeatureCapabilities { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a ComponentFeatureCapabilities. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class ComponentFeatureCapabilities class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,58 +33,38 @@ export class ComponentFeatureCapabilities { * Returns feature capabilities of the application insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + options?: ComponentFeatureCapabilitiesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + getOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/featurecapabilities", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/featurecapabilities", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentFeatureCapabilities - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts index 46a0e3ed40bf..d9b50fde2a13 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts @@ -1,28 +1,39 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/componentLinkedStorageAccountsOperationsMappers"; +import { ComponentLinkedStorageAccountsOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + StorageType, + ComponentLinkedStorageAccountsGetOptionalParams, + ComponentLinkedStorageAccountsGetResponse, + ComponentLinkedStorageAccounts, + ComponentLinkedStorageAccountsCreateAndUpdateOptionalParams, + ComponentLinkedStorageAccountsCreateAndUpdateResponse, + ComponentLinkedStorageAccountsPatch, + ComponentLinkedStorageAccountsUpdateOptionalParams, + ComponentLinkedStorageAccountsUpdateResponse, + ComponentLinkedStorageAccountsDeleteOptionalParams +} from "../models"; -/** Class representing a ComponentLinkedStorageAccountsOperations. */ -export class ComponentLinkedStorageAccountsOperations { - private readonly client: ApplicationInsightsManagementClientContext; +/** Class containing ComponentLinkedStorageAccountsOperations operations. */ +export class ComponentLinkedStorageAccountsOperationsImpl + implements ComponentLinkedStorageAccountsOperations { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a ComponentLinkedStorageAccountsOperations. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class ComponentLinkedStorageAccountsOperations class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,260 +41,195 @@ export class ComponentLinkedStorageAccountsOperations { * Returns the current linked storage settings for an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param storageType The type of the Application Insights component data source for the linked storage + * account. + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + storageType: StorageType, + options?: ComponentLinkedStorageAccountsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, storageType, options }, + getOperationSpec + ); } /** * Replace current linked storage account for an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param linkedStorageAccountsProperties Properties that need to be specified to update linked - * storage accounts for an Application Insights component. - * @param [options] The optional parameters - * @returns Promise - */ - createAndUpdate(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccounts, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param linkedStorageAccountsProperties Properties that need to be specified to update linked - * storage accounts for an Application Insights component. - * @param callback The callback + * @param storageType The type of the Application Insights component data source for the linked storage + * account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage + * accounts for an Application Insights component. + * @param options The options parameters. */ - createAndUpdate(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccounts, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param linkedStorageAccountsProperties Properties that need to be specified to update linked - * storage accounts for an Application Insights component. - * @param options The optional parameters - * @param callback The callback - */ - createAndUpdate(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccounts, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createAndUpdate(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccounts, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createAndUpdate( + resourceGroupName: string, + resourceName: string, + storageType: StorageType, + linkedStorageAccountsProperties: ComponentLinkedStorageAccounts, + options?: ComponentLinkedStorageAccountsCreateAndUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, + storageType, linkedStorageAccountsProperties, options }, - createAndUpdateOperationSpec, - callback) as Promise; + createAndUpdateOperationSpec + ); } /** * Update linked storage accounts for an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage + * account. * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked - * storage accounts for an Application Insights component. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccountsPatch, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked - * storage accounts for an Application Insights component. - * @param callback The callback - */ - update(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccountsPatch, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked - * storage accounts for an Application Insights component. - * @param options The optional parameters - * @param callback The callback + * storage accounts for an Application Insights component. + * @param options The options parameters. */ - update(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccountsPatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, resourceName: string, linkedStorageAccountsProperties: Models.ComponentLinkedStorageAccountsPatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + resourceGroupName: string, + resourceName: string, + storageType: StorageType, + linkedStorageAccountsProperties: ComponentLinkedStorageAccountsPatch, + options?: ComponentLinkedStorageAccountsUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, + storageType, linkedStorageAccountsProperties, options }, - updateOperationSpec, - callback) as Promise; + updateOperationSpec + ); } /** * Delete linked storage accounts for an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback + * @param storageType The type of the Application Insights component data source for the linked storage + * account. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + resourceName: string, + storageType: StorageType, + options?: ComponentLinkedStorageAccountsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, resourceName, storageType, options }, + deleteOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName, - Parameters.storageType - ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ComponentLinkedStorageAccounts }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponseLinkedStorage } }, - serializer -}; - -const createAndUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", + queryParameters: [Parameters.apiVersion5], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.storageType ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "linkedStorageAccountsProperties", - mapper: { - ...Mappers.ComponentLinkedStorageAccounts, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createAndUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.ComponentLinkedStorageAccounts }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponseLinkedStorage } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", + requestBody: Parameters.linkedStorageAccountsProperties, + queryParameters: [Parameters.apiVersion5], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.storageType ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "linkedStorageAccountsProperties", - mapper: { - ...Mappers.ComponentLinkedStorageAccountsPatch, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.ComponentLinkedStorageAccounts }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponseLinkedStorage } }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", + requestBody: Parameters.linkedStorageAccountsProperties1, + queryParameters: [Parameters.apiVersion5], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.storageType ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/linkedStorageAccounts/{storageType}", + httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponseLinkedStorage } }, + queryParameters: [Parameters.apiVersion5], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.storageType + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts index c94652a32949..4acb374ee67f 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts @@ -1,28 +1,30 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/componentQuotaStatusMappers"; +import { ComponentQuotaStatus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + ComponentQuotaStatusGetOptionalParams, + ComponentQuotaStatusGetResponse +} from "../models"; -/** Class representing a ComponentQuotaStatus. */ -export class ComponentQuotaStatus { - private readonly client: ApplicationInsightsManagementClientContext; +/** Class containing ComponentQuotaStatus operations. */ +export class ComponentQuotaStatusImpl implements ComponentQuotaStatus { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a ComponentQuotaStatus. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class ComponentQuotaStatus class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,58 +32,38 @@ export class ComponentQuotaStatus { * Returns daily data volume cap (quota) status for an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + options?: ComponentQuotaStatusGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + getOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/quotastatus", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/quotastatus", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentQuotaStatus - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/components.ts b/sdk/applicationinsights/arm-appinsights/src/operations/components.ts index 48c6618cbfe9..d4f18070132c 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/components.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/components.ts @@ -1,185 +1,228 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/componentsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Components } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + ApplicationInsightsComponent, + ComponentsListNextOptionalParams, + ComponentsListOptionalParams, + ComponentsListByResourceGroupNextOptionalParams, + ComponentsListByResourceGroupOptionalParams, + ComponentsListResponse, + ComponentsListByResourceGroupResponse, + ComponentsDeleteOptionalParams, + ComponentsGetOptionalParams, + ComponentsGetResponse, + ComponentsCreateOrUpdateOptionalParams, + ComponentsCreateOrUpdateResponse, + TagsResource, + ComponentsUpdateTagsOptionalParams, + ComponentsUpdateTagsResponse, + ComponentPurgeBody, + ComponentsPurgeOptionalParams, + ComponentsPurgeResponse, + ComponentsGetPurgeStatusOptionalParams, + ComponentsGetPurgeStatusResponse, + ComponentsListNextResponse, + ComponentsListByResourceGroupNextResponse +} from "../models"; -/** Class representing a Components. */ -export class Components { - private readonly client: ApplicationInsightsManagementClientContext; +/// +/** Class containing Components operations. */ +export class ComponentsImpl implements Components { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a Components. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Components class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } /** * Gets a list of all Application Insights components within a subscription. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options + public list( + options?: ComponentsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); }, - listOperationSpec, - callback) as Promise; + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: ComponentsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: ComponentsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } /** * Gets a list of Application Insights components within a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByResourceGroup( + resourceGroupName: string, + options?: ComponentsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ComponentsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( resourceGroupName, + continuationToken, options - }, - listByResourceGroupOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ComponentsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } } /** - * Deletes an Application Insights component. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * Gets a list of all Application Insights components within a subscription. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + private _list( + options?: ComponentsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + /** + * Gets a list of Application Insights components within a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + private _listByResourceGroup( + resourceGroupName: string, + options?: ComponentsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + /** + * Deletes an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + resourceName: string, + options?: ComponentsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, resourceName, options }, + deleteOperationSpec + ); } /** * Returns an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + options?: ComponentsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + getOperationSpec + ); } /** - * Creates (or updates) an Application Insights component. Note: You cannot specify a different - * value for InstrumentationKey nor AppId in the Put operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param insightProperties Properties that need to be specified to create an Application Insights - * component. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, resourceName: string, insightProperties: Models.ApplicationInsightsComponent, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param insightProperties Properties that need to be specified to create an Application Insights - * component. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, resourceName: string, insightProperties: Models.ApplicationInsightsComponent, callback: msRest.ServiceCallback): void; - /** + * Creates (or updates) an Application Insights component. Note: You cannot specify a different value + * for InstrumentationKey nor AppId in the Put operation. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param insightProperties Properties that need to be specified to create an Application Insights - * component. - * @param options The optional parameters - * @param callback The callback + * component. + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, resourceName: string, insightProperties: Models.ApplicationInsightsComponent, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, resourceName: string, insightProperties: Models.ApplicationInsightsComponent, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate( + resourceGroupName: string, + resourceName: string, + insightProperties: ApplicationInsightsComponent, + options?: ComponentsCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - insightProperties, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, insightProperties, options }, + createOrUpdateOperationSpec + ); } /** @@ -187,80 +230,43 @@ export class Components { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param componentTags Updated tag information to set into the component instance. - * @param [options] The optional parameters - * @returns Promise - */ - updateTags(resourceGroupName: string, resourceName: string, componentTags: Models.TagsResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param componentTags Updated tag information to set into the component instance. - * @param callback The callback + * @param options The options parameters. */ - updateTags(resourceGroupName: string, resourceName: string, componentTags: Models.TagsResource, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param componentTags Updated tag information to set into the component instance. - * @param options The optional parameters - * @param callback The callback - */ - updateTags(resourceGroupName: string, resourceName: string, componentTags: Models.TagsResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateTags(resourceGroupName: string, resourceName: string, componentTags: Models.TagsResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateTags( + resourceGroupName: string, + resourceName: string, + componentTags: TagsResource, + options?: ComponentsUpdateTagsOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - componentTags, - options - }, - updateTagsOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, componentTags, options }, + updateTagsOperationSpec + ); } /** * Purges data in an Application Insights component by a set of user-defined filters. * * In order to manage system resources, purge requests are throttled at 50 requests per hour. You - * should batch the execution of purge requests by sending a single command whose predicate - * includes all user identities that require purging. Use the in operator to specify multiple - * identities. You should run the query prior to using for a purge request to verify that the - * results are expected. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application - * Insights component - * @param [options] The optional parameters - * @returns Promise - */ - purge(resourceGroupName: string, resourceName: string, body: Models.ComponentPurgeBody, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application - * Insights component - * @param callback The callback - */ - purge(resourceGroupName: string, resourceName: string, body: Models.ComponentPurgeBody, callback: msRest.ServiceCallback): void; - /** + * should batch the execution of purge requests by sending a single command whose predicate includes + * all user identities that require purging. Use the in operator to specify multiple identities. You + * should run the query prior to using for a purge request to verify that the results are expected. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application - * Insights component - * @param options The optional parameters - * @param callback The callback + * Insights component + * @param options The options parameters. */ - purge(resourceGroupName: string, resourceName: string, body: Models.ComponentPurgeBody, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - purge(resourceGroupName: string, resourceName: string, body: Models.ComponentPurgeBody, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + purge( + resourceGroupName: string, + resourceName: string, + body: ComponentPurgeBody, + options?: ComponentsPurgeOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - body, - options - }, - purgeOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, body, options }, + purgeOperationSpec + ); } /** @@ -268,361 +274,270 @@ export class Components { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is - * returned. - * @param [options] The optional parameters - * @returns Promise + * returned. + * @param options The options parameters. */ - getPurgeStatus(resourceGroupName: string, resourceName: string, purgeId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is - * returned. - * @param callback The callback - */ - getPurgeStatus(resourceGroupName: string, resourceName: string, purgeId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is - * returned. - * @param options The optional parameters - * @param callback The callback - */ - getPurgeStatus(resourceGroupName: string, resourceName: string, purgeId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getPurgeStatus(resourceGroupName: string, resourceName: string, purgeId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getPurgeStatus( + resourceGroupName: string, + resourceName: string, + purgeId: string, + options?: ComponentsGetPurgeStatusOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - purgeId, - options - }, - getPurgeStatusOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, purgeId, options }, + getPurgeStatusOperationSpec + ); } /** - * Gets a list of all Application Insights components within a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + nextLink: string, + options?: ComponentsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listNextOperationSpec + ); } /** - * Gets a list of Application Insights components within a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * 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. */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ComponentsListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/components", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Insights/components", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponseComponents } }, + queryParameters: [Parameters.apiVersion4], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponseComponents } }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + queryParameters: [Parameters.apiVersion4], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.subscriptionId ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponseComponents } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + queryParameters: [Parameters.apiVersion4], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponent }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponseComponents } }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + queryParameters: [Parameters.apiVersion4], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "insightProperties", - mapper: { - ...Mappers.ApplicationInsightsComponent, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponent }, - 201: { - bodyMapper: Mappers.ApplicationInsightsComponent - }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponseComponents } }, - serializer -}; - -const updateTagsOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + requestBody: Parameters.insightProperties, + queryParameters: [Parameters.apiVersion4], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "componentTags", - mapper: { - ...Mappers.TagsResource, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateTagsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponent }, - 201: { - bodyMapper: Mappers.ApplicationInsightsComponent - }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponseComponents } }, - serializer -}; - -const purgeOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge", + requestBody: Parameters.componentTags, + queryParameters: [Parameters.apiVersion4], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.ComponentPurgeBody, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const purgeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge", + httpMethod: "POST", responses: { 202: { bodyMapper: Mappers.ComponentPurgeResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponseComponents } }, - serializer -}; - -const getPurgeStatusOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}", + requestBody: Parameters.body, + queryParameters: [Parameters.apiVersion4], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.resourceName, - Parameters.purgeId - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getPurgeStatusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ComponentPurgeStatusResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponseComponents } }, + queryParameters: [Parameters.apiVersion4], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.purgeId + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponseComponents } }, + queryParameters: [Parameters.apiVersion4], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponseComponents } }, + queryParameters: [Parameters.apiVersion4], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts index 940a447fdb0b..95c6930c80e8 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts @@ -1,28 +1,39 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/exportConfigurationsMappers"; +import { ExportConfigurations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + ExportConfigurationsListOptionalParams, + ExportConfigurationsListResponse, + ApplicationInsightsComponentExportRequest, + ExportConfigurationsCreateOptionalParams, + ExportConfigurationsCreateResponse, + ExportConfigurationsDeleteOptionalParams, + ExportConfigurationsDeleteResponse, + ExportConfigurationsGetOptionalParams, + ExportConfigurationsGetResponse, + ExportConfigurationsUpdateOptionalParams, + ExportConfigurationsUpdateResponse +} from "../models"; -/** Class representing a ExportConfigurations. */ -export class ExportConfigurations { - private readonly client: ApplicationInsightsManagementClientContext; +/** Class containing ExportConfigurations operations. */ +export class ExportConfigurationsImpl implements ExportConfigurations { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a ExportConfigurations. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class ExportConfigurations class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,32 +41,17 @@ export class ExportConfigurations { * Gets a list of Continuous Export configuration of an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + resourceGroupName: string, + resourceName: string, + options?: ExportConfigurationsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + listOperationSpec + ); } /** @@ -63,185 +59,94 @@ export class ExportConfigurations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportProperties Properties that need to be specified to create a Continuous Export - * configuration of a Application Insights component. - * @param [options] The optional parameters - * @returns Promise - */ - create(resourceGroupName: string, resourceName: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export - * configuration of a Application Insights component. - * @param callback The callback + * configuration of a Application Insights component. + * @param options The options parameters. */ - create(resourceGroupName: string, resourceName: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export - * configuration of a Application Insights component. - * @param options The optional parameters - * @param callback The callback - */ - create(resourceGroupName: string, resourceName: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, resourceName: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create( + resourceGroupName: string, + resourceName: string, + exportProperties: ApplicationInsightsComponentExportRequest, + options?: ExportConfigurationsCreateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - exportProperties, - options - }, - createOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, exportProperties, options }, + createOperationSpec + ); } /** * Delete a Continuous Export configuration of an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application - * Insights component. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, resourceName: string, exportId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application - * Insights component. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, resourceName: string, exportId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application - * Insights component. - * @param options The optional parameters - * @param callback The callback + * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights + * component. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, exportId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, exportId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + resourceName: string, + exportId: string, + options?: ExportConfigurationsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - exportId, - options - }, - deleteMethodOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, exportId, options }, + deleteOperationSpec + ); } /** * Get the Continuous Export configuration for this export id. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application - * Insights component. - * @param [options] The optional parameters - * @returns Promise + * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights + * component. + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, exportId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application - * Insights component. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, exportId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application - * Insights component. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, exportId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, exportId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + exportId: string, + options?: ExportConfigurationsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - exportId, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, exportId, options }, + getOperationSpec + ); } /** * Update the Continuous Export configuration for this export id. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application - * Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export - * configuration. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, resourceName: string, exportId: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application - * Insights component. + * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights + * component. * @param exportProperties Properties that need to be specified to update the Continuous Export - * configuration. - * @param callback The callback + * configuration. + * @param options The options parameters. */ - update(resourceGroupName: string, resourceName: string, exportId: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application - * Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export - * configuration. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, resourceName: string, exportId: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, resourceName: string, exportId: string, exportProperties: Models.ApplicationInsightsComponentExportRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + resourceGroupName: string, + resourceName: string, + exportId: string, + exportProperties: ApplicationInsightsComponentExportRequest, + options?: ExportConfigurationsUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - exportId, - exportProperties, - options - }, - updateOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, exportId, exportProperties, options }, + updateOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -252,39 +157,25 @@ const listOperationSpec: msRest.OperationSpec = { } } } - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "exportProperties", - mapper: { - ...Mappers.ApplicationInsightsComponentExportRequest, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration", + httpMethod: "POST", responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -295,95 +186,79 @@ const createOperationSpec: msRest.OperationSpec = { } } } - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}", + requestBody: Parameters.exportProperties, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.resourceName, - Parameters.exportId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}", + httpMethod: "DELETE", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentExportConfiguration - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.exportId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentExportConfiguration - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.exportId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "exportProperties", - mapper: { - ...Mappers.ApplicationInsightsComponentExportRequest, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentExportConfiguration - }, - default: { - bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.exportProperties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.exportId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts b/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts index f825ea158c5a..841d9e65a5c1 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts @@ -1,28 +1,38 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/favoritesMappers"; +import { Favorites } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + FavoritesListOptionalParams, + FavoritesListResponse, + FavoritesGetOptionalParams, + FavoritesGetResponse, + ApplicationInsightsComponentFavorite, + FavoritesAddOptionalParams, + FavoritesAddResponse, + FavoritesUpdateOptionalParams, + FavoritesUpdateResponse, + FavoritesDeleteOptionalParams +} from "../models"; -/** Class representing a Favorites. */ -export class Favorites { - private readonly client: ApplicationInsightsManagementClientContext; +/** Class containing Favorites operations. */ +export class FavoritesImpl implements Favorites { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a Favorites. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Favorites class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,32 +40,17 @@ export class Favorites { * Gets a list of favorites defined within an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, options?: Models.FavoritesListOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, options: Models.FavoritesListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, resourceName: string, options?: Models.FavoritesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + resourceGroupName: string, + resourceName: string, + options?: FavoritesListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + listOperationSpec + ); } /** @@ -63,35 +58,18 @@ export class Favorites { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, resourceName: string, favoriteId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, favoriteId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, favoriteId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, favoriteId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + favoriteId: string, + options?: FavoritesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - favoriteId, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, favoriteId, options }, + getOperationSpec + ); } /** @@ -99,32 +77,17 @@ export class Favorites { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component - * @param favoriteProperties Properties that need to be specified to create a new favorite and add - * it to an Application Insights component. - * @param [options] The optional parameters - * @returns Promise - */ - add(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component - * @param favoriteProperties Properties that need to be specified to create a new favorite and add - * it to an Application Insights component. - * @param callback The callback + * @param favoriteProperties Properties that need to be specified to create a new favorite and add it + * to an Application Insights component. + * @param options The options parameters. */ - add(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component - * @param favoriteProperties Properties that need to be specified to create a new favorite and add - * it to an Application Insights component. - * @param options The optional parameters - * @param callback The callback - */ - add(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - add(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + add( + resourceGroupName: string, + resourceName: string, + favoriteId: string, + favoriteProperties: ApplicationInsightsComponentFavorite, + options?: FavoritesAddOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -133,8 +96,8 @@ export class Favorites { favoriteProperties, options }, - addOperationSpec, - callback) as Promise; + addOperationSpec + ); } /** @@ -143,28 +106,15 @@ export class Favorites { * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @param callback The callback - */ - update(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, resourceName: string, favoriteId: string, favoriteProperties: Models.ApplicationInsightsComponentFavorite, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + resourceGroupName: string, + resourceName: string, + favoriteId: string, + favoriteProperties: ApplicationInsightsComponentFavorite, + options?: FavoritesUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -173,8 +123,8 @@ export class Favorites { favoriteProperties, options }, - updateOperationSpec, - callback) as Promise; + updateOperationSpec + ); } /** @@ -182,62 +132,30 @@ export class Favorites { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, resourceName: string, favoriteId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, resourceName: string, favoriteId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, favoriteId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, favoriteId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + resourceName: string, + favoriteId: string, + options?: FavoritesDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - favoriteId, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, resourceName, favoriteId, options }, + deleteOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion0, - Parameters.favoriteType, - Parameters.sourceType, - Parameters.canFetchContent, - Parameters.tags - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -248,126 +166,100 @@ const listOperationSpec: msRest.OperationSpec = { } } } - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", + queryParameters: [ + Parameters.apiVersion, + Parameters.favoriteType, + Parameters.sourceType, + Parameters.canFetchContent, + Parameters.tags + ], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.resourceName, - Parameters.favoriteId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentFavorite - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const addOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.favoriteId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "favoriteProperties", - mapper: { - ...Mappers.ApplicationInsightsComponentFavorite, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const addOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentFavorite - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", + requestBody: Parameters.favoriteProperties, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.favoriteId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "favoriteProperties", - mapper: { - ...Mappers.ApplicationInsightsComponentFavorite, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.ApplicationInsightsComponentFavorite - }, - default: { - bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.favoriteProperties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.favoriteId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", + responses: { 200: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.favoriteId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/index.ts b/sdk/applicationinsights/arm-appinsights/src/operations/index.ts index c3c6ae147129..d273af781cd5 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/index.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/index.ts @@ -1,14 +1,11 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./operations"; export * from "./annotations"; export * from "./aPIKeys"; export * from "./exportConfigurations"; @@ -22,8 +19,9 @@ export * from "./favorites"; export * from "./webTestLocations"; export * from "./webTests"; export * from "./analyticsItems"; -export * from "./workbooks"; +export * from "./workbookTemplates"; export * from "./myWorkbooks"; +export * from "./workbooks"; export * from "./components"; export * from "./componentLinkedStorageAccountsOperations"; export * from "./liveToken"; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/liveToken.ts b/sdk/applicationinsights/arm-appinsights/src/operations/liveToken.ts index ed95ae3dd28b..b5e5efb50c24 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/liveToken.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/liveToken.ts @@ -1,81 +1,61 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/liveTokenMappers"; +import { LiveToken } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { LiveTokenGetOptionalParams, LiveTokenGetResponse } from "../models"; -/** Class representing a LiveToken. */ -export class LiveToken { - private readonly client: ApplicationInsightsManagementClientContext; +/** Class containing LiveToken operations. */ +export class LiveTokenImpl implements LiveToken { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a LiveToken. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class LiveToken class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } /** * **Gets an access token for live metrics stream data.** * @param resourceUri The identifier of the resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceUri: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceUri The identifier of the resource. - * @param callback The callback - */ - get(resourceUri: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceUri The identifier of the resource. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceUri: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceUri: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceUri: string, + options?: LiveTokenGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceUri, - options - }, - getOperationSpec, - callback) as Promise; + { resourceUri, options }, + getOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/{resourceUri}/providers/Microsoft.Insights/generatelivetoken", httpMethod: "POST", - path: "{resourceUri}/providers/microsoft.insights/generatelivetoken", - urlParameters: [ - Parameters.resourceUri - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.LiveTokenResponse }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponseLinkedStorage } }, + queryParameters: [Parameters.apiVersion6], + urlParameters: [Parameters.$host, Parameters.resourceUri], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/myWorkbooks.ts b/sdk/applicationinsights/arm-appinsights/src/operations/myWorkbooks.ts index bbd47c344ea6..8be0ed84b893 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/myWorkbooks.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/myWorkbooks.ts @@ -1,159 +1,238 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/myWorkbooksMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { MyWorkbooks } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + MyWorkbook, + CategoryType, + MyWorkbooksListByResourceGroupNextOptionalParams, + MyWorkbooksListByResourceGroupOptionalParams, + MyWorkbooksListBySubscriptionNextOptionalParams, + MyWorkbooksListBySubscriptionOptionalParams, + MyWorkbooksListByResourceGroupResponse, + MyWorkbooksListBySubscriptionResponse, + MyWorkbooksGetOptionalParams, + MyWorkbooksGetResponse, + MyWorkbooksDeleteOptionalParams, + MyWorkbooksCreateOrUpdateOptionalParams, + MyWorkbooksCreateOrUpdateResponse, + MyWorkbooksUpdateOptionalParams, + MyWorkbooksUpdateResponse, + MyWorkbooksListByResourceGroupNextResponse, + MyWorkbooksListBySubscriptionNextResponse +} from "../models"; -/** Class representing a MyWorkbooks. */ -export class MyWorkbooks { - private readonly client: ApplicationInsightsManagementClientContext; +/// +/** Class containing MyWorkbooks operations. */ +export class MyWorkbooksImpl implements MyWorkbooks { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a MyWorkbooks. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class MyWorkbooks class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } /** * Get all private workbooks defined within a specified resource group and category. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', - * 'performance', 'retention' - * @param [options] The optional parameters - * @returns Promise + * @param category Category of workbook to return. + * @param options The options parameters. */ - listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, options?: Models.MyWorkbooksListByResourceGroupOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', - * 'performance', 'retention' - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', - * 'performance', 'retention' - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, options: Models.MyWorkbooksListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, options?: Models.MyWorkbooksListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByResourceGroup( + resourceGroupName: string, + category: CategoryType, + options?: MyWorkbooksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll( + resourceGroupName, + category, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage( + resourceGroupName, + category, + options + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + category: CategoryType, + options?: MyWorkbooksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup( + resourceGroupName, + category, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( resourceGroupName, category, + continuationToken, options - }, - listByResourceGroupOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + category: CategoryType, + options?: MyWorkbooksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + category, + options + )) { + yield* page; + } } /** * Get all private workbooks defined within a specified subscription and category. - * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', - * 'performance', 'retention' - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(category: Models.CategoryType, options?: Models.MyWorkbooksListBySubscriptionOptionalParams): Promise; - /** - * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', - * 'performance', 'retention' - * @param callback The callback - */ - listBySubscription(category: Models.CategoryType, callback: msRest.ServiceCallback): void; - /** - * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', - * 'performance', 'retention' - * @param options The optional parameters - * @param callback The callback + * @param category Category of workbook to return. + * @param options The options parameters. */ - listBySubscription(category: Models.CategoryType, options: Models.MyWorkbooksListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscription(category: Models.CategoryType, options?: Models.MyWorkbooksListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listBySubscription( + category: CategoryType, + options?: MyWorkbooksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(category, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(category, options); + } + }; + } + + private async *listBySubscriptionPagingPage( + category: CategoryType, + options?: MyWorkbooksListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(category, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext( category, + continuationToken, options - }, - listBySubscriptionOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + category: CategoryType, + options?: MyWorkbooksListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage( + category, + options + )) { + yield* page; + } } /** - * Get a single private workbook by its resourceName. + * Get all private workbooks defined within a specified resource group and category. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param category Category of workbook to return. + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + private _listByResourceGroup( + resourceGroupName: string, + category: CategoryType, + options?: MyWorkbooksListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, category, options }, + listByResourceGroupOperationSpec + ); + } + /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback + * Get all private workbooks defined within a specified subscription and category. + * @param category Category of workbook to return. + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + private _listBySubscription( + category: CategoryType, + options?: MyWorkbooksListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { category, options }, + listBySubscriptionOperationSpec + ); + } + /** + * Get a single private workbook by its resourceName. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + options?: MyWorkbooksGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + getOperationSpec + ); } /** * Delete a private workbook. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + resourceName: string, + options?: MyWorkbooksDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, resourceName, options }, + deleteOperationSpec + ); } /** @@ -161,35 +240,18 @@ export class MyWorkbooks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate( + resourceGroupName: string, + resourceName: string, + workbookProperties: MyWorkbook, + options?: MyWorkbooksCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - workbookProperties, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, workbookProperties, options }, + createOrUpdateOperationSpec + ); } /** @@ -197,56 +259,63 @@ export class MyWorkbooks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options?: msRest.RequestOptionsBase): Promise; + update( + resourceGroupName: string, + resourceName: string, + workbookProperties: MyWorkbook, + options?: MyWorkbooksUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, workbookProperties, options }, + updateOperationSpec + ); + } + /** + * ListByResourceGroupNext * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param callback The callback + * @param category Category of workbook to return. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - update(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, callback: msRest.ServiceCallback): void; + private _listByResourceGroupNext( + resourceGroupName: string, + category: CategoryType, + nextLink: string, + options?: MyWorkbooksListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, category, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param options The optional parameters - * @param callback The callback + * ListBySubscriptionNext + * @param category Category of workbook to return. + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. */ - update(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, resourceName: string, workbookProperties: Models.MyWorkbook, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscriptionNext( + category: CategoryType, + nextLink: string, + options?: MyWorkbooksListBySubscriptionNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - workbookProperties, - options - }, - updateOperationSpec, - callback) as Promise; + { category, nextLink, options }, + listBySubscriptionNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByResourceGroupOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.category, - Parameters.tags, - Parameters.canFetchContent, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.MyWorkbooksListResult @@ -255,24 +324,25 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.MyWorkbookError } }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Insights/myWorkbooks", - urlParameters: [ - Parameters.subscriptionId - ], queryParameters: [ - Parameters.category, - Parameters.tags, Parameters.canFetchContent, - Parameters.apiVersion0 + Parameters.tags, + Parameters.category, + Parameters.sourceId, + Parameters.apiVersion2 ], - headerParameters: [ - Parameters.acceptLanguage + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/myWorkbooks", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.MyWorkbooksListResult @@ -281,23 +351,20 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.MyWorkbookError } }, + queryParameters: [ + Parameters.canFetchContent, + Parameters.tags, + Parameters.category, + Parameters.apiVersion2 + ], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const getOperationSpec: msRest.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.MyWorkbook @@ -306,54 +373,41 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.MyWorkbookError } }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", + httpMethod: "DELETE", responses: { - 201: {}, + 200: {}, 204: {}, default: { bodyMapper: Mappers.MyWorkbookError } }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "workbookProperties", - mapper: { - ...Mappers.MyWorkbook, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.MyWorkbook @@ -365,37 +419,91 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.MyWorkbookError } }, + requestBody: Parameters.workbookProperties, + queryParameters: [Parameters.sourceId, Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const updateOperationSpec: msRest.OperationSpec = { +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", + responses: { + 201: { + bodyMapper: Mappers.MyWorkbook + }, + default: { + bodyMapper: Mappers.MyWorkbookError + } + }, + requestBody: Parameters.workbookProperties, + queryParameters: [Parameters.sourceId, Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.resourceName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MyWorkbooksListResult + }, + default: { + bodyMapper: Mappers.MyWorkbookError + } + }, queryParameters: [ - Parameters.apiVersion0 + Parameters.canFetchContent, + Parameters.tags, + Parameters.category, + Parameters.sourceId, + Parameters.apiVersion2 ], - headerParameters: [ - Parameters.acceptLanguage + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink ], - requestBody: { - parameterPath: "workbookProperties", - mapper: { - ...Mappers.MyWorkbook, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.MyWorkbook + bodyMapper: Mappers.MyWorkbooksListResult }, default: { bodyMapper: Mappers.MyWorkbookError } }, + queryParameters: [ + Parameters.canFetchContent, + Parameters.tags, + Parameters.category, + Parameters.apiVersion2 + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts deleted file mode 100644 index a21e656b1639..000000000000 --- a/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/operationsMappers"; -import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; - -/** Class representing a Operations. */ -export class Operations { - private readonly client: ApplicationInsightsManagementClientContext; - - /** - * Create a Operations. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. - */ - constructor(client: ApplicationInsightsManagementClientContext) { - this.client = client; - } - - /** - * Lists all of the available insights REST API operations. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * List the available operations supported by the resource provider. - * @summary List available operations. - * @param [options] The optional parameters - * @returns Promise - */ - list1(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list1(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list1(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list1(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - list1OperationSpec, - callback) as Promise; - } - - /** - * Lists all of the available insights REST API operations. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } - - /** - * List the available operations supported by the resource provider. - * @summary List available operations. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - list1Next(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - list1Next(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - list1Next(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list1Next(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - list1NextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Insights/operations", - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.OperationListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const list1OperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/microsoft.insights/operations", - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.OperationsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.OperationListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const list1NextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.OperationsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts index 79b5a581c019..513948aeb59d 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts @@ -1,28 +1,36 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/proactiveDetectionConfigurationsMappers"; +import { ProactiveDetectionConfigurations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + ProactiveDetectionConfigurationsListOptionalParams, + ProactiveDetectionConfigurationsListResponse, + ProactiveDetectionConfigurationsGetOptionalParams, + ProactiveDetectionConfigurationsGetResponse, + ApplicationInsightsComponentProactiveDetectionConfiguration, + ProactiveDetectionConfigurationsUpdateOptionalParams, + ProactiveDetectionConfigurationsUpdateResponse +} from "../models"; -/** Class representing a ProactiveDetectionConfigurations. */ -export class ProactiveDetectionConfigurations { - private readonly client: ApplicationInsightsManagementClientContext; +/** Class containing ProactiveDetectionConfigurations operations. */ +export class ProactiveDetectionConfigurationsImpl + implements ProactiveDetectionConfigurations { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a ProactiveDetectionConfigurations. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class ProactiveDetectionConfigurations class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,107 +38,56 @@ export class ProactiveDetectionConfigurations { * Gets a list of ProactiveDetection configurations of an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + resourceGroupName: string, + resourceName: string, + options?: ProactiveDetectionConfigurationsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + listOperationSpec + ); } /** * Get the ProactiveDetection configuration for this configuration id. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a - * Application Insights component. - * @param [options] The optional parameters - * @returns Promise + * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application + * Insights component. + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, configurationId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a - * Application Insights component. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, configurationId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a - * Application Insights component. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, configurationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, configurationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + resourceName: string, + configurationId: string, + options?: ProactiveDetectionConfigurationsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - configurationId, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, configurationId, options }, + getOperationSpec + ); } /** * Update the ProactiveDetection configuration for this configuration id. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a - * Application Insights component. - * @param proactiveDetectionProperties Properties that need to be specified to update the - * ProactiveDetection configuration. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, resourceName: string, configurationId: string, proactiveDetectionProperties: Models.ApplicationInsightsComponentProactiveDetectionConfiguration, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a - * Application Insights component. - * @param proactiveDetectionProperties Properties that need to be specified to update the - * ProactiveDetection configuration. - * @param callback The callback - */ - update(resourceGroupName: string, resourceName: string, configurationId: string, proactiveDetectionProperties: Models.ApplicationInsightsComponentProactiveDetectionConfiguration, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a - * Application Insights component. + * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application + * Insights component. * @param proactiveDetectionProperties Properties that need to be specified to update the - * ProactiveDetection configuration. - * @param options The optional parameters - * @param callback The callback + * ProactiveDetection configuration. + * @param options The options parameters. */ - update(resourceGroupName: string, resourceName: string, configurationId: string, proactiveDetectionProperties: Models.ApplicationInsightsComponentProactiveDetectionConfiguration, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, resourceName: string, configurationId: string, proactiveDetectionProperties: Models.ApplicationInsightsComponentProactiveDetectionConfiguration, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + resourceGroupName: string, + resourceName: string, + configurationId: string, + proactiveDetectionProperties: ApplicationInsightsComponentProactiveDetectionConfiguration, + options?: ProactiveDetectionConfigurationsUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -139,104 +96,84 @@ export class ProactiveDetectionConfigurations { proactiveDetectionProperties, options }, - updateOperationSpec, - callback) as Promise; + updateOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ApplicationInsightsComponentProactiveDetectionConfiguration" + className: + "ApplicationInsightsComponentProactiveDetectionConfiguration" } } } } - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], serializer }; - -const getOperationSpec: msRest.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}", + responses: { + 200: { + bodyMapper: + Mappers.ApplicationInsightsComponentProactiveDetectionConfiguration + } + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.configurationId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ApplicationInsightsComponentProactiveDetectionConfiguration - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: + Mappers.ApplicationInsightsComponentProactiveDetectionConfiguration } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}", + requestBody: Parameters.proactiveDetectionProperties, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.configurationId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "proactiveDetectionProperties", - mapper: { - ...Mappers.ApplicationInsightsComponentProactiveDetectionConfiguration, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.ApplicationInsightsComponentProactiveDetectionConfiguration - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts index ef40c1e72fab..8912fc13bd4e 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts @@ -1,28 +1,33 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/webTestLocationsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { WebTestLocations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + ApplicationInsightsComponentWebTestLocation, + WebTestLocationsListOptionalParams, + WebTestLocationsListResponse +} from "../models"; -/** Class representing a WebTestLocations. */ -export class WebTestLocations { - private readonly client: ApplicationInsightsManagementClientContext; +/// +/** Class containing WebTestLocations operations. */ +export class WebTestLocationsImpl implements WebTestLocations { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a WebTestLocations. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class WebTestLocations class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,58 +35,86 @@ export class WebTestLocations { * Gets a list of web test locations available to this Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + public list( + resourceGroupName: string, + resourceName: string, + options?: WebTestLocationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, resourceName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, resourceName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + options?: WebTestLocationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, resourceName, options); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + options?: WebTestLocationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + /** + * Gets a list of web test locations available to this Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + resourceGroupName: string, + resourceName: string, + options?: WebTestLocationsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + listOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/syntheticmonitorlocations", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/syntheticmonitorlocations", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ApplicationInsightsWebTestLocationsListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts b/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts index cc6634172d90..55e465b089f4 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts @@ -1,128 +1,270 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/webTestsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { WebTests } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + WebTest, + WebTestsListByResourceGroupNextOptionalParams, + WebTestsListByResourceGroupOptionalParams, + WebTestsListNextOptionalParams, + WebTestsListOptionalParams, + WebTestsListByComponentNextOptionalParams, + WebTestsListByComponentOptionalParams, + WebTestsListByResourceGroupResponse, + WebTestsGetOptionalParams, + WebTestsGetResponse, + WebTestsCreateOrUpdateOptionalParams, + WebTestsCreateOrUpdateResponse, + TagsResource, + WebTestsUpdateTagsOptionalParams, + WebTestsUpdateTagsResponse, + WebTestsDeleteOptionalParams, + WebTestsListResponse, + WebTestsListByComponentResponse, + WebTestsListByResourceGroupNextResponse, + WebTestsListNextResponse, + WebTestsListByComponentNextResponse +} from "../models"; -/** Class representing a WebTests. */ -export class WebTests { - private readonly client: ApplicationInsightsManagementClientContext; +/// +/** Class containing WebTests operations. */ +export class WebTestsImpl implements WebTests { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a WebTests. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class WebTests class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } /** * Get all Application Insights web tests defined within a specified resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByResourceGroup( + resourceGroupName: string, + options?: WebTestsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: WebTestsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( resourceGroupName, + continuationToken, options - }, - listByResourceGroupOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: WebTestsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } } /** - * Get a specific Application Insights web test definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, webTestName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param callback The callback + * Get all Application Insights web test alerts definitions within a subscription. + * @param options The options parameters. */ - get(resourceGroupName: string, webTestName: string, callback: msRest.ServiceCallback): void; + public list( + options?: WebTestsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: WebTestsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: WebTestsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + /** + * Get all Application Insights web tests defined for the specified component. + * @param componentName The name of the Application Insights component resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, webTestName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, webTestName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByComponent( + componentName: string, + resourceGroupName: string, + options?: WebTestsListByComponentOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByComponentPagingAll( + componentName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByComponentPagingPage( + componentName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByComponentPagingPage( + componentName: string, + resourceGroupName: string, + options?: WebTestsListByComponentOptionalParams + ): AsyncIterableIterator { + let result = await this._listByComponent( + componentName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByComponentNext( + componentName, resourceGroupName, - webTestName, + continuationToken, options - }, - getOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByComponentPagingAll( + componentName: string, + resourceGroupName: string, + options?: WebTestsListByComponentOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByComponentPagingPage( + componentName, + resourceGroupName, + options + )) { + yield* page; + } } /** - * Creates or updates an Application Insights web test definition. + * Get all Application Insights web tests defined within a specified resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestDefinition Properties that need to be specified to create or update an Application - * Insights web test definition. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, webTestName: string, webTestDefinition: Models.WebTest, options?: msRest.RequestOptionsBase): Promise; + private _listByResourceGroup( + resourceGroupName: string, + options?: WebTestsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + /** + * Get a specific Application Insights web test definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. - * @param webTestDefinition Properties that need to be specified to create or update an Application - * Insights web test definition. - * @param callback The callback + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, webTestName: string, webTestDefinition: Models.WebTest, callback: msRest.ServiceCallback): void; + get( + resourceGroupName: string, + webTestName: string, + options?: WebTestsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, webTestName, options }, + getOperationSpec + ); + } + /** + * Creates or updates an Application Insights web test definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application - * Insights web test definition. - * @param options The optional parameters - * @param callback The callback + * Insights web test definition. + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, webTestName: string, webTestDefinition: Models.WebTest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, webTestName: string, webTestDefinition: Models.WebTest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate( + resourceGroupName: string, + webTestName: string, + webTestDefinition: WebTest, + options?: WebTestsCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - webTestName, - webTestDefinition, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + { resourceGroupName, webTestName, webTestDefinition, options }, + createOrUpdateOperationSpec + ); } /** @@ -130,456 +272,294 @@ export class WebTests { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param webTestTags Updated tag information to set into the web test instance. - * @param [options] The optional parameters - * @returns Promise - */ - updateTags(resourceGroupName: string, webTestName: string, webTestTags: Models.TagsResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. - * @param callback The callback - */ - updateTags(resourceGroupName: string, webTestName: string, webTestTags: Models.TagsResource, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - updateTags(resourceGroupName: string, webTestName: string, webTestTags: Models.TagsResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateTags(resourceGroupName: string, webTestName: string, webTestTags: Models.TagsResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateTags( + resourceGroupName: string, + webTestName: string, + webTestTags: TagsResource, + options?: WebTestsUpdateTagsOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - webTestName, - webTestTags, - options - }, - updateTagsOperationSpec, - callback) as Promise; + { resourceGroupName, webTestName, webTestTags, options }, + updateTagsOperationSpec + ); } /** * Deletes an Application Insights web test. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, webTestName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, webTestName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, webTestName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, webTestName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + webTestName: string, + options?: WebTestsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - webTestName, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, webTestName, options }, + deleteOperationSpec + ); } /** * Get all Application Insights web test alerts definitions within a subscription. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; + private _list( + options?: WebTestsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); } /** * Get all Application Insights web tests defined for the specified component. * @param componentName The name of the Application Insights component resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param [options] The optional parameters - * @returns Promise - */ - listByComponent(componentName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param callback The callback - */ - listByComponent(componentName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listByComponent(componentName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByComponent(componentName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByComponent( + componentName: string, + resourceGroupName: string, + options?: WebTestsListByComponentOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - componentName, - resourceGroupName, - options - }, - listByComponentOperationSpec, - callback) as Promise; + { componentName, resourceGroupName, options }, + listByComponentOperationSpec + ); } /** - * Get all Application Insights web tests defined within a specified resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * 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. */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: WebTestsListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); } /** - * Get all Application Insights web test alerts definitions within a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + nextLink: string, + options?: WebTestsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listNextOperationSpec + ); } /** - * Get all Application Insights web tests defined for the specified component. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByComponentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByComponentNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByComponentNext + * @param componentName The name of the Application Insights component resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByComponent method. + * @param options The options parameters. */ - listByComponentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByComponentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByComponentNext( + componentName: string, + resourceGroupName: string, + nextLink: string, + options?: WebTestsListByComponentNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByComponentNextOperationSpec, - callback) as Promise; + { componentName, resourceGroupName, nextLink, options }, + listByComponentNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByResourceGroupOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.WebTestListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.webTestName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.subscriptionId ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.WebTest - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.webTestName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "webTestDefinition", - mapper: { - ...Mappers.WebTest, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.WebTest - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const updateTagsOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}", + requestBody: Parameters.webTestDefinition, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.webTestName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "webTestTags", - mapper: { - ...Mappers.TagsResource, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateTagsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.WebTest - }, - default: { - bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.webTestTags, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.webTestName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}", + responses: { 200: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.webTestName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const listOperationSpec: msRest.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/webtests", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Insights/webtests", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.WebTestListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listByComponentOperationSpec: msRest.OperationSpec = { +const listByComponentOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{componentName}/webtests", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{componentName}/webtests", - urlParameters: [ - Parameters.componentName, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.WebTestListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.componentName + ], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.WebTestListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.WebTestListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listByComponentNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByComponentNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.WebTestListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.componentName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts index f3d0751cbcde..2d9cf5ac145f 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts @@ -1,28 +1,43 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/workItemConfigurationsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { WorkItemConfigurations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + WorkItemConfiguration, + WorkItemConfigurationsListOptionalParams, + WorkItemConfigurationsListResponse, + WorkItemCreateConfiguration, + WorkItemConfigurationsCreateOptionalParams, + WorkItemConfigurationsCreateResponse, + WorkItemConfigurationsGetDefaultOptionalParams, + WorkItemConfigurationsGetDefaultResponse, + WorkItemConfigurationsDeleteOptionalParams, + WorkItemConfigurationsGetItemOptionalParams, + WorkItemConfigurationsGetItemResponse, + WorkItemConfigurationsUpdateItemOptionalParams, + WorkItemConfigurationsUpdateItemResponse +} from "../models"; -/** Class representing a WorkItemConfigurations. */ -export class WorkItemConfigurations { - private readonly client: ApplicationInsightsManagementClientContext; +/// +/** Class containing WorkItemConfigurations operations. */ +export class WorkItemConfigurationsImpl implements WorkItemConfigurations { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a WorkItemConfigurations. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class WorkItemConfigurations class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } @@ -30,62 +45,81 @@ export class WorkItemConfigurations { * Gets the list work item configurations that exist for the application * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + public list( + resourceGroupName: string, + resourceName: string, + options?: WorkItemConfigurationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, resourceName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, resourceName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + options?: WorkItemConfigurationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, resourceName, options); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + options?: WorkItemConfigurationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + /** + * Gets the list work item configurations that exist for the application * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + resourceGroupName: string, + resourceName: string, + options?: WorkItemConfigurationsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + listOperationSpec + ); } /** * Create a work item configuration for an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work - * item configuration of a Application Insights component. - * @param [options] The optional parameters - * @returns Promise + * @param workItemConfigurationProperties Properties that need to be specified to create a work item + * configuration of a Application Insights component. + * @param options The options parameters. */ - create(resourceGroupName: string, resourceName: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work - * item configuration of a Application Insights component. - * @param callback The callback - */ - create(resourceGroupName: string, resourceName: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work - * item configuration of a Application Insights component. - * @param options The optional parameters - * @param callback The callback - */ - create(resourceGroupName: string, resourceName: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, resourceName: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create( + resourceGroupName: string, + resourceName: string, + workItemConfigurationProperties: WorkItemCreateConfiguration, + options?: WorkItemConfigurationsCreateOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -93,154 +127,84 @@ export class WorkItemConfigurations { workItemConfigurationProperties, options }, - createOperationSpec, - callback) as Promise; + createOperationSpec + ); } /** * Gets default work item configurations that exist for the application * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - getDefault(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - getDefault(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback - */ - getDefault(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getDefault(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getDefault( + resourceGroupName: string, + resourceName: string, + options?: WorkItemConfigurationsGetDefaultOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - getDefaultOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + getDefaultOperationSpec + ); } /** * Delete a work item configuration of an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name - * of connector as defined in connector configuration - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name - * of connector as defined in connector configuration - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name - * of connector as defined in connector configuration - * @param options The optional parameters - * @param callback The callback + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of + * connector as defined in connector configuration + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + resourceName: string, + workItemConfigId: string, + options?: WorkItemConfigurationsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - workItemConfigId, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, resourceName, workItemConfigId, options }, + deleteOperationSpec + ); } /** * Gets specified work item configuration for an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name - * of connector as defined in connector configuration - * @param [options] The optional parameters - * @returns Promise + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of + * connector as defined in connector configuration + * @param options The options parameters. */ - getItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name - * of connector as defined in connector configuration - * @param callback The callback - */ - getItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name - * of connector as defined in connector configuration - * @param options The optional parameters - * @param callback The callback - */ - getItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getItem( + resourceGroupName: string, + resourceName: string, + workItemConfigId: string, + options?: WorkItemConfigurationsGetItemOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - workItemConfigId, - options - }, - getItemOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, workItemConfigId, options }, + getItemOperationSpec + ); } /** * Update a work item configuration for an Application Insights component. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name - * of connector as defined in connector configuration - * @param workItemConfigurationProperties Properties that need to be specified to update a work - * item configuration for this Application Insights component. - * @param [options] The optional parameters - * @returns Promise + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of + * connector as defined in connector configuration + * @param workItemConfigurationProperties Properties that need to be specified to update a work item + * configuration for this Application Insights component. + * @param options The options parameters. */ - updateItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name - * of connector as defined in connector configuration - * @param workItemConfigurationProperties Properties that need to be specified to update a work - * item configuration for this Application Insights component. - * @param callback The callback - */ - updateItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name - * of connector as defined in connector configuration - * @param workItemConfigurationProperties Properties that need to be specified to update a work - * item configuration for this Application Insights component. - * @param options The optional parameters - * @param callback The callback - */ - updateItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateItem(resourceGroupName: string, resourceName: string, workItemConfigId: string, workItemConfigurationProperties: Models.WorkItemCreateConfiguration, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateItem( + resourceGroupName: string, + resourceName: string, + workItemConfigId: string, + workItemConfigurationProperties: WorkItemCreateConfiguration, + options?: WorkItemConfigurationsUpdateItemOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -249,27 +213,17 @@ export class WorkItemConfigurations { workItemConfigurationProperties, options }, - updateItemOperationSpec, - callback) as Promise; + updateItemOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.resourceName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.WorkItemConfigurationsListResult @@ -278,145 +232,110 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.WorkItemConfigurationError } }, - serializer -}; - -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "workItemConfigurationProperties", - mapper: { - ...Mappers.WorkItemCreateConfiguration, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.WorkItemConfiguration - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getDefaultOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/DefaultWorkItemConfig", + requestBody: Parameters.workItemConfigurationProperties, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getDefaultOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/DefaultWorkItemConfig", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.WorkItemConfiguration - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], serializer }; - -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", + responses: { 200: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.workItemConfigId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const getItemOperationSpec: msRest.OperationSpec = { +const getItemOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", + responses: { + 200: { + bodyMapper: Mappers.WorkItemConfiguration + } + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.workItemConfigId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const updateItemOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.WorkItemConfiguration - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const updateItemOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", + requestBody: Parameters.workItemConfigurationProperties, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.resourceName, Parameters.workItemConfigId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "workItemConfigurationProperties", - mapper: { - ...Mappers.WorkItemCreateConfiguration, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.WorkItemConfiguration - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/workbookTemplates.ts b/sdk/applicationinsights/arm-appinsights/src/operations/workbookTemplates.ts new file mode 100644 index 000000000000..3fdc8f677ed2 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/workbookTemplates.ts @@ -0,0 +1,286 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { WorkbookTemplates } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + WorkbookTemplate, + WorkbookTemplatesListByResourceGroupOptionalParams, + WorkbookTemplatesListByResourceGroupResponse, + WorkbookTemplatesGetOptionalParams, + WorkbookTemplatesGetResponse, + WorkbookTemplatesDeleteOptionalParams, + WorkbookTemplatesCreateOrUpdateOptionalParams, + WorkbookTemplatesCreateOrUpdateResponse, + WorkbookTemplatesUpdateOptionalParams, + WorkbookTemplatesUpdateResponse +} from "../models"; + +/// +/** Class containing WorkbookTemplates operations. */ +export class WorkbookTemplatesImpl implements WorkbookTemplates { + private readonly client: ApplicationInsightsManagementClient; + + /** + * Initialize a new instance of the class WorkbookTemplates class. + * @param client Reference to the service client + */ + constructor(client: ApplicationInsightsManagementClient) { + this.client = client; + } + + /** + * Get all Workbook templates defined within a specified 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?: WorkbookTemplatesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: WorkbookTemplatesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: WorkbookTemplatesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get all Workbook templates defined within a specified 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?: WorkbookTemplatesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Get a single workbook template by its resourceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: WorkbookTemplatesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + getOperationSpec + ); + } + + /** + * Delete a workbook template. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + options?: WorkbookTemplatesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + deleteOperationSpec + ); + } + + /** + * Create a new workbook template. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + workbookTemplateProperties: WorkbookTemplate, + options?: WorkbookTemplatesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, workbookTemplateProperties, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Updates a workbook template that has already been added. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + resourceName: string, + options?: WorkbookTemplatesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + updateOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkbookTemplatesListResult + }, + default: { + bodyMapper: Mappers.WorkbookTemplateError + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkbookTemplate + }, + default: { + bodyMapper: Mappers.WorkbookTemplateError + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.WorkbookTemplateError + } + }, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.WorkbookTemplate + }, + 201: { + bodyMapper: Mappers.WorkbookTemplate + }, + default: { + bodyMapper: Mappers.WorkbookTemplateError + } + }, + requestBody: Parameters.workbookTemplateProperties, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooktemplates/{resourceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.WorkbookTemplate + }, + default: { + bodyMapper: Mappers.WorkbookTemplateError + } + }, + requestBody: Parameters.workbookTemplateUpdateParameters, + queryParameters: [Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts b/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts index 7d11428584ba..7848b59c2d8d 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts @@ -1,128 +1,315 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/workbooksMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Workbooks } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + Workbook, + CategoryType, + WorkbooksListBySubscriptionNextOptionalParams, + WorkbooksListBySubscriptionOptionalParams, + WorkbooksListByResourceGroupNextOptionalParams, + WorkbooksListByResourceGroupOptionalParams, + WorkbooksRevisionsListNextOptionalParams, + WorkbooksRevisionsListOptionalParams, + WorkbooksListBySubscriptionResponse, + WorkbooksListByResourceGroupResponse, + WorkbooksGetOptionalParams, + WorkbooksGetResponse, + WorkbooksDeleteOptionalParams, + WorkbooksCreateOrUpdateOptionalParams, + WorkbooksCreateOrUpdateResponse, + WorkbooksUpdateOptionalParams, + WorkbooksUpdateResponse, + WorkbooksRevisionsListResponse, + WorkbooksRevisionGetOptionalParams, + WorkbooksRevisionGetResponse, + WorkbooksListBySubscriptionNextResponse, + WorkbooksListByResourceGroupNextResponse, + WorkbooksRevisionsListNextResponse +} from "../models"; -/** Class representing a Workbooks. */ -export class Workbooks { - private readonly client: ApplicationInsightsManagementClientContext; +/// +/** Class containing Workbooks operations. */ +export class WorkbooksImpl implements Workbooks { + private readonly client: ApplicationInsightsManagementClient; /** - * Create a Workbooks. - * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Workbooks class. + * @param client Reference to the service client */ - constructor(client: ApplicationInsightsManagementClientContext) { + constructor(client: ApplicationInsightsManagementClient) { this.client = client; } /** - * Get all Workbooks defined within a specified resource group and category. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', - * 'performance', 'retention' - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, options?: Models.WorkbooksListByResourceGroupOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', - * 'performance', 'retention' - * @param callback The callback + * Get all private workbooks defined within a specified subscription and category. + * @param category Category of workbook to return. + * @param options The options parameters. */ - listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, callback: msRest.ServiceCallback): void; + public listBySubscription( + category: CategoryType, + options?: WorkbooksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(category, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(category, options); + } + }; + } + + private async *listBySubscriptionPagingPage( + category: CategoryType, + options?: WorkbooksListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(category, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext( + category, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + category: CategoryType, + options?: WorkbooksListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage( + category, + options + )) { + yield* page; + } + } + /** + * Get all Workbooks defined within a specified resource group and category. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', - * 'performance', 'retention' - * @param options The optional parameters - * @param callback The callback + * @param category Category of workbook to return. + * @param options The options parameters. */ - listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, options: Models.WorkbooksListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, options?: Models.WorkbooksListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByResourceGroup( + resourceGroupName: string, + category: CategoryType, + options?: WorkbooksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll( + resourceGroupName, + category, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage( + resourceGroupName, + category, + options + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + category: CategoryType, + options?: WorkbooksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup( + resourceGroupName, + category, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( resourceGroupName, category, + continuationToken, options - }, - listByResourceGroupOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + category: CategoryType, + options?: WorkbooksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + category, + options + )) { + yield* page; + } } /** - * Get a single workbook by its resourceName. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** + * Get the revisions for the workbook defined by its resourceName. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listRevisionsList( + resourceGroupName: string, + resourceName: string, + options?: WorkbooksRevisionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.revisionsListPagingAll( + resourceGroupName, + resourceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.revisionsListPagingPage( + resourceGroupName, + resourceName, + options + ); + } + }; + } + + private async *revisionsListPagingPage( + resourceGroupName: string, + resourceName: string, + options?: WorkbooksRevisionsListOptionalParams + ): AsyncIterableIterator { + let result = await this._revisionsList( + resourceGroupName, + resourceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._revisionsListNext( resourceGroupName, resourceName, + continuationToken, options - }, - getOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *revisionsListPagingAll( + resourceGroupName: string, + resourceName: string, + options?: WorkbooksRevisionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.revisionsListPagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } } /** - * Delete a workbook. + * Get all private workbooks defined within a specified subscription and category. + * @param category Category of workbook to return. + * @param options The options parameters. + */ + private _listBySubscription( + category: CategoryType, + options?: WorkbooksListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { category, options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Get all Workbooks defined within a specified resource group and category. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param [options] The optional parameters - * @returns Promise + * @param category Category of workbook to return. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + private _listByResourceGroup( + resourceGroupName: string, + category: CategoryType, + options?: WorkbooksListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, category, options }, + listByResourceGroupOperationSpec + ); + } + /** + * Get a single workbook by its resourceName. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + get( + resourceGroupName: string, + resourceName: string, + options?: WorkbooksGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + getOperationSpec + ); + } + /** + * Delete a workbook. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + resourceName: string, + options?: WorkbooksDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, resourceName, options }, + deleteOperationSpec + ); } /** @@ -130,92 +317,135 @@ export class Workbooks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate( + resourceGroupName: string, + resourceName: string, + workbookProperties: Workbook, + options?: WorkbooksCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, workbookProperties, options }, + createOrUpdateOperationSpec + ); + } + /** + * Updates a workbook that has already been added. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param callback The callback + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, callback: msRest.ServiceCallback): void; + update( + resourceGroupName: string, + resourceName: string, + options?: WorkbooksUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + updateOperationSpec + ); + } + /** + * Get the revisions for the workbook defined by its resourceName. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _revisionsList( + resourceGroupName: string, + resourceName: string, + options?: WorkbooksRevisionsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - workbookProperties, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, options }, + revisionsListOperationSpec + ); } /** - * Updates a workbook that has already been added. + * Get a single workbook revision defined by its revisionId. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param [options] The optional parameters - * @returns Promise + * @param revisionId The id of the workbook's revision. + * @param options The options parameters. + */ + revisionGet( + resourceGroupName: string, + resourceName: string, + revisionId: string, + options?: WorkbooksRevisionGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, revisionId, options }, + revisionGetOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param category Category of workbook to return. + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. */ - update(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, options?: msRest.RequestOptionsBase): Promise; + private _listBySubscriptionNext( + category: CategoryType, + nextLink: string, + options?: WorkbooksListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { category, nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + /** + * ListByResourceGroupNext * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param callback The callback + * @param category Category of workbook to return. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - update(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, callback: msRest.ServiceCallback): void; + private _listByResourceGroupNext( + resourceGroupName: string, + category: CategoryType, + nextLink: string, + options?: WorkbooksListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, category, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + /** + * RevisionsListNext * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param options The optional parameters - * @param callback The callback + * @param nextLink The nextLink from the previous successful call to the RevisionsList method. + * @param options The options parameters. */ - update(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _revisionsListNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: WorkbooksRevisionsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - workbookProperties, - options - }, - updateOperationSpec, - callback) as Promise; + { resourceGroupName, resourceName, nextLink, options }, + revisionsListNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByResourceGroupOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/workbooks", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.category, - Parameters.tags, - Parameters.canFetchContent, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.WorkbooksListResult @@ -224,23 +454,47 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.WorkbookError } }, + queryParameters: [ + Parameters.canFetchContent, + Parameters.tags, + Parameters.category, + Parameters.apiVersion3 + ], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const getOperationSpec: msRest.OperationSpec = { +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], + responses: { + 200: { + bodyMapper: Mappers.WorkbooksListResult + }, + default: { + bodyMapper: Mappers.WorkbookError + } + }, queryParameters: [ - Parameters.apiVersion0 + Parameters.canFetchContent, + Parameters.tags, + Parameters.category, + Parameters.sourceId, + Parameters.apiVersion3 ], - headerParameters: [ - Parameters.acceptLanguage + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Workbook @@ -249,54 +503,41 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.WorkbookError } }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}", + httpMethod: "DELETE", responses: { - 201: {}, + 200: {}, 204: {}, default: { bodyMapper: Mappers.WorkbookError } }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.resourceName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "workbookProperties", - mapper: { - ...Mappers.Workbook, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Workbook @@ -308,37 +549,158 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.WorkbookError } }, + requestBody: Parameters.workbookProperties1, + queryParameters: [Parameters.sourceId, Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const updateOperationSpec: msRest.OperationSpec = { +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}", httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", + responses: { + 201: { + bodyMapper: Mappers.Workbook + }, + default: { + bodyMapper: Mappers.WorkbookError + } + }, + requestBody: Parameters.workbookUpdateParameters, + queryParameters: [Parameters.sourceId, Parameters.apiVersion3], urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const revisionsListOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}/revisions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkbooksListResult + }, + default: { + bodyMapper: Mappers.WorkbookError + } + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.resourceName ], + headerParameters: [Parameters.accept], + serializer +}; +const revisionGetOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}/revisions/{revisionId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Workbook + }, + default: { + bodyMapper: Mappers.WorkbookError + } + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.revisionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkbooksListResult + }, + default: { + bodyMapper: Mappers.WorkbookError + } + }, queryParameters: [ - Parameters.apiVersion0 + Parameters.canFetchContent, + Parameters.tags, + Parameters.category, + Parameters.apiVersion3 ], - headerParameters: [ - Parameters.acceptLanguage + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink ], - requestBody: { - parameterPath: "workbookProperties", - mapper: { - ...Mappers.Workbook, - required: true + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkbooksListResult + }, + default: { + bodyMapper: Mappers.WorkbookError } }, + queryParameters: [ + Parameters.canFetchContent, + Parameters.tags, + Parameters.category, + Parameters.sourceId, + Parameters.apiVersion3 + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const revisionsListNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Workbook + bodyMapper: Mappers.WorkbooksListResult }, default: { bodyMapper: Mappers.WorkbookError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/aPIKeys.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/aPIKeys.ts new file mode 100644 index 000000000000..a8b25dfdecee --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/aPIKeys.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + ApplicationInsightsComponentAPIKey, + APIKeysListOptionalParams, + APIKeyRequest, + APIKeysCreateOptionalParams, + APIKeysCreateResponse, + APIKeysDeleteOptionalParams, + APIKeysDeleteResponse, + APIKeysGetOptionalParams, + APIKeysGetResponse +} from "../models"; + +/// +/** Interface representing a APIKeys. */ +export interface APIKeys { + /** + * Gets a list of API keys of an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + options?: APIKeysListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create an API Key of an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param aPIKeyProperties Properties that need to be specified to create an API key of a Application + * Insights component. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + resourceName: string, + aPIKeyProperties: APIKeyRequest, + options?: APIKeysCreateOptionalParams + ): Promise; + /** + * Delete an API Key of an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param keyId The API Key ID. This is unique within a Application Insights component. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + keyId: string, + options?: APIKeysDeleteOptionalParams + ): Promise; + /** + * Get the API Key for this key id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param keyId The API Key ID. This is unique within a Application Insights component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + keyId: string, + options?: APIKeysGetOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/analyticsItems.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/analyticsItems.ts new file mode 100644 index 000000000000..54710d4939e3 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/analyticsItems.ts @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + ItemScopePath, + AnalyticsItemsListOptionalParams, + AnalyticsItemsListResponse, + AnalyticsItemsGetOptionalParams, + AnalyticsItemsGetResponse, + ApplicationInsightsComponentAnalyticsItem, + AnalyticsItemsPutOptionalParams, + AnalyticsItemsPutResponse, + AnalyticsItemsDeleteOptionalParams +} from "../models"; + +/** Interface representing a AnalyticsItems. */ +export interface AnalyticsItems { + /** + * Gets a list of Analytics Items defined within an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared + * between all users with access to the Application Insights component. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + scopePath: ItemScopePath, + options?: AnalyticsItemsListOptionalParams + ): Promise; + /** + * Gets a specific Analytics Items defined within an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared + * between all users with access to the Application Insights component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + scopePath: ItemScopePath, + options?: AnalyticsItemsGetOptionalParams + ): Promise; + /** + * Adds or Updates a specific Analytics Item within an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared + * between all users with access to the Application Insights component. + * @param itemProperties Properties that need to be specified to create a new item and add it to an + * Application Insights component. + * @param options The options parameters. + */ + put( + resourceGroupName: string, + resourceName: string, + scopePath: ItemScopePath, + itemProperties: ApplicationInsightsComponentAnalyticsItem, + options?: AnalyticsItemsPutOptionalParams + ): Promise; + /** + * Deletes a specific Analytics Items defined within an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared + * between all users with access to the Application Insights component. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + scopePath: ItemScopePath, + options?: AnalyticsItemsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/annotations.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/annotations.ts new file mode 100644 index 000000000000..96629458740f --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/annotations.ts @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + Annotation, + AnnotationsListOptionalParams, + AnnotationsCreateOptionalParams, + AnnotationsCreateResponse, + AnnotationsDeleteOptionalParams, + AnnotationsGetOptionalParams, + AnnotationsGetResponse +} from "../models"; + +/// +/** Interface representing a Annotations. */ +export interface Annotations { + /** + * Gets the list of annotations for a component for given time range + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param start The start time to query from for annotations, cannot be older than 90 days from current + * date. + * @param end The end time to query for annotations. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + start: string, + end: string, + options?: AnnotationsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create an Annotation of an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param annotationProperties Properties that need to be specified to create an annotation of a + * Application Insights component. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + resourceName: string, + annotationProperties: Annotation, + options?: AnnotationsCreateOptionalParams + ): Promise; + /** + * Delete an Annotation of an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param annotationId The unique annotation ID. This is unique within a Application Insights + * component. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + annotationId: string, + options?: AnnotationsDeleteOptionalParams + ): Promise; + /** + * Get the annotation for given id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param annotationId The unique annotation ID. This is unique within a Application Insights + * component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + annotationId: string, + options?: AnnotationsGetOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentAvailableFeatures.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentAvailableFeatures.ts new file mode 100644 index 000000000000..d3880d894bff --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentAvailableFeatures.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + ComponentAvailableFeaturesGetOptionalParams, + ComponentAvailableFeaturesGetResponse +} from "../models"; + +/** Interface representing a ComponentAvailableFeatures. */ +export interface ComponentAvailableFeatures { + /** + * Returns all available features of the application insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: ComponentAvailableFeaturesGetOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentCurrentBillingFeatures.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentCurrentBillingFeatures.ts new file mode 100644 index 000000000000..e2a617e46a21 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentCurrentBillingFeatures.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 { + ComponentCurrentBillingFeaturesGetOptionalParams, + ComponentCurrentBillingFeaturesGetResponse, + ApplicationInsightsComponentBillingFeatures, + ComponentCurrentBillingFeaturesUpdateOptionalParams, + ComponentCurrentBillingFeaturesUpdateResponse +} from "../models"; + +/** Interface representing a ComponentCurrentBillingFeatures. */ +export interface ComponentCurrentBillingFeatures { + /** + * Returns current billing features for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: ComponentCurrentBillingFeaturesGetOptionalParams + ): Promise; + /** + * Update current billing features for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param billingFeaturesProperties Properties that need to be specified to update billing features for + * an Application Insights component. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + resourceName: string, + billingFeaturesProperties: ApplicationInsightsComponentBillingFeatures, + options?: ComponentCurrentBillingFeaturesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentFeatureCapabilities.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentFeatureCapabilities.ts new file mode 100644 index 000000000000..0ca1c39b7be6 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentFeatureCapabilities.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + ComponentFeatureCapabilitiesGetOptionalParams, + ComponentFeatureCapabilitiesGetResponse +} from "../models"; + +/** Interface representing a ComponentFeatureCapabilities. */ +export interface ComponentFeatureCapabilities { + /** + * Returns feature capabilities of the application insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: ComponentFeatureCapabilitiesGetOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentLinkedStorageAccountsOperations.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentLinkedStorageAccountsOperations.ts new file mode 100644 index 000000000000..4635a3f43fa7 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentLinkedStorageAccountsOperations.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + StorageType, + ComponentLinkedStorageAccountsGetOptionalParams, + ComponentLinkedStorageAccountsGetResponse, + ComponentLinkedStorageAccounts, + ComponentLinkedStorageAccountsCreateAndUpdateOptionalParams, + ComponentLinkedStorageAccountsCreateAndUpdateResponse, + ComponentLinkedStorageAccountsPatch, + ComponentLinkedStorageAccountsUpdateOptionalParams, + ComponentLinkedStorageAccountsUpdateResponse, + ComponentLinkedStorageAccountsDeleteOptionalParams +} from "../models"; + +/** Interface representing a ComponentLinkedStorageAccountsOperations. */ +export interface ComponentLinkedStorageAccountsOperations { + /** + * Returns the current linked storage settings for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage + * account. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + storageType: StorageType, + options?: ComponentLinkedStorageAccountsGetOptionalParams + ): Promise; + /** + * Replace current linked storage account for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage + * account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage + * accounts for an Application Insights component. + * @param options The options parameters. + */ + createAndUpdate( + resourceGroupName: string, + resourceName: string, + storageType: StorageType, + linkedStorageAccountsProperties: ComponentLinkedStorageAccounts, + options?: ComponentLinkedStorageAccountsCreateAndUpdateOptionalParams + ): Promise; + /** + * Update linked storage accounts for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage + * account. + * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked + * storage accounts for an Application Insights component. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + resourceName: string, + storageType: StorageType, + linkedStorageAccountsProperties: ComponentLinkedStorageAccountsPatch, + options?: ComponentLinkedStorageAccountsUpdateOptionalParams + ): Promise; + /** + * Delete linked storage accounts for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param storageType The type of the Application Insights component data source for the linked storage + * account. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + storageType: StorageType, + options?: ComponentLinkedStorageAccountsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentQuotaStatus.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentQuotaStatus.ts new file mode 100644 index 000000000000..0eea4b49a2b7 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/componentQuotaStatus.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + ComponentQuotaStatusGetOptionalParams, + ComponentQuotaStatusGetResponse +} from "../models"; + +/** Interface representing a ComponentQuotaStatus. */ +export interface ComponentQuotaStatus { + /** + * Returns daily data volume cap (quota) status for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: ComponentQuotaStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/components.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/components.ts new file mode 100644 index 000000000000..84fb14b12d30 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/components.ts @@ -0,0 +1,131 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + ApplicationInsightsComponent, + ComponentsListOptionalParams, + ComponentsListByResourceGroupOptionalParams, + ComponentsDeleteOptionalParams, + ComponentsGetOptionalParams, + ComponentsGetResponse, + ComponentsCreateOrUpdateOptionalParams, + ComponentsCreateOrUpdateResponse, + TagsResource, + ComponentsUpdateTagsOptionalParams, + ComponentsUpdateTagsResponse, + ComponentPurgeBody, + ComponentsPurgeOptionalParams, + ComponentsPurgeResponse, + ComponentsGetPurgeStatusOptionalParams, + ComponentsGetPurgeStatusResponse +} from "../models"; + +/// +/** Interface representing a Components. */ +export interface Components { + /** + * Gets a list of all Application Insights components within a subscription. + * @param options The options parameters. + */ + list( + options?: ComponentsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of Application Insights components within 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?: ComponentsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Deletes an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + options?: ComponentsDeleteOptionalParams + ): Promise; + /** + * Returns an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: ComponentsGetOptionalParams + ): Promise; + /** + * Creates (or updates) an Application Insights component. Note: You cannot specify a different value + * for InstrumentationKey nor AppId in the Put operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param insightProperties Properties that need to be specified to create an Application Insights + * component. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + insightProperties: ApplicationInsightsComponent, + options?: ComponentsCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param componentTags Updated tag information to set into the component instance. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + resourceName: string, + componentTags: TagsResource, + options?: ComponentsUpdateTagsOptionalParams + ): Promise; + /** + * Purges data in an Application Insights component by a set of user-defined filters. + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You + * should batch the execution of purge requests by sending a single command whose predicate includes + * all user identities that require purging. Use the in operator to specify multiple identities. You + * should run the query prior to using for a purge request to verify that the results are expected. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param body Describes the body of a request to purge data in a single table of an Application + * Insights component + * @param options The options parameters. + */ + purge( + resourceGroupName: string, + resourceName: string, + body: ComponentPurgeBody, + options?: ComponentsPurgeOptionalParams + ): Promise; + /** + * Get status for an ongoing purge operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is + * returned. + * @param options The options parameters. + */ + getPurgeStatus( + resourceGroupName: string, + resourceName: string, + purgeId: string, + options?: ComponentsGetPurgeStatusOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/exportConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/exportConfigurations.ts new file mode 100644 index 000000000000..a9a3edcf01fa --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/exportConfigurations.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + ExportConfigurationsListOptionalParams, + ExportConfigurationsListResponse, + ApplicationInsightsComponentExportRequest, + ExportConfigurationsCreateOptionalParams, + ExportConfigurationsCreateResponse, + ExportConfigurationsDeleteOptionalParams, + ExportConfigurationsDeleteResponse, + ExportConfigurationsGetOptionalParams, + ExportConfigurationsGetResponse, + ExportConfigurationsUpdateOptionalParams, + ExportConfigurationsUpdateResponse +} from "../models"; + +/** Interface representing a ExportConfigurations. */ +export interface ExportConfigurations { + /** + * Gets a list of Continuous Export configuration of an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + options?: ExportConfigurationsListOptionalParams + ): Promise; + /** + * Create a Continuous Export configuration of an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param exportProperties Properties that need to be specified to create a Continuous Export + * configuration of a Application Insights component. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + resourceName: string, + exportProperties: ApplicationInsightsComponentExportRequest, + options?: ExportConfigurationsCreateOptionalParams + ): Promise; + /** + * Delete a Continuous Export configuration of an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights + * component. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + exportId: string, + options?: ExportConfigurationsDeleteOptionalParams + ): Promise; + /** + * Get the Continuous Export configuration for this export id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights + * component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + exportId: string, + options?: ExportConfigurationsGetOptionalParams + ): Promise; + /** + * Update the Continuous Export configuration for this export id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights + * component. + * @param exportProperties Properties that need to be specified to update the Continuous Export + * configuration. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + resourceName: string, + exportId: string, + exportProperties: ApplicationInsightsComponentExportRequest, + options?: ExportConfigurationsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/favorites.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/favorites.ts new file mode 100644 index 000000000000..5ad0be7a2dd9 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/favorites.ts @@ -0,0 +1,92 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + FavoritesListOptionalParams, + FavoritesListResponse, + FavoritesGetOptionalParams, + FavoritesGetResponse, + ApplicationInsightsComponentFavorite, + FavoritesAddOptionalParams, + FavoritesAddResponse, + FavoritesUpdateOptionalParams, + FavoritesUpdateResponse, + FavoritesDeleteOptionalParams +} from "../models"; + +/** Interface representing a Favorites. */ +export interface Favorites { + /** + * Gets a list of favorites defined within an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + options?: FavoritesListOptionalParams + ): Promise; + /** + * Get a single favorite by its FavoriteId, defined within an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param favoriteId The Id of a specific favorite defined in the Application Insights component + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + favoriteId: string, + options?: FavoritesGetOptionalParams + ): Promise; + /** + * Adds a new favorites to an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param favoriteId The Id of a specific favorite defined in the Application Insights component + * @param favoriteProperties Properties that need to be specified to create a new favorite and add it + * to an Application Insights component. + * @param options The options parameters. + */ + add( + resourceGroupName: string, + resourceName: string, + favoriteId: string, + favoriteProperties: ApplicationInsightsComponentFavorite, + options?: FavoritesAddOptionalParams + ): Promise; + /** + * Updates a favorite that has already been added to an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param favoriteId The Id of a specific favorite defined in the Application Insights component + * @param favoriteProperties Properties that need to be specified to update the existing favorite. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + resourceName: string, + favoriteId: string, + favoriteProperties: ApplicationInsightsComponentFavorite, + options?: FavoritesUpdateOptionalParams + ): Promise; + /** + * Remove a favorite that is associated to an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param favoriteId The Id of a specific favorite defined in the Application Insights component + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + favoriteId: string, + options?: FavoritesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/index.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..d273af781cd5 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/index.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 "./annotations"; +export * from "./aPIKeys"; +export * from "./exportConfigurations"; +export * from "./componentCurrentBillingFeatures"; +export * from "./componentQuotaStatus"; +export * from "./componentFeatureCapabilities"; +export * from "./componentAvailableFeatures"; +export * from "./proactiveDetectionConfigurations"; +export * from "./workItemConfigurations"; +export * from "./favorites"; +export * from "./webTestLocations"; +export * from "./webTests"; +export * from "./analyticsItems"; +export * from "./workbookTemplates"; +export * from "./myWorkbooks"; +export * from "./workbooks"; +export * from "./components"; +export * from "./componentLinkedStorageAccountsOperations"; +export * from "./liveToken"; diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/liveToken.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/liveToken.ts new file mode 100644 index 000000000000..2045c08c28e8 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/liveToken.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 { LiveTokenGetOptionalParams, LiveTokenGetResponse } from "../models"; + +/** Interface representing a LiveToken. */ +export interface LiveToken { + /** + * **Gets an access token for live metrics stream data.** + * @param resourceUri The identifier of the resource. + * @param options The options parameters. + */ + get( + resourceUri: string, + options?: LiveTokenGetOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/myWorkbooks.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/myWorkbooks.ts new file mode 100644 index 000000000000..46def1df128f --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/myWorkbooks.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + MyWorkbook, + CategoryType, + MyWorkbooksListByResourceGroupOptionalParams, + MyWorkbooksListBySubscriptionOptionalParams, + MyWorkbooksGetOptionalParams, + MyWorkbooksGetResponse, + MyWorkbooksDeleteOptionalParams, + MyWorkbooksCreateOrUpdateOptionalParams, + MyWorkbooksCreateOrUpdateResponse, + MyWorkbooksUpdateOptionalParams, + MyWorkbooksUpdateResponse +} from "../models"; + +/// +/** Interface representing a MyWorkbooks. */ +export interface MyWorkbooks { + /** + * Get all private workbooks defined within a specified resource group and category. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param category Category of workbook to return. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + category: CategoryType, + options?: MyWorkbooksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get all private workbooks defined within a specified subscription and category. + * @param category Category of workbook to return. + * @param options The options parameters. + */ + listBySubscription( + category: CategoryType, + options?: MyWorkbooksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a single private workbook by its resourceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: MyWorkbooksGetOptionalParams + ): Promise; + /** + * Delete a private workbook. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + options?: MyWorkbooksDeleteOptionalParams + ): Promise; + /** + * Create a new private workbook. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookProperties Properties that need to be specified to create a new private workbook. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + workbookProperties: MyWorkbook, + options?: MyWorkbooksCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates a private workbook that has already been added. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookProperties Properties that need to be specified to create a new private workbook. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + resourceName: string, + workbookProperties: MyWorkbook, + options?: MyWorkbooksUpdateOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/proactiveDetectionConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/proactiveDetectionConfigurations.ts new file mode 100644 index 000000000000..be564904a0ff --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/proactiveDetectionConfigurations.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 { + ProactiveDetectionConfigurationsListOptionalParams, + ProactiveDetectionConfigurationsListResponse, + ProactiveDetectionConfigurationsGetOptionalParams, + ProactiveDetectionConfigurationsGetResponse, + ApplicationInsightsComponentProactiveDetectionConfiguration, + ProactiveDetectionConfigurationsUpdateOptionalParams, + ProactiveDetectionConfigurationsUpdateResponse +} from "../models"; + +/** Interface representing a ProactiveDetectionConfigurations. */ +export interface ProactiveDetectionConfigurations { + /** + * Gets a list of ProactiveDetection configurations of an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + options?: ProactiveDetectionConfigurationsListOptionalParams + ): Promise; + /** + * Get the ProactiveDetection configuration for this configuration id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application + * Insights component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + configurationId: string, + options?: ProactiveDetectionConfigurationsGetOptionalParams + ): Promise; + /** + * Update the ProactiveDetection configuration for this configuration id. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application + * Insights component. + * @param proactiveDetectionProperties Properties that need to be specified to update the + * ProactiveDetection configuration. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + resourceName: string, + configurationId: string, + proactiveDetectionProperties: ApplicationInsightsComponentProactiveDetectionConfiguration, + options?: ProactiveDetectionConfigurationsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/webTestLocations.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/webTestLocations.ts new file mode 100644 index 000000000000..6bb6a15bec02 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/webTestLocations.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 { + ApplicationInsightsComponentWebTestLocation, + WebTestLocationsListOptionalParams +} from "../models"; + +/// +/** Interface representing a WebTestLocations. */ +export interface WebTestLocations { + /** + * Gets a list of web test locations available to this Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + options?: WebTestLocationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/webTests.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/webTests.ts new file mode 100644 index 000000000000..113a8444b933 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/webTests.ts @@ -0,0 +1,104 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + WebTest, + WebTestsListByResourceGroupOptionalParams, + WebTestsListOptionalParams, + WebTestsListByComponentOptionalParams, + WebTestsGetOptionalParams, + WebTestsGetResponse, + WebTestsCreateOrUpdateOptionalParams, + WebTestsCreateOrUpdateResponse, + TagsResource, + WebTestsUpdateTagsOptionalParams, + WebTestsUpdateTagsResponse, + WebTestsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a WebTests. */ +export interface WebTests { + /** + * Get all Application Insights web tests defined within a specified resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: WebTestsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get all Application Insights web test alerts definitions within a subscription. + * @param options The options parameters. + */ + list( + options?: WebTestsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get all Application Insights web tests defined for the specified component. + * @param componentName The name of the Application Insights component resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByComponent( + componentName: string, + resourceGroupName: string, + options?: WebTestsListByComponentOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a specific Application Insights web test definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webTestName The name of the Application Insights webtest resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + webTestName: string, + options?: WebTestsGetOptionalParams + ): Promise; + /** + * Creates or updates an Application Insights web test definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webTestName The name of the Application Insights webtest resource. + * @param webTestDefinition Properties that need to be specified to create or update an Application + * Insights web test definition. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + webTestName: string, + webTestDefinition: WebTest, + options?: WebTestsCreateOrUpdateOptionalParams + ): Promise; + /** + * Creates or updates an Application Insights web test definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webTestName The name of the Application Insights webtest resource. + * @param webTestTags Updated tag information to set into the web test instance. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + webTestName: string, + webTestTags: TagsResource, + options?: WebTestsUpdateTagsOptionalParams + ): Promise; + /** + * Deletes an Application Insights web test. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webTestName The name of the Application Insights webtest resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + webTestName: string, + options?: WebTestsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/workItemConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/workItemConfigurations.ts new file mode 100644 index 000000000000..958744cb3b6e --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/workItemConfigurations.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 { + WorkItemConfiguration, + WorkItemConfigurationsListOptionalParams, + WorkItemCreateConfiguration, + WorkItemConfigurationsCreateOptionalParams, + WorkItemConfigurationsCreateResponse, + WorkItemConfigurationsGetDefaultOptionalParams, + WorkItemConfigurationsGetDefaultResponse, + WorkItemConfigurationsDeleteOptionalParams, + WorkItemConfigurationsGetItemOptionalParams, + WorkItemConfigurationsGetItemResponse, + WorkItemConfigurationsUpdateItemOptionalParams, + WorkItemConfigurationsUpdateItemResponse +} from "../models"; + +/// +/** Interface representing a WorkItemConfigurations. */ +export interface WorkItemConfigurations { + /** + * Gets the list work item configurations that exist for the application + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + options?: WorkItemConfigurationsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create a work item configuration for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigurationProperties Properties that need to be specified to create a work item + * configuration of a Application Insights component. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + resourceName: string, + workItemConfigurationProperties: WorkItemCreateConfiguration, + options?: WorkItemConfigurationsCreateOptionalParams + ): Promise; + /** + * Gets default work item configurations that exist for the application + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + getDefault( + resourceGroupName: string, + resourceName: string, + options?: WorkItemConfigurationsGetDefaultOptionalParams + ): Promise; + /** + * Delete a work item configuration of an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of + * connector as defined in connector configuration + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + workItemConfigId: string, + options?: WorkItemConfigurationsDeleteOptionalParams + ): Promise; + /** + * Gets specified work item configuration for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of + * connector as defined in connector configuration + * @param options The options parameters. + */ + getItem( + resourceGroupName: string, + resourceName: string, + workItemConfigId: string, + options?: WorkItemConfigurationsGetItemOptionalParams + ): Promise; + /** + * Update a work item configuration for an Application Insights component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of + * connector as defined in connector configuration + * @param workItemConfigurationProperties Properties that need to be specified to update a work item + * configuration for this Application Insights component. + * @param options The options parameters. + */ + updateItem( + resourceGroupName: string, + resourceName: string, + workItemConfigId: string, + workItemConfigurationProperties: WorkItemCreateConfiguration, + options?: WorkItemConfigurationsUpdateItemOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/workbookTemplates.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/workbookTemplates.ts new file mode 100644 index 000000000000..69bac6e12019 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/workbookTemplates.ts @@ -0,0 +1,80 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + WorkbookTemplate, + WorkbookTemplatesListByResourceGroupOptionalParams, + WorkbookTemplatesGetOptionalParams, + WorkbookTemplatesGetResponse, + WorkbookTemplatesDeleteOptionalParams, + WorkbookTemplatesCreateOrUpdateOptionalParams, + WorkbookTemplatesCreateOrUpdateResponse, + WorkbookTemplatesUpdateOptionalParams, + WorkbookTemplatesUpdateResponse +} from "../models"; + +/// +/** Interface representing a WorkbookTemplates. */ +export interface WorkbookTemplates { + /** + * Get all Workbook templates defined within a specified resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: WorkbookTemplatesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a single workbook template by its resourceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: WorkbookTemplatesGetOptionalParams + ): Promise; + /** + * Delete a workbook template. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + options?: WorkbookTemplatesDeleteOptionalParams + ): Promise; + /** + * Create a new workbook template. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + workbookTemplateProperties: WorkbookTemplate, + options?: WorkbookTemplatesCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates a workbook template that has already been added. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + resourceName: string, + options?: WorkbookTemplatesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/workbooks.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/workbooks.ts new file mode 100644 index 000000000000..ce7db2a1f776 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/workbooks.ts @@ -0,0 +1,120 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + Workbook, + CategoryType, + WorkbooksListBySubscriptionOptionalParams, + WorkbooksListByResourceGroupOptionalParams, + WorkbooksRevisionsListOptionalParams, + WorkbooksGetOptionalParams, + WorkbooksGetResponse, + WorkbooksDeleteOptionalParams, + WorkbooksCreateOrUpdateOptionalParams, + WorkbooksCreateOrUpdateResponse, + WorkbooksUpdateOptionalParams, + WorkbooksUpdateResponse, + WorkbooksRevisionGetOptionalParams, + WorkbooksRevisionGetResponse +} from "../models"; + +/// +/** Interface representing a Workbooks. */ +export interface Workbooks { + /** + * Get all private workbooks defined within a specified subscription and category. + * @param category Category of workbook to return. + * @param options The options parameters. + */ + listBySubscription( + category: CategoryType, + options?: WorkbooksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get all Workbooks defined within a specified resource group and category. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param category Category of workbook to return. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + category: CategoryType, + options?: WorkbooksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the revisions for the workbook defined by its resourceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + listRevisionsList( + resourceGroupName: string, + resourceName: string, + options?: WorkbooksRevisionsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a single workbook by its resourceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + options?: WorkbooksGetOptionalParams + ): Promise; + /** + * Delete a workbook. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + resourceName: string, + options?: WorkbooksDeleteOptionalParams + ): Promise; + /** + * Create a new workbook. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookProperties Properties that need to be specified to create a new workbook. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + resourceName: string, + workbookProperties: Workbook, + options?: WorkbooksCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates a workbook that has already been added. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + resourceName: string, + options?: WorkbooksUpdateOptionalParams + ): Promise; + /** + * Get a single workbook revision defined by its revisionId. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param revisionId The id of the workbook's revision. + * @param options The options parameters. + */ + revisionGet( + resourceGroupName: string, + resourceName: string, + revisionId: string, + options?: WorkbooksRevisionGetOptionalParams + ): Promise; +} diff --git a/sdk/applicationinsights/arm-appinsights/test/sampleTest.ts b/sdk/applicationinsights/arm-appinsights/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/applicationinsights/arm-appinsights/tsconfig.json b/sdk/applicationinsights/arm-appinsights/tsconfig.json index 422b584abd5e..3e6ae96443f3 100644 --- a/sdk/applicationinsights/arm-appinsights/tsconfig.json +++ b/sdk/applicationinsights/arm-appinsights/tsconfig.json @@ -3,17 +3,25 @@ "module": "es6", "moduleResolution": "node", "strict": true, - "target": "es5", + "target": "es6", "sourceMap": true, "declarationMap": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, - "outDir": "./esm", + "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/applicationinsights/ci.yml b/sdk/applicationinsights/ci.yml new file mode 100644 index 000000000000..05dbd6a7210e --- /dev/null +++ b/sdk/applicationinsights/ci.yml @@ -0,0 +1,30 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/applicationinsights/ + +pr: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/applicationinsights/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: applicationinsights + Artifacts: + - name: azure-arm-appinsights + safeName: azurearmappinsights + \ No newline at end of file