From 00875c8766d307c9674d5c7224e8c71aaad3cca7 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 23 Jul 2020 18:18:15 +0000 Subject: [PATCH] Generated from 724fba3782e819f4e22b3f816363a32180640417 Adjust "Operation" name for uniqueness. --- .../applicationInsightsManagementClient.ts | 112 +- ...licationInsightsManagementClientContext.ts | 2 - .../src/models/aPIKeysMappers.ts | 14 + .../src/models/analyticsItemsMappers.ts | 13 + .../src/models/annotationsMappers.ts | 15 + .../componentAvailableFeaturesMappers.ts | 14 + .../componentCurrentBillingFeaturesMappers.ts | 13 + .../componentFeatureCapabilitiesMappers.ts | 12 + ...tLinkedStorageAccountsOperationsMappers.ts | 29 + .../src/models/componentQuotaStatusMappers.ts | 12 + .../src/models/componentsMappers.ts | 34 + .../src/models/exportConfigurationsMappers.ts | 13 + .../src/models/favoritesMappers.ts | 12 + .../arm-appinsights/src/models/index.ts | 2969 ++++++++++++++++- .../src/models/liveTokenMappers.ts | 12 + .../arm-appinsights/src/models/mappers.ts | 2354 ++++++++++++- .../src/models/operationsMappers.ts | 4 + .../arm-appinsights/src/models/parameters.ts | 319 +- ...proactiveDetectionConfigurationsMappers.ts | 28 + .../src/models/webTestLocationsMappers.ts | 13 + .../src/models/webTestsMappers.ts | 30 + .../models/workItemConfigurationsMappers.ts | 16 + .../src/models/workbooksMappers.ts | 30 + .../arm-appinsights/src/operations/aPIKeys.ts | 282 ++ .../src/operations/analyticsItems.ts | 333 ++ .../src/operations/annotations.ts | 321 ++ .../operations/componentAvailableFeatures.ts | 87 + .../componentCurrentBillingFeatures.ts | 158 + .../componentFeatureCapabilities.ts | 87 + ...omponentLinkedStorageAccountsOperations.ts | 289 ++ .../src/operations/componentQuotaStatus.ts | 87 + .../src/operations/components.ts | 628 ++++ .../src/operations/exportConfigurations.ts | 389 +++ .../src/operations/favorites.ts | 373 +++ .../arm-appinsights/src/operations/index.ts | 17 + .../src/operations/liveToken.ts | 81 + .../src/operations/operations.ts | 113 +- .../proactiveDetectionConfigurations.ts | 242 ++ .../src/operations/webTestLocations.ts | 87 + .../src/operations/webTests.ts | 585 ++++ .../src/operations/workItemConfigurations.ts | 422 +++ .../src/operations/workbooks.ts | 344 ++ 42 files changed, 10810 insertions(+), 185 deletions(-) create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/analyticsItemsMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/annotationsMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/componentAvailableFeaturesMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/componentCurrentBillingFeaturesMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/componentFeatureCapabilitiesMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/componentLinkedStorageAccountsOperationsMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/componentQuotaStatusMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/componentsMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/exportConfigurationsMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/favoritesMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/liveTokenMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/proactiveDetectionConfigurationsMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/webTestLocationsMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/webTestsMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/workItemConfigurationsMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/models/workbooksMappers.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/aPIKeys.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/components.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/liveToken.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts create mode 100644 sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts diff --git a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts index 9714493f5a40..4df85ff6b2b4 100644 --- a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts +++ b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts @@ -11,7 +11,6 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; -import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { ApplicationInsightsManagementClientContext } from "./applicationInsightsManagementClientContext"; @@ -19,6 +18,23 @@ import { ApplicationInsightsManagementClientContext } from "./applicationInsight 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; + components: operations.Components; + componentLinkedStorageAccounts: operations.ComponentLinkedStorageAccountsOperations; + liveToken: operations.LiveToken; /** * Initializes a new instance of the ApplicationInsightsManagementClient class. @@ -29,87 +45,27 @@ class ApplicationInsightsManagementClient extends ApplicationInsightsManagementC constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApplicationInsightsManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); - } - - /** - * Returns a file test result for the matching 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 geoLocationId The location ID where the webtest was physically run. - * @param timeStamp The posix (epoch) time stamp for the webtest result. - * @param downloadAs The format to use when returning the webtest result. Possible values include: - * 'WebTestResult', 'Json' - * @param [options] The optional parameters - * @returns Promise - */ - getTestResultFile(resourceGroupName: string, webTestName: string, geoLocationId: string, timeStamp: number, downloadAs: Models.DownloadAs, options?: Models.ApplicationInsightsManagementClientGetTestResultFileOptionalParams): 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 geoLocationId The location ID where the webtest was physically run. - * @param timeStamp The posix (epoch) time stamp for the webtest result. - * @param downloadAs The format to use when returning the webtest result. Possible values include: - * 'WebTestResult', 'Json' - * @param callback The callback - */ - getTestResultFile(resourceGroupName: string, webTestName: string, geoLocationId: string, timeStamp: number, downloadAs: Models.DownloadAs, 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 geoLocationId The location ID where the webtest was physically run. - * @param timeStamp The posix (epoch) time stamp for the webtest result. - * @param downloadAs The format to use when returning the webtest result. Possible values include: - * 'WebTestResult', 'Json' - * @param options The optional parameters - * @param callback The callback - */ - getTestResultFile(resourceGroupName: string, webTestName: string, geoLocationId: string, timeStamp: number, downloadAs: Models.DownloadAs, options: Models.ApplicationInsightsManagementClientGetTestResultFileOptionalParams, callback: msRest.ServiceCallback): void; - getTestResultFile(resourceGroupName: string, webTestName: string, geoLocationId: string, timeStamp: number, downloadAs: Models.DownloadAs, options?: Models.ApplicationInsightsManagementClientGetTestResultFileOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.sendOperationRequest( - { - resourceGroupName, - webTestName, - geoLocationId, - timeStamp, - downloadAs, - options - }, - getTestResultFileOperationSpec, - callback) as Promise; + 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.components = new operations.Components(this); + this.componentLinkedStorageAccounts = new operations.ComponentLinkedStorageAccountsOperations(this); + this.liveToken = new operations.LiveToken(this); } } // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getTestResultFileOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/webtests/{webTestName}/getTestResultFile", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.webTestName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.geoLocationId, - Parameters.timeStamp, - Parameters.downloadAs, - Parameters.testSuccessfulCriteria, - Parameters.continuationToken - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.TestResultFileResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; export { ApplicationInsightsManagementClient, diff --git a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts index 3b6e6caac319..94e92c6240f9 100644 --- a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts +++ b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClientContext.ts @@ -18,7 +18,6 @@ const packageVersion = "2.1.0"; export class ApplicationInsightsManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; subscriptionId: string; - apiVersion?: string; /** * Initializes a new instance of the ApplicationInsightsManagementClient class. @@ -44,7 +43,6 @@ export class ApplicationInsightsManagementClientContext extends msRestAzure.Azur super(credentials, options); - this.apiVersion = '2020-02-10-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts new file mode 100644 index 000000000000..359b47866056 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/aPIKeysMappers.ts @@ -0,0 +1,14 @@ +/* + * 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 new file mode 100644 index 000000000000..ec4ddeb966e1 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/analyticsItemsMappers.ts @@ -0,0 +1,13 @@ +/* + * 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 new file mode 100644 index 000000000000..dd86a501f412 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/annotationsMappers.ts @@ -0,0 +1,15 @@ +/* + * 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 new file mode 100644 index 000000000000..077b32f04cad --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentAvailableFeaturesMappers.ts @@ -0,0 +1,14 @@ +/* + * 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 new file mode 100644 index 000000000000..b765b76a1921 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentCurrentBillingFeaturesMappers.ts @@ -0,0 +1,13 @@ +/* + * 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 new file mode 100644 index 000000000000..b13f2ae34a0c --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentFeatureCapabilitiesMappers.ts @@ -0,0 +1,12 @@ +/* + * 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 new file mode 100644 index 000000000000..50fbd9058403 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentLinkedStorageAccountsOperationsMappers.ts @@ -0,0 +1,29 @@ +/* + * 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, + 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 new file mode 100644 index 000000000000..6b2bc91696da --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentQuotaStatusMappers.ts @@ -0,0 +1,12 @@ +/* + * 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 new file mode 100644 index 000000000000..4e8f356c2a9e --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/componentsMappers.ts @@ -0,0 +1,34 @@ +/* + * 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, + 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 new file mode 100644 index 000000000000..a5c3232aad4e --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/exportConfigurationsMappers.ts @@ -0,0 +1,13 @@ +/* + * 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 new file mode 100644 index 000000000000..d927641eeede --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/favoritesMappers.ts @@ -0,0 +1,12 @@ +/* + * 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 1b830c5db8ea..c94f7ea86655 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/index.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/index.ts @@ -12,11 +12,12 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * Describes the format of Error response. + * 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 + * Error code. */ code?: string; /** @@ -26,109 +27,2949 @@ export interface ErrorResponse { } /** - * Test result. + * The object that represents the operation. */ -export interface TestResultFileResponse { +export interface OperationDisplay { /** - * File contents. + * Service provider: Microsoft.Cdn */ - data?: string; + 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; + /** + * The object that represents the operation. + */ + display?: OperationDisplay; +} + +/** + * Annotation associated with an application insights resource. + */ +export interface Annotation { + /** + * Name of annotation + */ + annotationName?: string; + /** + * Category of annotation, free form + */ + category?: string; + /** + * Time when event occurred + */ + eventTime?: Date; + /** + * Unique Id for annotation + */ + id?: string; + /** + * Serialized JSON object for detailed properties + */ + properties?: string; + /** + * Related parent annotation if any. Default value: 'null'. + */ + 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 + */ +export interface AnnotationError { + /** + * Error detail code and explanation + */ + code?: string; + /** + * Error message + */ + message?: string; + 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[]; +} + +/** + * 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.** + */ + 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.** + */ + readonly apiKey?: string; + /** + * The create date of this API key. + */ + createdDate?: string; + /** + * 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[]; +} + +/** + * 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; +} + +/** + * 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.** + */ + 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.** + */ + 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'. + */ + recordTypes?: string; + /** + * The name of the Application Insights component. + * **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.** + */ + 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.** + */ + readonly resourceGroup?: string; + /** + * The destination storage account subscription ID. + * **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.** + */ + readonly destinationStorageLocationId?: string; + /** + * The name of destination account. + * **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.** + */ + 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.** + */ + 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.** + */ + readonly lastUserUpdate?: string; + /** + * 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.** + */ + 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.** + */ + 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.** + */ + 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.** + */ + 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.** + */ + 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.** + */ + readonly containerName?: string; +} + +/** + * An Application Insights component daily data volume cap + */ +export interface ApplicationInsightsComponentDataVolumeCap { + /** + * 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.** + */ + readonly resetTime?: number; + /** + * Reserved, not used for now. + */ + warningThreshold?: number; + /** + * Reserved, not used for now. + */ + stopSendNotificationWhenHitThreshold?: boolean; + /** + * 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.** + */ + 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 + */ +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.** + */ + 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.** + */ + 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.** + */ + readonly expirationTime?: string; +} + +/** + * 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.** + */ + readonly supportExportData?: boolean; + /** + * Reserved, not used now. + * **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.** + */ + readonly metadataClass?: string; + /** + * Reserved, not used now. + * **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.** + */ + 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.** + */ + readonly workItemIntegration?: boolean; + /** + * Reserved, not used now. + * **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.** + */ + readonly openSchema?: boolean; + /** + * Reserved, not used now. + * **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.** + */ + 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.** + */ + readonly multipleStepWebTest?: boolean; + /** + * Reserved, not used now. + * **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.** + */ + readonly trackingType?: string; + /** + * Daily data volume cap in GB. + * **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.** + */ + readonly dailyCapResetTime?: number; + /** + * Reserved, not used now. + * **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; + /** + * The meter rate of the meter. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly meterRateFrequency?: string; +} + +/** + * 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.** + */ + 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.** + */ + 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.** + */ + readonly meterRateFrequency?: string; + /** + * Reserved, not used now. + * **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.** + */ + 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.** + */ + readonly capabilities?: ApplicationInsightsComponentFeatureCapability[]; + /** + * Display name of the feature. + * **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.** + */ + 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.** + */ + readonly supportedAddonFeatures?: string; +} + +/** + * An Application Insights component available features. + */ +export interface ApplicationInsightsComponentAvailableFeatures { + /** + * A list of Application Insights component feature. + * **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 { + /** + * 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 + */ + isEnabledByDefault?: boolean; + /** + * A flag indicating whether the rule is in preview + */ + isInPreview?: boolean; + /** + * 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 { + /** + * 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; +} + +/** + * Work item configuration associated with an application insights resource. + */ +export interface WorkItemConfiguration { + /** + * Connector identifier where work item is created + */ + connectorId?: string; + /** + * Configuration friendly name + */ + configDisplayName?: string; + /** + * Boolean value indicating whether configuration is default + */ + isDefault?: boolean; + /** + * Unique Id for work item + */ + id?: string; + /** + * Serialized JSON object for detailed properties + */ + configProperties?: string; +} + +/** + * Work item configuration creation payload + */ +export interface WorkItemCreateConfiguration { + /** + * Unique connector id + */ + connectorId?: string; + /** + * Serialized JSON object for detailed properties + */ + connectorDataConfiguration?: string; + /** + * Boolean indicating validate only + */ + validateOnly?: boolean; + /** + * 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. + */ +export interface ApplicationInsightsComponentFavorite { + /** + * 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 + */ + 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. + */ + 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.** + */ + 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' + */ + favoriteType?: FavoriteType; + /** + * 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.** + */ + readonly timeModified?: string; + /** + * 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. + */ + category?: string; + /** + * 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.** + */ + readonly userId?: string; +} + +/** + * 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.** + */ + readonly displayName?: string; + /** + * Internally defined geographic location tag. + * **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 }; +} + +/** + * 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?: string; +} + +/** + * An XML configuration specification for a WebTest. + */ +export interface WebTestPropertiesConfiguration { + /** + * 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; + /** + * 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. + */ + locations: WebTestGeolocation[]; + /** + * An XML configuration specification for a WebTest. + */ + configuration?: WebTestPropertiesConfiguration; + /** + * 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; +} + +/** + * 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; +} + +/** + * 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. + */ + id?: string; + /** + * The user-defined name of the item. + */ + name?: string; + /** + * 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.** + */ + 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' + */ + scope?: ItemScope; + /** + * Enum indicating the type of the Analytics item. Possible values include: 'query', 'function', + * 'folder', 'recent' + */ + 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.** + */ + 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.** + */ + readonly timeModified?: string; + properties?: ApplicationInsightsComponentAnalyticsItemProperties; +} + +/** + * An azure resource object + */ +export interface WorkbookResource 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 }; +} + +/** + * 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; + /** + * The user-defined name of the workbook. + */ + workbookName: string; + /** + * Configuration of this particular 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 workbook. + */ + version?: string; + /** + * Internally assigned unique id of the workbook definition. + */ + workbookId: 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'. + */ + sharedTypeKind: SharedTypeKind; + /** + * 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.** + */ + 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 workbook definition + */ + workbookTags?: string[]; + /** + * Unique user id of the specific user that owns this workbook. + */ + userId: string; + /** + * Optional resourceId for a source resource. + */ + sourceResourceId?: string; +} + +/** + * Contains a sourceId and workbook resource id to link two resources. + */ +export interface LinkProperties { + /** + * The source Azure resource id + */ + sourceId?: string; + /** + * The workbook Azure resource id + */ + targetId?: string; + /** + * The category of workbook + */ + category?: string; +} + +/** + * Error Field contract. + */ +export interface ErrorFieldContract { + /** + * Property level error code. + */ + code?: string; + /** + * Human-readable representation of property-level error. + */ + message?: string; + /** + * Property name. + */ + target?: string; +} + +/** + * 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[]; +} + +/** + * An azure resource object + */ +export interface ComponentsResource 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 }; +} + +/** + * 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 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. + */ + kind: 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.** + */ + 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.** + */ + 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'. + */ + 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'. + */ + 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.** + */ + 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.** + */ + readonly creationDate?: Date; + /** + * Azure Tenant Id. + * **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. + */ + 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.** + */ + 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.** + */ + readonly provisioningState?: string; + /** + * 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.** + */ + readonly connectionString?: string; + /** + * Retention period in days. Default value: 90. + */ + retentionInDays?: number; + /** + * Disable IP masking. + */ + disableIpMasking?: boolean; + /** + * Purge data immediately after 30 days. + */ + immediatePurgeDataOn30Days?: boolean; + /** + * List of linked private link scope resources. + * **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'. + */ + publicNetworkAccessForIngestion?: PublicNetworkAccessType; + /** + * The network access type for accessing Application Insights query. Possible values include: + * 'Enabled', 'Disabled'. Default value: 'Enabled'. + */ + publicNetworkAccessForQuery?: PublicNetworkAccessType; + /** + * Indicates the flow of the ingestion. Possible values include: 'ApplicationInsights', + * 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default value: + * 'ApplicationInsights'. + */ + ingestionMode?: IngestionMode; +} + +/** + * 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; +} + +/** + * 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[]; +} + +/** + * 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. Possible values include: 'pending', + * 'completed' + */ + status: PurgeState; +} + +/** + * An interface representing Resource. + */ +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; +} + +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { +} + +/** + * An Application Insights component linked storage accounts + */ +export interface ComponentLinkedStorageAccounts extends ProxyResource { + /** + * Linked storage account resource ID + */ + linkedStorageAccount?: string; +} + +/** + * An Application Insights component linked storage accounts patch + */ +export interface ComponentLinkedStorageAccountsPatch { + /** + * Linked storage account resource ID + */ + linkedStorageAccount?: string; +} + +/** + * The resource model definition for a ARM tracked top level resource + */ +export interface TrackedResource extends Resource { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: 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; +} + +/** + * The response to a live token query. + */ +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; +} + +/** + * 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; +} + +/** + * Represents an operation returned by the GetOperations request + */ +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; +} + +/** + * 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[]; +} + +/** + * Optional Parameters. + */ +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; +} + +/** + * 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; +} + +/** + * Optional Parameters. + */ +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; +} + +/** + * 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; +} + +/** + * Optional Parameters. + */ +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; +} + +/** + * An interface representing ApplicationInsightsManagementClientOptions. + */ +export interface ApplicationInsightsManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @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 + */ +export interface OperationListResult extends Array { + /** + * URL to get the next set of operation list results if there are any. + */ + nextLink?: 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; +} + +/** + * @interface + * Annotations list result. + * @extends Array + */ +export interface AnnotationsListResult extends Array { +} + +/** + * @interface + * Describes the list of API Keys of an Application Insights Component. + * @extends Array + */ +export interface ApplicationInsightsComponentAPIKeyListResult extends Array { +} + +/** + * @interface + * Work item configuration list result. + * @extends Array + */ +export interface WorkItemConfigurationsListResult extends Array { +} + +/** + * @interface + * Describes the list of web test locations available to an Application Insights Component. + * @extends Array + */ +export interface ApplicationInsightsWebTestLocationsListResult extends Array { +} + +/** + * @interface + * A list of 0 or more Application Insights web test definitions. + * @extends Array + */ +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; +} + +/** + * @interface + * Workbook list result. + * @extends Array + */ +export interface WorkbooksListResult extends Array { +} + +/** + * @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; +} + +/** + * Defines values for FavoriteType. + * Possible values include: 'shared', 'user' + * @readonly + * @enum {string} + */ +export type FavoriteType = 'shared' | 'user'; + +/** + * Defines values for WebTestKind. + * Possible values include: 'ping', 'multistep' + * @readonly + * @enum {string} + */ +export type WebTestKind = 'ping' | 'multistep'; + +/** + * Defines values for ItemScope. + * Possible values include: 'shared', 'user' + * @readonly + * @enum {string} + */ +export type ItemScope = 'shared' | 'user'; + +/** + * Defines values for ItemType. + * Possible values include: 'query', 'function', 'folder', 'recent' + * @readonly + * @enum {string} + */ +export type ItemType = 'query' | 'function' | 'folder' | 'recent'; + +/** + * Defines values for SharedTypeKind. + * Possible values include: 'user', 'shared' + * @readonly + * @enum {string} + */ +export type SharedTypeKind = 'user' | 'shared'; + +/** + * Defines values for ApplicationType. + * Possible values include: 'web', 'other' + * @readonly + * @enum {string} + */ +export type ApplicationType = 'web' | 'other'; + +/** + * Defines values for FlowType. + * Possible values include: 'Bluefield' + * @readonly + * @enum {string} + */ +export type FlowType = 'Bluefield'; + +/** + * Defines values for RequestSource. + * Possible values include: 'rest' + * @readonly + * @enum {string} + */ +export type RequestSource = 'rest'; + +/** + * Defines values for PublicNetworkAccessType. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccessType = 'Enabled' | 'Disabled'; + +/** + * Defines values for IngestionMode. + * Possible values include: 'ApplicationInsights', 'ApplicationInsightsWithDiagnosticSettings', + * 'LogAnalytics' + * @readonly + * @enum {string} + */ +export type IngestionMode = 'ApplicationInsights' | 'ApplicationInsightsWithDiagnosticSettings' | 'LogAnalytics'; + +/** + * Defines values for PurgeState. + * Possible values include: 'pending', 'completed' + * @readonly + * @enum {string} + */ +export type PurgeState = 'pending' | 'completed'; + +/** + * 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'; + +/** + * Defines values for ItemScopePath. + * Possible values include: 'analyticsItems', 'myanalyticsItems' + * @readonly + * @enum {string} + */ +export type ItemScopePath = 'analyticsItems' | 'myanalyticsItems'; + +/** + * Defines values for ItemTypeParameter. + * Possible values include: 'none', 'query', 'function', 'folder', 'recent' + * @readonly + * @enum {string} + */ +export type ItemTypeParameter = 'none' | 'query' | 'function' | 'folder' | 'recent'; + +/** + * Defines values for CategoryType. + * Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @readonly + * @enum {string} + */ +export type CategoryType = 'workbook' | 'TSG' | 'performance' | 'retention'; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the list1 operation. + */ +export type OperationsList1Response = OperationsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationsListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationsListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AnnotationsListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Annotation[]; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Annotation[]; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentAPIKeyListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentAPIKey; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentAPIKey; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentAPIKey; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentExportConfiguration[]; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentExportConfiguration[]; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentExportConfiguration; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentExportConfiguration; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentExportConfiguration; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentBillingFeatures; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentBillingFeatures; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentQuotaStatus; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentFeatureCapabilities; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentAvailableFeatures; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentProactiveDetectionConfiguration[]; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentProactiveDetectionConfiguration; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentProactiveDetectionConfiguration; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkItemConfigurationsListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkItemConfiguration; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkItemConfiguration; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkItemConfiguration; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkItemConfiguration; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentFavorite[]; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentFavorite; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentFavorite; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentFavorite; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsWebTestLocationsListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebTestListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebTest; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebTest; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebTest; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebTestListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebTestListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebTestListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebTestListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebTestListResult; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentAnalyticsItem[]; + }; +}; + +/** + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentAnalyticsItem; + }; +}; + +/** + * Contains response data for the put operation. + */ +export type AnalyticsItemsPutResponse = ApplicationInsightsComponentAnalyticsItem & { /** - * The URI that can be used to request the next section of the result file in the event the file - * is too large for a single request. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentAnalyticsItem; + }; +}; /** - * Information about an operation + * Contains response data for the listByResourceGroup operation. */ -export interface OperationInfo { +export type WorkbooksListByResourceGroupResponse = WorkbooksListResult & { /** - * Name of the provider + * The underlying HTTP response. */ - provider?: string; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkbooksListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type WorkbooksGetResponse = Workbook & { /** - * Name of the resource type + * The underlying HTTP response. */ - resource?: string; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workbook; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type WorkbooksCreateOrUpdateResponse = Workbook & { /** - * Name of the operation + * The underlying HTTP response. */ - operation?: string; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workbook; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type WorkbooksUpdateResponse = Workbook & { /** - * Description of the operation + * The underlying HTTP response. */ - description?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workbook; + }; +}; /** - * Represents an operation returned by the GetOperations request + * Contains response data for the list operation. */ -export interface Operation { +export type ComponentsListResponse = ApplicationInsightsComponentListResult & { /** - * Name of the operation + * The underlying HTTP response. */ - name?: string; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ComponentsListByResourceGroupResponse = ApplicationInsightsComponentListResult & { /** - * Display name of the operation + * The underlying HTTP response. */ - display?: OperationInfo; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ComponentsGetResponse = ApplicationInsightsComponent & { /** - * Origin of the operation + * The underlying HTTP response. */ - origin?: string; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponent; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ComponentsCreateOrUpdateResponse = ApplicationInsightsComponent & { /** - * Properties of the operation + * The underlying HTTP response. */ - properties?: any; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponent; + }; +}; /** - * Optional Parameters. + * Contains response data for the updateTags operation. */ -export interface ApplicationInsightsManagementClientGetTestResultFileOptionalParams extends msRest.RequestOptionsBase { +export type ComponentsUpdateTagsResponse = ApplicationInsightsComponent & { /** - * The success state criteria for the webtest result. + * The underlying HTTP response. */ - testSuccessfulCriteria?: boolean; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponent; + }; +}; + +/** + * Contains response data for the purge operation. + */ +export type ComponentsPurgeResponse = ComponentPurgeResponse & { /** - * The continuation token. + * The underlying HTTP response. */ - continuationToken?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ComponentPurgeResponse; + }; +}; /** - * An interface representing ApplicationInsightsManagementClientOptions. + * Contains response data for the getPurgeStatus operation. */ -export interface ApplicationInsightsManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; -} +export type ComponentsGetPurgeStatusResponse = ComponentPurgeStatusResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ComponentPurgeStatusResponse; + }; +}; /** - * @interface - * Result of the List Operations operation - * @extends Array + * Contains response data for the listNext operation. */ -export interface OperationsListResult extends Array { +export type ComponentsListNextResponse = ApplicationInsightsComponentListResult & { /** - * URL to get the next set of operation list results if there are any. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentListResult; + }; +}; /** - * Defines values for DownloadAs. - * Possible values include: 'WebTestResult', 'Json' - * @readonly - * @enum {string} + * 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; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ApplicationInsightsComponentListResult; + }; +}; + +/** + * Contains response data for the get operation. */ -export type DownloadAs = 'WebTestResult' | 'Json'; +export type ComponentLinkedStorageAccountsGetResponse = ComponentLinkedStorageAccounts & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ComponentLinkedStorageAccounts; + }; +}; /** - * Contains response data for the list operation. + * Contains response data for the createAndUpdate operation. */ -export type OperationsListResponse = OperationsListResult & { +export type ComponentLinkedStorageAccountsCreateAndUpdateResponse = ComponentLinkedStorageAccounts & { /** * The underlying HTTP response. */ @@ -141,14 +2982,14 @@ export type OperationsListResponse = OperationsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationsListResult; + parsedBody: ComponentLinkedStorageAccounts; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the update operation. */ -export type OperationsListNextResponse = OperationsListResult & { +export type ComponentLinkedStorageAccountsUpdateResponse = ComponentLinkedStorageAccounts & { /** * The underlying HTTP response. */ @@ -161,14 +3002,14 @@ export type OperationsListNextResponse = OperationsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationsListResult; + parsedBody: ComponentLinkedStorageAccounts; }; }; /** - * Contains response data for the getTestResultFile operation. + * Contains response data for the get operation. */ -export type GetTestResultFileResponse = TestResultFileResponse & { +export type LiveTokenGetResponse = LiveTokenResponse & { /** * The underlying HTTP response. */ @@ -181,6 +3022,6 @@ export type GetTestResultFileResponse = TestResultFileResponse & { /** * The response body as parsed JSON or XML */ - parsedBody: TestResultFileResponse; + parsedBody: LiveTokenResponse; }; }; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/liveTokenMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/liveTokenMappers.ts new file mode 100644 index 000000000000..be3acaac607d --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/liveTokenMappers.ts @@ -0,0 +1,12 @@ +/* + * 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 0961341b46b2..d5e327c8b0c8 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/mappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/mappers.ts @@ -34,20 +34,2151 @@ export const ErrorResponse: msRest.CompositeMapper = { } }; -export const TestResultFileResponse: msRest.CompositeMapper = { - serializedName: "TestResultFileResponse", +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", type: { name: "Composite", - className: "TestResultFileResponse", + className: "OperationDisplay", modelProperties: { - data: { - serializedName: "data", + 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", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const Annotation: msRest.CompositeMapper = { + serializedName: "Annotation", + type: { + name: "Composite", + className: "Annotation", + modelProperties: { + annotationName: { + serializedName: "AnnotationName", + type: { + name: "String" + } + }, + category: { + serializedName: "Category", + type: { + name: "String" + } + }, + eventTime: { + serializedName: "EventTime", + type: { + name: "DateTime" + } + }, + id: { + serializedName: "Id", + type: { + name: "String" + } + }, + properties: { + serializedName: "Properties", + type: { + name: "String" + } + }, + relatedAnnotation: { + 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", + type: { + name: "Composite", + className: "AnnotationError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + innererror: { + serializedName: "innererror", + type: { + name: "Composite", + className: "InnerError" + } + } + } + } +}; + +export const APIKeyRequest: msRest.CompositeMapper = { + serializedName: "APIKeyRequest", + type: { + name: "Composite", + className: "APIKeyRequest", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + linkedReadProperties: { + serializedName: "linkedReadProperties", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + linkedWriteProperties: { + serializedName: "linkedWriteProperties", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ApplicationInsightsComponentAPIKey: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentAPIKey", + type: { + name: "Composite", + className: "ApplicationInsightsComponentAPIKey", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + apiKey: { + readOnly: true, + serializedName: "apiKey", + type: { + name: "String" + } + }, + createdDate: { + serializedName: "createdDate", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + linkedReadProperties: { + serializedName: "linkedReadProperties", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + linkedWriteProperties: { + serializedName: "linkedWriteProperties", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ApplicationInsightsComponentExportRequest: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentExportRequest", + type: { + name: "Composite", + className: "ApplicationInsightsComponentExportRequest", + 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", + type: { + name: "String" + } + }, + destinationStorageLocationId: { + serializedName: "DestinationStorageLocationId", + type: { + name: "String" + } + }, + destinationAccountId: { + serializedName: "DestinationAccountId", + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationInsightsComponentExportConfiguration: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentExportConfiguration", + type: { + name: "Composite", + className: "ApplicationInsightsComponentExportConfiguration", + modelProperties: { + exportId: { + readOnly: true, + serializedName: "ExportId", + type: { + name: "String" + } + }, + instrumentationKey: { + readOnly: true, + serializedName: "InstrumentationKey", + type: { + name: "String" + } + }, + recordTypes: { + serializedName: "RecordTypes", + type: { + name: "String" + } + }, + applicationName: { + readOnly: true, + serializedName: "ApplicationName", + type: { + name: "String" + } + }, + subscriptionId: { + readOnly: true, + serializedName: "SubscriptionId", + type: { + name: "String" + } + }, + resourceGroup: { + readOnly: true, + serializedName: "ResourceGroup", + type: { + name: "String" + } + }, + destinationStorageSubscriptionId: { + readOnly: true, + serializedName: "DestinationStorageSubscriptionId", + type: { + name: "String" + } + }, + destinationStorageLocationId: { + readOnly: true, + serializedName: "DestinationStorageLocationId", + type: { + name: "String" + } + }, + destinationAccountId: { + readOnly: true, + serializedName: "DestinationAccountId", + type: { + name: "String" + } + }, + destinationType: { + readOnly: true, + serializedName: "DestinationType", + type: { + name: "String" + } + }, + isUserEnabled: { + readOnly: true, + serializedName: "IsUserEnabled", + type: { + name: "String" + } + }, + lastUserUpdate: { + readOnly: true, + serializedName: "LastUserUpdate", + type: { + name: "String" + } + }, + notificationQueueEnabled: { + serializedName: "NotificationQueueEnabled", + type: { + name: "String" + } + }, + exportStatus: { + readOnly: true, + serializedName: "ExportStatus", + type: { + name: "String" + } + }, + lastSuccessTime: { + readOnly: true, + serializedName: "LastSuccessTime", + type: { + name: "String" + } + }, + lastGapTime: { + readOnly: true, + serializedName: "LastGapTime", + type: { + name: "String" + } + }, + permanentErrorReason: { + readOnly: true, + serializedName: "PermanentErrorReason", + type: { + name: "String" + } + }, + storageName: { + readOnly: true, + serializedName: "StorageName", + type: { + name: "String" + } + }, + containerName: { + readOnly: true, + serializedName: "ContainerName", + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationInsightsComponentDataVolumeCap: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentDataVolumeCap", + type: { + name: "Composite", + className: "ApplicationInsightsComponentDataVolumeCap", + modelProperties: { + cap: { + serializedName: "Cap", + type: { + name: "Number" + } + }, + resetTime: { + readOnly: true, + serializedName: "ResetTime", + type: { + name: "Number" + } + }, + warningThreshold: { + serializedName: "WarningThreshold", + type: { + name: "Number" + } + }, + stopSendNotificationWhenHitThreshold: { + serializedName: "StopSendNotificationWhenHitThreshold", + type: { + name: "Boolean" + } + }, + stopSendNotificationWhenHitCap: { + serializedName: "StopSendNotificationWhenHitCap", + type: { + name: "Boolean" + } + }, + maxHistoryCap: { + readOnly: true, + serializedName: "MaxHistoryCap", + type: { + name: "Number" + } + } + } + } +}; + +export const ApplicationInsightsComponentBillingFeatures: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentBillingFeatures", + type: { + name: "Composite", + className: "ApplicationInsightsComponentBillingFeatures", + modelProperties: { + dataVolumeCap: { + serializedName: "DataVolumeCap", + type: { + name: "Composite", + className: "ApplicationInsightsComponentDataVolumeCap" + } + }, + currentBillingFeatures: { + serializedName: "CurrentBillingFeatures", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ApplicationInsightsComponentQuotaStatus: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentQuotaStatus", + type: { + name: "Composite", + className: "ApplicationInsightsComponentQuotaStatus", + modelProperties: { + appId: { + readOnly: true, + serializedName: "AppId", + type: { + name: "String" + } + }, + shouldBeThrottled: { + readOnly: true, + serializedName: "ShouldBeThrottled", + type: { + name: "Boolean" + } + }, + expirationTime: { + readOnly: true, + serializedName: "ExpirationTime", + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationInsightsComponentFeatureCapabilities: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentFeatureCapabilities", + type: { + name: "Composite", + className: "ApplicationInsightsComponentFeatureCapabilities", + modelProperties: { + supportExportData: { + readOnly: true, + serializedName: "SupportExportData", + type: { + name: "Boolean" + } + }, + burstThrottlePolicy: { + readOnly: true, + serializedName: "BurstThrottlePolicy", + type: { + name: "String" + } + }, + metadataClass: { + readOnly: true, + serializedName: "MetadataClass", + type: { + name: "String" + } + }, + liveStreamMetrics: { + readOnly: true, + serializedName: "LiveStreamMetrics", + type: { + name: "Boolean" + } + }, + applicationMap: { + readOnly: true, + serializedName: "ApplicationMap", + type: { + name: "Boolean" + } + }, + workItemIntegration: { + readOnly: true, + serializedName: "WorkItemIntegration", + type: { + name: "Boolean" + } + }, + powerBIIntegration: { + readOnly: true, + serializedName: "PowerBIIntegration", + type: { + name: "Boolean" + } + }, + openSchema: { + readOnly: true, + serializedName: "OpenSchema", + type: { + name: "Boolean" + } + }, + proactiveDetection: { + readOnly: true, + serializedName: "ProactiveDetection", + type: { + name: "Boolean" + } + }, + analyticsIntegration: { + readOnly: true, + serializedName: "AnalyticsIntegration", + type: { + name: "Boolean" + } + }, + multipleStepWebTest: { + readOnly: true, + serializedName: "MultipleStepWebTest", + type: { + name: "Boolean" + } + }, + apiAccessLevel: { + readOnly: true, + serializedName: "ApiAccessLevel", + type: { + name: "String" + } + }, + trackingType: { + readOnly: true, + serializedName: "TrackingType", + type: { + name: "String" + } + }, + dailyCap: { + readOnly: true, + serializedName: "DailyCap", + type: { + name: "Number" + } + }, + dailyCapResetTime: { + readOnly: true, + serializedName: "DailyCapResetTime", + type: { + name: "Number" + } + }, + throttleRate: { + readOnly: true, + serializedName: "ThrottleRate", + type: { + name: "Number" + } + } + } + } +}; + +export const ApplicationInsightsComponentFeatureCapability: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentFeatureCapability", + type: { + name: "Composite", + className: "ApplicationInsightsComponentFeatureCapability", + 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: { + readOnly: true, + serializedName: "MeterRateFrequency", + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationInsightsComponentFeature: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentFeature", + type: { + name: "Composite", + className: "ApplicationInsightsComponentFeature", + modelProperties: { + featureName: { + readOnly: true, + serializedName: "FeatureName", + type: { + name: "String" + } + }, + meterId: { + readOnly: true, + serializedName: "MeterId", + type: { + name: "String" + } + }, + meterRateFrequency: { + readOnly: true, + serializedName: "MeterRateFrequency", + type: { + name: "String" + } + }, + resouceId: { + readOnly: true, + serializedName: "ResouceId", + type: { + name: "String" + } + }, + isHidden: { + readOnly: true, + serializedName: "IsHidden", + type: { + name: "Boolean" + } + }, + capabilities: { + readOnly: true, + serializedName: "Capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationInsightsComponentFeatureCapability" + } + } + } + }, + title: { + readOnly: true, + serializedName: "Title", + type: { + name: "String" + } + }, + isMainFeature: { + readOnly: true, + serializedName: "IsMainFeature", + 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" + } + } + } + } + } + } +}; + +export const ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentProactiveDetectionConfiguration_RuleDefinitions", + type: { + name: "Composite", + className: "ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions", + modelProperties: { + name: { + serializedName: "Name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "DisplayName", + type: { + name: "String" + } + }, + description: { + serializedName: "Description", + type: { + name: "String" + } + }, + helpUrl: { + serializedName: "HelpUrl", + type: { + name: "String" + } + }, + isHidden: { + serializedName: "IsHidden", + type: { + name: "Boolean" + } + }, + isEnabledByDefault: { + serializedName: "IsEnabledByDefault", + type: { + name: "Boolean" + } + }, + isInPreview: { + serializedName: "IsInPreview", + type: { + name: "Boolean" + } + }, + supportsEmailNotifications: { + serializedName: "SupportsEmailNotifications", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ApplicationInsightsComponentProactiveDetectionConfiguration: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentProactiveDetectionConfiguration", + type: { + name: "Composite", + className: "ApplicationInsightsComponentProactiveDetectionConfiguration", + modelProperties: { + name: { + serializedName: "Name", + type: { + name: "String" + } + }, + enabled: { + serializedName: "Enabled", + type: { + name: "Boolean" + } + }, + sendEmailsToSubscriptionOwners: { + serializedName: "SendEmailsToSubscriptionOwners", + type: { + name: "Boolean" + } + }, + customEmails: { + serializedName: "CustomEmails", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + lastUpdatedTime: { + serializedName: "LastUpdatedTime", + type: { + name: "String" + } + }, + ruleDefinitions: { + serializedName: "RuleDefinitions", + type: { + name: "Composite", + className: "ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions" + } + } + } + } +}; + +export const WorkItemConfiguration: msRest.CompositeMapper = { + serializedName: "WorkItemConfiguration", + type: { + name: "Composite", + className: "WorkItemConfiguration", + modelProperties: { + connectorId: { + serializedName: "ConnectorId", + type: { + name: "String" + } + }, + configDisplayName: { + serializedName: "ConfigDisplayName", + type: { + name: "String" + } + }, + isDefault: { + serializedName: "IsDefault", + type: { + name: "Boolean" + } + }, + id: { + serializedName: "Id", + type: { + name: "String" + } + }, + configProperties: { + serializedName: "ConfigProperties", + type: { + name: "String" + } + } + } + } +}; + +export const WorkItemCreateConfiguration: msRest.CompositeMapper = { + serializedName: "WorkItemCreateConfiguration", + 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 WorkItemConfigurationError: msRest.CompositeMapper = { + serializedName: "WorkItemConfigurationError", + type: { + name: "Composite", + className: "WorkItemConfigurationError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + innererror: { + serializedName: "innererror", + type: { + name: "Composite", + className: "InnerError" + } + } + } + } +}; + +export const ApplicationInsightsComponentFavorite: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentFavorite", + type: { + name: "Composite", + className: "ApplicationInsightsComponentFavorite", + modelProperties: { + name: { + serializedName: "Name", + type: { + name: "String" + } + }, + config: { + serializedName: "Config", + type: { + name: "String" + } + }, + version: { + serializedName: "Version", + type: { + name: "String" + } + }, + favoriteId: { + readOnly: true, + serializedName: "FavoriteId", + type: { + name: "String" + } + }, + favoriteType: { + serializedName: "FavoriteType", + type: { + name: "Enum", + allowedValues: [ + "shared", + "user" + ] + } + }, + sourceType: { + serializedName: "SourceType", + type: { + name: "String" + } + }, + timeModified: { + readOnly: true, + serializedName: "TimeModified", + type: { + name: "String" + } + }, + tags: { + serializedName: "Tags", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + category: { + serializedName: "Category", + type: { + name: "String" + } + }, + isGeneratedFromTemplate: { + serializedName: "IsGeneratedFromTemplate", + type: { + name: "Boolean" + } + }, + userId: { + readOnly: true, + serializedName: "UserId", + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationInsightsComponentWebTestLocation: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentWebTestLocation", + type: { + name: "Composite", + className: "ApplicationInsightsComponentWebTestLocation", + modelProperties: { + displayName: { + readOnly: true, + serializedName: "DisplayName", + type: { + name: "String" + } + }, + tag: { + readOnly: true, + serializedName: "Tag", + type: { + name: "String" + } + } + } + } +}; + +export const WebtestsResource: msRest.CompositeMapper = { + serializedName: "WebtestsResource", + type: { + name: "Composite", + className: "WebtestsResource", + 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: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TagsResource: msRest.CompositeMapper = { + serializedName: "TagsResource", + type: { + name: "Composite", + className: "TagsResource", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const WebTestGeolocation: msRest.CompositeMapper = { + serializedName: "WebTestGeolocation", + type: { + name: "Composite", + className: "WebTestGeolocation", + modelProperties: { + location: { + serializedName: "Id", + type: { + name: "String" + } + } + } + } +}; + +export const WebTestPropertiesConfiguration: msRest.CompositeMapper = { + serializedName: "WebTestProperties_Configuration", + type: { + name: "Composite", + className: "WebTestPropertiesConfiguration", + modelProperties: { + webTest: { + serializedName: "WebTest", + type: { + name: "String" + } + } + } + } +}; + +export const WebTest: msRest.CompositeMapper = { + serializedName: "WebTest", + type: { + name: "Composite", + className: "WebTest", + modelProperties: { + ...WebtestsResource.type.modelProperties, + kind: { + serializedName: "kind", + defaultValue: 'ping', + type: { + name: "Enum", + allowedValues: [ + "ping", + "multistep" + ] + } + }, + syntheticMonitorId: { + required: true, + serializedName: "properties.SyntheticMonitorId", + type: { + name: "String" + } + }, + webTestName: { + required: true, + serializedName: "properties.Name", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.Description", + type: { + name: "String" + } + }, + enabled: { + serializedName: "properties.Enabled", + type: { + name: "Boolean" + } + }, + frequency: { + serializedName: "properties.Frequency", + defaultValue: 300, + type: { + name: "Number" + } + }, + timeout: { + serializedName: "properties.Timeout", + defaultValue: 30, + 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" + } + } + } + } +}; + +export const ApplicationInsightsComponentAnalyticsItem: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentAnalyticsItem", + type: { + name: "Composite", + className: "ApplicationInsightsComponentAnalyticsItem", + modelProperties: { + id: { + serializedName: "Id", + type: { + name: "String" + } + }, + name: { + serializedName: "Name", + type: { + name: "String" + } + }, + content: { + serializedName: "Content", + type: { + name: "String" + } + }, + version: { + readOnly: true, + serializedName: "Version", + type: { + name: "String" + } + }, + scope: { + serializedName: "Scope", + type: { + name: "String" + } + }, + type: { + serializedName: "Type", + type: { + name: "String" + } + }, + timeCreated: { + readOnly: true, + serializedName: "TimeCreated", + type: { + name: "String" + } + }, + timeModified: { + readOnly: true, + serializedName: "TimeModified", + type: { + name: "String" + } + }, + properties: { + serializedName: "Properties", + type: { + name: "Composite", + className: "ApplicationInsightsComponentAnalyticsItemProperties" + } + } + } + } +}; + +export const WorkbookResource: msRest.CompositeMapper = { + serializedName: "WorkbookResource", + type: { + name: "Composite", + className: "WorkbookResource", + 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", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Workbook: msRest.CompositeMapper = { + serializedName: "Workbook", + type: { + name: "Composite", + className: "Workbook", + modelProperties: { + ...WorkbookResource.type.modelProperties, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + workbookName: { + required: true, + serializedName: "properties.name", + type: { + name: "String" + } + }, + serializedData: { + required: true, + serializedName: "properties.serializedData", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + workbookId: { + required: true, + serializedName: "properties.workbookId", + type: { + name: "String" + } + }, + sharedTypeKind: { + required: true, + serializedName: "properties.kind", + defaultValue: 'shared', + type: { + name: "String" + } + }, + timeModified: { + readOnly: true, + serializedName: "properties.timeModified", + type: { + name: "String" + } + }, + category: { + required: true, + serializedName: "properties.category", + type: { + name: "String" + } + }, + workbookTags: { + serializedName: "properties.tags", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + userId: { + required: true, + serializedName: "properties.userId", + type: { + name: "String" + } + }, + sourceResourceId: { + serializedName: "properties.sourceResourceId", + type: { + name: "String" + } + } + } + } +}; + +export const LinkProperties: msRest.CompositeMapper = { + serializedName: "LinkProperties", + type: { + name: "Composite", + className: "LinkProperties", + modelProperties: { + sourceId: { + serializedName: "sourceId", + type: { + name: "String" + } + }, + targetId: { + serializedName: "targetId", + type: { + name: "String" + } + }, + category: { + serializedName: "category", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorFieldContract: msRest.CompositeMapper = { + serializedName: "ErrorFieldContract", + type: { + name: "Composite", + className: "ErrorFieldContract", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + +export const WorkbookError: msRest.CompositeMapper = { + serializedName: "WorkbookError", + type: { + name: "Composite", + className: "WorkbookError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorFieldContract" + } + } + } + } + } + } +}; + +export const ComponentsResource: msRest.CompositeMapper = { + serializedName: "ComponentsResource", + type: { + name: "Composite", + className: "ComponentsResource", + 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: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkScopedResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkScopedResource", + type: { + name: "Composite", + className: "PrivateLinkScopedResource", + modelProperties: { + resourceId: { + serializedName: "ResourceId", + type: { + name: "String" + } + }, + scopeId: { + serializedName: "ScopeId", + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationInsightsComponent: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponent", + type: { + name: "Composite", + className: "ApplicationInsightsComponent", + modelProperties: { + ...ComponentsResource.type.modelProperties, + kind: { + required: true, + serializedName: "kind", + type: { + name: "String" + } + }, + applicationId: { + readOnly: true, + serializedName: "properties.ApplicationId", + type: { + name: "String" + } + }, + appId: { + readOnly: true, + serializedName: "properties.AppId", + type: { + name: "String" + } + }, + applicationType: { + required: true, + serializedName: "properties.Application_Type", + defaultValue: 'web', + type: { + name: "String" + } + }, + flowType: { + serializedName: "properties.Flow_Type", + defaultValue: 'Bluefield', + type: { + name: "String" + } + }, + requestSource: { + serializedName: "properties.Request_Source", + defaultValue: 'rest', + type: { + name: "String" + } + }, + instrumentationKey: { + readOnly: true, + serializedName: "properties.InstrumentationKey", + type: { + name: "String" + } + }, + creationDate: { + readOnly: true, + serializedName: "properties.CreationDate", + type: { + name: "DateTime" + } + }, + tenantId: { + readOnly: true, + serializedName: "properties.TenantId", + type: { + name: "String" + } + }, + hockeyAppId: { + serializedName: "properties.HockeyAppId", + type: { + name: "String" + } + }, + hockeyAppToken: { + readOnly: true, + serializedName: "properties.HockeyAppToken", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + samplingPercentage: { + serializedName: "properties.SamplingPercentage", + type: { + name: "Number" + } + }, + connectionString: { + readOnly: true, + serializedName: "properties.ConnectionString", + type: { + name: "String" + } + }, + retentionInDays: { + serializedName: "properties.RetentionInDays", + defaultValue: 90, + type: { + name: "Number" + } + }, + disableIpMasking: { + serializedName: "properties.DisableIpMasking", + type: { + name: "Boolean" + } + }, + immediatePurgeDataOn30Days: { + serializedName: "properties.ImmediatePurgeDataOn30Days", + type: { + name: "Boolean" + } + }, + privateLinkScopedResources: { + readOnly: true, + serializedName: "properties.PrivateLinkScopedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkScopedResource" + } + } + } + }, + publicNetworkAccessForIngestion: { + serializedName: "properties.publicNetworkAccessForIngestion", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + publicNetworkAccessForQuery: { + serializedName: "properties.publicNetworkAccessForQuery", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + ingestionMode: { + serializedName: "properties.IngestionMode", + defaultValue: 'ApplicationInsights', + type: { + name: "String" + } + } + } + } +}; + +export const ComponentPurgeBodyFilters: msRest.CompositeMapper = { + serializedName: "ComponentPurgeBodyFilters", + type: { + name: "Composite", + className: "ComponentPurgeBodyFilters", + modelProperties: { + column: { + serializedName: "column", + type: { + name: "String" + } + }, + operator: { + serializedName: "operator", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Object" + } + }, + key: { + serializedName: "key", + type: { + name: "String" + } + } + } + } +}; + +export const ComponentPurgeBody: msRest.CompositeMapper = { + serializedName: "ComponentPurgeBody", + type: { + name: "Composite", + className: "ComponentPurgeBody", + modelProperties: { + table: { + required: true, + serializedName: "table", + type: { + name: "String" + } + }, + filters: { + required: true, + serializedName: "filters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComponentPurgeBodyFilters" + } + } + } + } + } + } +}; + +export const ComponentPurgeResponse: msRest.CompositeMapper = { + serializedName: "ComponentPurgeResponse", + type: { + name: "Composite", + className: "ComponentPurgeResponse", + modelProperties: { + operationId: { + required: true, + serializedName: "operationId", + type: { + name: "String" + } + } + } + } +}; + +export const ComponentPurgeStatusResponse: msRest.CompositeMapper = { + serializedName: "ComponentPurgeStatusResponse", + type: { + name: "Composite", + className: "ComponentPurgeStatusResponse", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - nextLink: { - serializedName: "nextLink", + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const ComponentLinkedStorageAccounts: msRest.CompositeMapper = { + serializedName: "ComponentLinkedStorageAccounts", + type: { + name: "Composite", + className: "ComponentLinkedStorageAccounts", + modelProperties: { + ...ProxyResource.type.modelProperties, + linkedStorageAccount: { + serializedName: "properties.linkedStorageAccount", + type: { + name: "String" + } + } + } + } +}; + +export const ComponentLinkedStorageAccountsPatch: msRest.CompositeMapper = { + serializedName: "ComponentLinkedStorageAccountsPatch", + type: { + name: "Composite", + className: "ComponentLinkedStorageAccountsPatch", + modelProperties: { + linkedStorageAccount: { + serializedName: "properties.linkedStorageAccount", + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const LiveTokenResponse: msRest.CompositeMapper = { + serializedName: "LiveTokenResponse", + type: { + name: "Composite", + className: "LiveTokenResponse", + modelProperties: { + liveToken: { + readOnly: true, + serializedName: "liveToken", type: { name: "String" } @@ -90,11 +2221,11 @@ export const OperationInfo: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const OperationLive: msRest.CompositeMapper = { + serializedName: "OperationLive", type: { name: "Composite", - className: "Operation", + className: "OperationLive", modelProperties: { name: { serializedName: "name", @@ -125,6 +2256,34 @@ export const Operation: msRest.CompositeMapper = { } }; +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const OperationsListResult: msRest.CompositeMapper = { serializedName: "OperationsListResult", type: { @@ -138,7 +2297,180 @@ export const OperationsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "OperationLive" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AnnotationsListResult: msRest.CompositeMapper = { + serializedName: "AnnotationsListResult", + type: { + name: "Composite", + className: "AnnotationsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Annotation" + } + } + } + } + } + } +}; + +export const ApplicationInsightsComponentAPIKeyListResult: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentAPIKeyListResult", + type: { + name: "Composite", + className: "ApplicationInsightsComponentAPIKeyListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationInsightsComponentAPIKey" + } + } + } + } + } + } +}; + +export const WorkItemConfigurationsListResult: msRest.CompositeMapper = { + serializedName: "WorkItemConfigurationsListResult", + type: { + name: "Composite", + className: "WorkItemConfigurationsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkItemConfiguration" + } + } + } + } + } + } +}; + +export const ApplicationInsightsWebTestLocationsListResult: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsWebTestLocationsListResult", + type: { + name: "Composite", + className: "ApplicationInsightsWebTestLocationsListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationInsightsComponentWebTestLocation" + } + } + } + } + } + } +}; + +export const WebTestListResult: msRest.CompositeMapper = { + serializedName: "webTestListResult", + type: { + name: "Composite", + className: "WebTestListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WebTest" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WorkbooksListResult: msRest.CompositeMapper = { + serializedName: "WorkbooksListResult", + type: { + name: "Composite", + className: "WorkbooksListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Workbook" + } + } + } + } + } + } +}; + +export const ApplicationInsightsComponentListResult: msRest.CompositeMapper = { + serializedName: "ApplicationInsightsComponentListResult", + type: { + name: "Composite", + className: "ApplicationInsightsComponentListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationInsightsComponent" } } } diff --git a/sdk/applicationinsights/arm-appinsights/src/models/operationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/operationsMappers.ts index e798e4bc430a..cdf9b64cd39d 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/operationsMappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/operationsMappers.ts @@ -8,7 +8,11 @@ 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 1c02e2a0b64a..6e3e12a770dc 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/parameters.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/parameters.ts @@ -20,11 +20,53 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const annotationId: msRest.OperationURLParameter = { + parameterPath: "annotationId", + mapper: { + required: true, + serializedName: "annotationId", + type: { + name: "String" + } + } +}; +export const apiVersion0: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2015-05-01', + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2020-06-02-preview', + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const apiVersion2: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, + isConstant: true, serializedName: "api-version", + defaultValue: '2018-05-01-preview', constraints: { MinLength: 1 }, @@ -33,33 +75,151 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; -export const continuationToken: msRest.OperationQueryParameter = { +export const apiVersion3: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + 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", - "continuationToken" + "canFetchContent" ], mapper: { - serializedName: "continuationToken", + serializedName: "canFetchContent", + type: { + name: "Boolean" + } + } +}; +export const category: msRest.OperationQueryParameter = { + parameterPath: "category", + mapper: { + required: true, + serializedName: "category", type: { name: "String" } } }; -export const downloadAs: msRest.OperationQueryParameter = { - parameterPath: "downloadAs", +export const componentName: msRest.OperationURLParameter = { + parameterPath: "componentName", mapper: { required: true, - serializedName: "downloadAs", + serializedName: "componentName", type: { name: "String" } } }; -export const geoLocationId: msRest.OperationQueryParameter = { - parameterPath: "geoLocationId", +export const configurationId: msRest.OperationURLParameter = { + parameterPath: "configurationId", + mapper: { + required: true, + serializedName: "ConfigurationId", + type: { + name: "String" + } + } +}; +export const end: msRest.OperationQueryParameter = { + parameterPath: "end", + mapper: { + required: true, + serializedName: "end", + type: { + name: "String" + } + } +}; +export const exportId: msRest.OperationURLParameter = { + parameterPath: "exportId", + mapper: { + required: true, + serializedName: "exportId", + type: { + name: "String" + } + } +}; +export const favoriteId: msRest.OperationURLParameter = { + parameterPath: "favoriteId", + mapper: { + required: true, + serializedName: "favoriteId", + type: { + name: "String" + } + } +}; +export const favoriteType: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "favoriteType" + ], + mapper: { + serializedName: "favoriteType", + defaultValue: 'shared', + type: { + name: "Enum", + allowedValues: [ + "shared", + "user" + ] + } + } +}; +export const id: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "id" + ], + mapper: { + serializedName: "id", + type: { + name: "String" + } + } +}; +export const includeContent: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "includeContent" + ], + mapper: { + serializedName: "includeContent", + type: { + name: "Boolean" + } + } +}; +export const keyId: msRest.OperationURLParameter = { + parameterPath: "keyId", mapper: { required: true, - serializedName: "geoLocationId", + serializedName: "keyId", + type: { + name: "String" + } + } +}; +export const name: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "name" + ], + mapper: { + serializedName: "name", type: { name: "String" } @@ -76,6 +236,28 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const overrideItem: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "overrideItem" + ], + mapper: { + serializedName: "overrideItem", + type: { + name: "Boolean" + } + } +}; +export const purgeId: msRest.OperationURLParameter = { + parameterPath: "purgeId", + mapper: { + required: true, + serializedName: "purgeId", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -91,6 +273,84 @@ export const resourceGroupName: msRest.OperationURLParameter = { } } }; +export const resourceName: msRest.OperationURLParameter = { + parameterPath: "resourceName", + mapper: { + required: true, + serializedName: "resourceName", + type: { + name: "String" + } + } +}; +export const resourceUri: msRest.OperationURLParameter = { + parameterPath: "resourceUri", + mapper: { + required: true, + serializedName: "resourceUri", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const scope: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "scope" + ], + mapper: { + serializedName: "scope", + defaultValue: 'shared', + type: { + name: "String" + } + } +}; +export const scopePath: msRest.OperationURLParameter = { + parameterPath: "scopePath", + mapper: { + required: true, + serializedName: "scopePath", + type: { + name: "String" + } + } +}; +export const sourceType: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "sourceType" + ], + mapper: { + serializedName: "sourceType", + type: { + name: "String" + } + } +}; +export const start: msRest.OperationQueryParameter = { + parameterPath: "start", + mapper: { + required: true, + serializedName: "start", + type: { + name: "String" + } + } +}; +export const storageType: msRest.OperationURLParameter = { + parameterPath: "storageType", + mapper: { + required: true, + isConstant: true, + serializedName: "storageType", + defaultValue: 'ServiceProfiler', + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { @@ -104,25 +364,34 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; -export const testSuccessfulCriteria: msRest.OperationQueryParameter = { +export const tags: msRest.OperationQueryParameter = { parameterPath: [ "options", - "testSuccessfulCriteria" + "tags" ], mapper: { - serializedName: "testSuccessfulCriteria", + serializedName: "tags", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - } + }, + collectionFormat: msRest.QueryCollectionFormat.Csv }; -export const timeStamp: msRest.OperationQueryParameter = { - parameterPath: "timeStamp", +export const type: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "type" + ], mapper: { - required: true, - serializedName: "timeStamp", + serializedName: "type", + defaultValue: 'none', type: { - name: "Number" + name: "String" } } }; @@ -136,3 +405,13 @@ export const webTestName: msRest.OperationURLParameter = { } } }; +export const workItemConfigId: msRest.OperationURLParameter = { + parameterPath: "workItemConfigId", + mapper: { + required: true, + serializedName: "workItemConfigId", + type: { + name: "String" + } + } +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/models/proactiveDetectionConfigurationsMappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/proactiveDetectionConfigurationsMappers.ts new file mode 100644 index 000000000000..1f49d1c3140c --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/proactiveDetectionConfigurationsMappers.ts @@ -0,0 +1,28 @@ +/* + * 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, + 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 new file mode 100644 index 000000000000..97c2505df574 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/webTestLocationsMappers.ts @@ -0,0 +1,13 @@ +/* + * 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 new file mode 100644 index 000000000000..ddf41ab7b9dd --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/webTestsMappers.ts @@ -0,0 +1,30 @@ +/* + * 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, + 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 new file mode 100644 index 000000000000..27d2702c8d87 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/workItemConfigurationsMappers.ts @@ -0,0 +1,16 @@ +/* + * 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 new file mode 100644 index 000000000000..fe152dec8fd3 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/models/workbooksMappers.ts @@ -0,0 +1,30 @@ +/* + * 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, + 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 new file mode 100644 index 000000000000..b4f369ebc52b --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/aPIKeys.ts @@ -0,0 +1,282 @@ +/* + * 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/aPIKeysMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a APIKeys. */ +export class APIKeys { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a APIKeys. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + aPIKeyProperties, + options + }, + createOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + keyId, + options + }, + deleteMethodOperationSpec, + callback) as 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 optional parameters + * @returns Promise + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + keyId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponentAPIKeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "aPIKeyProperties", + mapper: { + ...Mappers.APIKeyRequest, + required: true + } + }, + 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}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.keyId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + 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}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.keyId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponentAPIKey + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts b/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts new file mode 100644 index 000000000000..6ab9ebbc360f --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts @@ -0,0 +1,333 @@ +/* + * 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/analyticsItemsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a AnalyticsItems. */ +export class AnalyticsItems { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a AnalyticsItems. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + scopePath, + options + }, + listOperationSpec, + callback) as 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. 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + scopePath, + options + }, + getOperationSpec, + callback) as 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. 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + scopePath, + itemProperties, + options + }, + putOperationSpec, + callback) as 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. 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + scopePath, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + 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: { + type: { + name: "Composite", + className: "ApplicationInsightsComponentAnalyticsItem" + } + } + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.scopePath + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.id, + Parameters.name + ], + headerParameters: [ + Parameters.acceptLanguage + ], + 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", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.scopePath + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.overrideItem + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "itemProperties", + mapper: { + ...Mappers.ApplicationInsightsComponentAnalyticsItem, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponentAnalyticsItem + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + 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 new file mode 100644 index 000000000000..b9b3f4e1015d --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts @@ -0,0 +1,321 @@ +/* + * 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/annotationsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a Annotations. */ +export class Annotations { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a Annotations. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 optional parameters + * @returns Promise + */ + 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; + /** + * @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 optional parameters + * @param callback The callback + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + start, + end, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + annotationProperties, + options + }, + createOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + annotationId, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + annotationId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + 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 + }, + default: { + bodyMapper: Mappers.AnnotationError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "annotationProperties", + mapper: { + ...Mappers.Annotation, + required: true + } + }, + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Annotation" + } + } + } + } + }, + default: { + bodyMapper: Mappers.AnnotationError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.annotationId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.annotationId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Annotation" + } + } + } + } + }, + default: { + bodyMapper: Mappers.AnnotationError + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts new file mode 100644 index 000000000000..e5ce8d5f1604 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts @@ -0,0 +1,87 @@ +/* + * 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/componentAvailableFeaturesMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a ComponentAvailableFeatures. */ +export class ComponentAvailableFeatures { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a ComponentAvailableFeatures. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + 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 + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts new file mode 100644 index 000000000000..8c309bc2b2f2 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts @@ -0,0 +1,158 @@ +/* + * 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/componentCurrentBillingFeaturesMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a ComponentCurrentBillingFeatures. */ +export class ComponentCurrentBillingFeatures { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a ComponentCurrentBillingFeatures. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as 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 optional parameters + * @returns Promise + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + billingFeaturesProperties, + options + }, + updateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + 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", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "billingFeaturesProperties", + mapper: { + ...Mappers.ApplicationInsightsComponentBillingFeatures, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponentBillingFeatures + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts new file mode 100644 index 000000000000..de36f7cae22c --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts @@ -0,0 +1,87 @@ +/* + * 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/componentFeatureCapabilitiesMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a ComponentFeatureCapabilities. */ +export class ComponentFeatureCapabilities { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a ComponentFeatureCapabilities. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + 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 + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts new file mode 100644 index 000000000000..46a0e3ed40bf --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts @@ -0,0 +1,289 @@ +/* + * 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/componentLinkedStorageAccountsOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a ComponentLinkedStorageAccountsOperations. */ +export class ComponentLinkedStorageAccountsOperations { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a ComponentLinkedStorageAccountsOperations. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + linkedStorageAccountsProperties, + options + }, + createAndUpdateOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + linkedStorageAccountsProperties, + options + }, + updateOperationSpec, + callback) as 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 [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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + 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 + } + }, + serializer +}; + +const createAndUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + 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 + ], + requestBody: { + parameterPath: "linkedStorageAccountsProperties", + mapper: { + ...Mappers.ComponentLinkedStorageAccounts, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ComponentLinkedStorageAccounts + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + 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 + ], + requestBody: { + parameterPath: "linkedStorageAccountsProperties", + mapper: { + ...Mappers.ComponentLinkedStorageAccountsPatch, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ComponentLinkedStorageAccounts + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + 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: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts new file mode 100644 index 000000000000..c94652a32949 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts @@ -0,0 +1,87 @@ +/* + * 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/componentQuotaStatusMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a ComponentQuotaStatus. */ +export class ComponentQuotaStatus { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a ComponentQuotaStatus. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + 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 + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/components.ts b/sdk/applicationinsights/arm-appinsights/src/operations/components.ts new file mode 100644 index 000000000000..48c6618cbfe9 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/components.ts @@ -0,0 +1,628 @@ +/* + * 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/componentsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a Components. */ +export class Components { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a Components. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of all Application Insights components within a subscription. + * @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; + } + + /** + * 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 + */ + 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( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * 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 + */ + 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as 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 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; + /** + * @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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + insightProperties, + options + }, + createOrUpdateOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + componentTags, + options + }, + updateTagsOperationSpec, + callback) as 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 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; + /** + * @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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + body, + options + }, + purgeOperationSpec, + callback) as 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 optional parameters + * @returns Promise + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + purgeId, + options + }, + getPurgeStatusOperationSpec, + callback) as Promise; + } + + /** + * 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(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; + } + + /** + * 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + 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 + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + 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 + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponent + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "insightProperties", + mapper: { + ...Mappers.ApplicationInsightsComponent, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponent + }, + 201: { + bodyMapper: Mappers.ApplicationInsightsComponent + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateTagsOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "componentTags", + mapper: { + ...Mappers.TagsResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponent + }, + 201: { + bodyMapper: Mappers.ApplicationInsightsComponent + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const purgeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.ComponentPurgeBody, + required: true + } + }, + responses: { + 202: { + bodyMapper: Mappers.ComponentPurgeResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getPurgeStatusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.purgeId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ComponentPurgeStatusResponse + }, + 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.ApplicationInsightsComponentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts new file mode 100644 index 000000000000..940a447fdb0b --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts @@ -0,0 +1,389 @@ +/* + * 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/exportConfigurationsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a ExportConfigurations. */ +export class ExportConfigurations { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a ExportConfigurations. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + exportProperties, + options + }, + createOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + exportId, + options + }, + deleteMethodOperationSpec, + callback) as 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 optional parameters + * @returns Promise + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + exportId, + options + }, + getOperationSpec, + callback) as 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 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 exportProperties Properties that need to be specified to update the Continuous Export + * configuration. + * @param callback The callback + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + exportId, + exportProperties, + options + }, + updateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + 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: { + type: { + name: "Composite", + className: "ApplicationInsightsComponentExportConfiguration" + } + } + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "exportProperties", + mapper: { + ...Mappers.ApplicationInsightsComponentExportRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationInsightsComponentExportConfiguration" + } + } + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.exportId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + 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}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.exportId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + 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}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.exportId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "exportProperties", + mapper: { + ...Mappers.ApplicationInsightsComponentExportRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponentExportConfiguration + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts b/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts new file mode 100644 index 000000000000..f825ea158c5a --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts @@ -0,0 +1,373 @@ +/* + * 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/favoritesMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a Favorites. */ +export class Favorites { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a Favorites. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + favoriteId, + options + }, + getOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + favoriteId, + favoriteProperties, + options + }, + addOperationSpec, + callback) as 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 optional parameters + * @returns Promise + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + favoriteId, + favoriteProperties, + options + }, + updateOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + favoriteId, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + 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: { + type: { + name: "Composite", + className: "ApplicationInsightsComponentFavorite" + } + } + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.favoriteId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + 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}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.favoriteId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "favoriteProperties", + mapper: { + ...Mappers.ApplicationInsightsComponentFavorite, + required: true + } + }, + 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}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.favoriteId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "favoriteProperties", + mapper: { + ...Mappers.ApplicationInsightsComponentFavorite, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponentFavorite + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", + urlParameters: [ + 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 8a723d22b1d6..096298bc51ac 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/index.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/index.ts @@ -9,3 +9,20 @@ */ export * from "./operations"; +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 "./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 new file mode 100644 index 000000000000..ed95ae3dd28b --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/liveToken.ts @@ -0,0 +1,81 @@ +/* + * 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/liveTokenMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a LiveToken. */ +export class LiveToken { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a LiveToken. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceUri, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + 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 + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts index 887407543415..a21e656b1639 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts @@ -27,8 +27,7 @@ export class Operations { } /** - * List the available operations supported by the Microsoft.EventGrid resource provider. - * @summary List available operations. + * Lists all of the available insights REST API operations. * @param [options] The optional parameters * @returns Promise */ @@ -36,13 +35,13 @@ export class Operations { /** * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + 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 { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -52,8 +51,32 @@ export class Operations { } /** - * List the available operations supported by the Microsoft.EventGrid resource provider. + * 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 @@ -63,14 +86,14 @@ export class Operations { * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + 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 { + 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, @@ -79,15 +102,64 @@ export class Operations { 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.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -104,6 +176,27 @@ const listOperationSpec: msRest.OperationSpec = { }; 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}", diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts new file mode 100644 index 000000000000..79b5a581c019 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts @@ -0,0 +1,242 @@ +/* + * 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/proactiveDetectionConfigurationsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a ProactiveDetectionConfigurations. */ +export class ProactiveDetectionConfigurations { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a ProactiveDetectionConfigurations. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as 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 optional parameters + * @returns Promise + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + configurationId, + options + }, + getOperationSpec, + callback) as 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 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 proactiveDetectionProperties Properties that need to be specified to update the + * ProactiveDetection configuration. + * @param options The optional parameters + * @param callback The callback + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + configurationId, + proactiveDetectionProperties, + options + }, + updateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + 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" + } + } + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.configurationId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationInsightsComponentProactiveDetectionConfiguration + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}", + urlParameters: [ + 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 + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts new file mode 100644 index 000000000000..ef40c1e72fab --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts @@ -0,0 +1,87 @@ +/* + * 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/webTestLocationsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a WebTestLocations. */ +export class WebTestLocations { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a WebTestLocations. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + 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 + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts b/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts new file mode 100644 index 000000000000..cc6634172d90 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts @@ -0,0 +1,585 @@ +/* + * 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/webTestsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a WebTests. */ +export class WebTests { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a WebTests. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + 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 + */ + 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( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * 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(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 + */ + 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( + { + resourceGroupName, + webTestName, + options + }, + getOperationSpec, + callback) as 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 optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, webTestName: string, webTestDefinition: Models.WebTest, 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 webTestDefinition Properties that need to be specified to create or update an Application + * Insights web test definition. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, webTestName: string, webTestDefinition: Models.WebTest, 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + webTestName, + webTestDefinition, + options + }, + createOrUpdateOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + webTestName, + webTestTags, + options + }, + updateTagsOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + webTestName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Get all Application Insights web test alerts definitions within a subscription. + * @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; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + componentName, + resourceGroupName, + options + }, + listByComponentOperationSpec, + callback) as Promise; + } + + /** + * 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * 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(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; + } + + /** + * 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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByComponentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByComponentNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + 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}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.webTestName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + 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}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.webTestName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "webTestDefinition", + mapper: { + ...Mappers.WebTest, + required: true + } + }, + 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}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.webTestName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "webTestTags", + mapper: { + ...Mappers.TagsResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WebTest + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.webTestName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + 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 + } + }, + serializer +}; + +const listByComponentOperationSpec: msRest.OperationSpec = { + 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 + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WebTestListResult + }, + 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.WebTestListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByComponentNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WebTestListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts new file mode 100644 index 000000000000..f3d0751cbcde --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts @@ -0,0 +1,422 @@ +/* + * 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/workItemConfigurationsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a WorkItemConfigurations. */ +export class WorkItemConfigurations { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a WorkItemConfigurations. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + workItemConfigurationProperties, + options + }, + createOperationSpec, + callback) as 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 optional parameters + * @returns Promise + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getDefaultOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + workItemConfigId, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + workItemConfigId, + options + }, + getItemOperationSpec, + callback) as 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 optional parameters + * @returns Promise + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + workItemConfigId, + workItemConfigurationProperties, + options + }, + updateItemOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + 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 + }, + default: { + bodyMapper: Mappers.WorkItemConfigurationError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workItemConfigurationProperties", + mapper: { + ...Mappers.WorkItemCreateConfiguration, + required: true + } + }, + 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", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkItemConfiguration + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", + urlParameters: [ + 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 = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.resourceName, + Parameters.workItemConfigId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + 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}", + urlParameters: [ + 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 + } + }, + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts b/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts new file mode 100644 index 000000000000..3f3419fdb5da --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts @@ -0,0 +1,344 @@ +/* + * 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/workbooksMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClientContext } from "../applicationInsightsManagementClientContext"; + +/** Class representing a Workbooks. */ +export class Workbooks { + private readonly client: ApplicationInsightsManagementClientContext; + + /** + * Create a Workbooks. + * @param {ApplicationInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsManagementClientContext) { + 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 + */ + 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.WorkbooksListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, category: Models.CategoryType, options?: Models.WorkbooksListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + category, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * 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; + /** + * @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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as 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 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 + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * 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 optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, 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 workbook. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, 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 workbook. + * @param options The optional parameters + * @param callback The callback + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + workbookProperties, + options + }, + createOrUpdateOperationSpec, + callback) as 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 workbookProperties Properties that need to be specified to create a new workbook. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, 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 workbook. + * @param callback The callback + */ + update(resourceGroupName: string, resourceName: string, workbookProperties: Models.Workbook, 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 workbook. + * @param options The optional parameters + * @param callback The callback + */ + 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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + workbookProperties, + options + }, + updateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroup/{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 + }, + default: { + bodyMapper: Mappers.WorkbookError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Workbook + }, + default: { + bodyMapper: Mappers.WorkbookError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 201: {}, + 204: {}, + default: { + bodyMapper: Mappers.WorkbookError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workbookProperties", + mapper: { + ...Mappers.Workbook, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Workbook + }, + 201: { + bodyMapper: Mappers.Workbook + }, + default: { + bodyMapper: Mappers.WorkbookError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "workbookProperties", + mapper: { + ...Mappers.Workbook, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Workbook + }, + default: { + bodyMapper: Mappers.WorkbookError + } + }, + serializer +};