From de898076a3c7b6afe4a7c5cfe6b5cc23e31286f8 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 2 Mar 2020 20:45:56 +0000 Subject: [PATCH] Generated from c2d3e03a0aafb16b92703d9903a33475e4f4be96 Revert changes to existing operation IDs - ignore validation warnings --- .../applicationinsights-query/LICENSE.txt | 2 +- .../applicationinsights-query/README.md | 14 +- .../applicationinsights-query/package.json | 20 +- .../rollup.config.js | 22 +- .../src/applicationInsightsDataClient.ts | 4 + .../applicationInsightsDataClientContext.ts | 12 +- .../src/models/eventsMappers.ts | 63 +- .../src/models/getMappers.ts | 20 + .../src/models/index.ts | 1225 ++++++++--------- .../src/models/mappers.ts | 340 ++++- .../src/models/metricsMappers.ts | 19 +- .../src/models/postMappers.ts | 20 + .../src/models/queryMappers.ts | 17 +- .../src/operations/get.ts | 79 ++ .../src/operations/index.ts | 2 + .../src/operations/metrics.ts | 2 +- .../src/operations/post.ts | 79 ++ .../applicationinsights-query/tsconfig.json | 2 +- 18 files changed, 1198 insertions(+), 744 deletions(-) create mode 100644 sdk/applicationinsights/applicationinsights-query/src/models/getMappers.ts create mode 100644 sdk/applicationinsights/applicationinsights-query/src/models/postMappers.ts create mode 100644 sdk/applicationinsights/applicationinsights-query/src/operations/get.ts create mode 100644 sdk/applicationinsights/applicationinsights-query/src/operations/post.ts diff --git a/sdk/applicationinsights/applicationinsights-query/LICENSE.txt b/sdk/applicationinsights/applicationinsights-query/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/applicationinsights/applicationinsights-query/LICENSE.txt +++ b/sdk/applicationinsights/applicationinsights-query/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/applicationinsights/applicationinsights-query/README.md b/sdk/applicationinsights/applicationinsights-query/README.md index 2026ff8127e7..902cf528a9cc 100644 --- a/sdk/applicationinsights/applicationinsights-query/README.md +++ b/sdk/applicationinsights/applicationinsights-query/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for ApplicationInsightsDataClient. ### How to Install -``` +```bash npm install @azure/applicationinsights-query ``` @@ -19,13 +19,14 @@ npm install @azure/applicationinsights-query ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; import { ApplicationInsightsDataClient, ApplicationInsightsDataModels, ApplicationInsightsDataMappers } from "@azure/applicationinsights-query"; @@ -55,7 +56,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -111,5 +112,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fapplicationinsights%2Fapplicationinsights-query%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/applicationinsights/applicationinsights-query/README.png) diff --git a/sdk/applicationinsights/applicationinsights-query/package.json b/sdk/applicationinsights/applicationinsights-query/package.json index abea06a59016..be952e448bbb 100644 --- a/sdk/applicationinsights/applicationinsights-query/package.json +++ b/sdk/applicationinsights/applicationinsights-query/package.json @@ -4,8 +4,8 @@ "description": "ApplicationInsightsDataClient Library with typescript type definitions for node.js and browser.", "version": "1.1.0", "dependencies": { - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -19,18 +19,19 @@ "module": "./esm/applicationInsightsDataClient.js", "types": "./esm/applicationInsightsDataClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/applicationinsights/applicationinsights-query", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/applicationinsights/applicationinsights-query", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -42,6 +43,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/applicationinsights/applicationinsights-query/rollup.config.js b/sdk/applicationinsights/applicationinsights-query/rollup.config.js index 85ed89401a88..51838418b318 100644 --- a/sdk/applicationinsights/applicationinsights-query/rollup.config.js +++ b/sdk/applicationinsights/applicationinsights-query/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/applicationInsightsDataClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/applicationInsightsDataClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/applicationinsights-query.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/applicationinsights/applicationinsights-query/src/applicationInsightsDataClient.ts b/sdk/applicationinsights/applicationinsights-query/src/applicationInsightsDataClient.ts index df88350debaa..be19e7659968 100644 --- a/sdk/applicationinsights/applicationinsights-query/src/applicationInsightsDataClient.ts +++ b/sdk/applicationinsights/applicationinsights-query/src/applicationInsightsDataClient.ts @@ -19,6 +19,8 @@ class ApplicationInsightsDataClient extends ApplicationInsightsDataClientContext metrics: operations.Metrics; events: operations.Events; query: operations.Query; + post: operations.Post; + get: operations.Get; /** * Initializes a new instance of the ApplicationInsightsDataClient class. @@ -30,6 +32,8 @@ class ApplicationInsightsDataClient extends ApplicationInsightsDataClientContext this.metrics = new operations.Metrics(this); this.events = new operations.Events(this); this.query = new operations.Query(this); + this.post = new operations.Post(this); + this.get = new operations.Get(this); } } diff --git a/sdk/applicationinsights/applicationinsights-query/src/applicationInsightsDataClientContext.ts b/sdk/applicationinsights/applicationinsights-query/src/applicationInsightsDataClientContext.ts index 490c2684263f..42bf565c9bea 100644 --- a/sdk/applicationinsights/applicationinsights-query/src/applicationInsightsDataClientContext.ts +++ b/sdk/applicationinsights/applicationinsights-query/src/applicationInsightsDataClientContext.ts @@ -12,7 +12,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "./models"; const packageName = "@azure/applicationinsights-query"; -const packageVersion = "0.1.0"; +const packageVersion = "1.1.0"; export class ApplicationInsightsDataClientContext extends msRest.ServiceClient { credentials: msRest.ServiceClientCredentials; @@ -23,23 +23,23 @@ export class ApplicationInsightsDataClientContext extends msRest.ServiceClient { * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, options?: Models.ApplicationInsightsDataClientOptions) { - if (credentials === null || credentials === undefined) { - throw new Error('\'credentials\' cannot be null.'); + if (credentials == undefined) { + throw new Error("'credentials' cannot be null."); } if (!options) { options = {}; } - if(!options.userAgent) { + + if (!options.userAgent) { const defaultUserAgent = msRest.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.baseUri = options.baseUri || this.baseUri || "https://api.applicationinsights.io"; + this.baseUri = options.baseUri || this.baseUri || "https://api.applicationinsights.io/v1"; this.requestContentType = "application/json; charset=utf-8"; this.credentials = credentials; - } } diff --git a/sdk/applicationinsights/applicationinsights-query/src/models/eventsMappers.ts b/sdk/applicationinsights/applicationinsights-query/src/models/eventsMappers.ts index 57883403a86f..b5933644c6c7 100644 --- a/sdk/applicationinsights/applicationinsights-query/src/models/eventsMappers.ts +++ b/sdk/applicationinsights/applicationinsights-query/src/models/eventsMappers.ts @@ -1,51 +1,48 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - EventsResults, - ErrorInfo, ErrorDetail, - EventsResultData, - EventsResultDataCustomDimensions, - EventsResultDataCustomMeasurements, - EventsOperationInfo, - EventsSessionInfo, - EventsUserInfo, - EventsCloudInfo, + ErrorInfo, + ErrorResponse, EventsAiInfo, EventsApplicationInfo, - EventsClientInfo, - ErrorResponse, - EventsTraceResult, - EventsTraceInfo, - EventsCustomEventResult, - EventsCustomEventInfo, - EventsPageViewResult, - EventsPageViewInfo, - EventsBrowserTimingResult, + EventsAvailabilityResultInfo, + EventsAvailabilityResultResult, EventsBrowserTimingInfo, + EventsBrowserTimingResult, + EventsClientInfo, EventsClientPerformanceInfo, - EventsRequestResult, - EventsRequestInfo, - EventsDependencyResult, + EventsCloudInfo, + EventsCustomEventInfo, + EventsCustomEventResult, + EventsCustomMetricInfo, + EventsCustomMetricResult, EventsDependencyInfo, - EventsExceptionResult, - EventsExceptionInfo, + EventsDependencyResult, EventsExceptionDetail, EventsExceptionDetailsParsedStack, - EventsAvailabilityResultResult, - EventsAvailabilityResultInfo, - EventsPerformanceCounterResult, + EventsExceptionInfo, + EventsExceptionResult, + EventsOperationInfo, + EventsPageViewInfo, + EventsPageViewResult, EventsPerformanceCounterInfo, - EventsCustomMetricResult, - EventsCustomMetricInfo + EventsPerformanceCounterResult, + EventsRequestInfo, + EventsRequestResult, + EventsResultData, + EventsResultDataCustomDimensions, + EventsResultDataCustomMeasurements, + EventsResults, + EventsSessionInfo, + EventsTraceInfo, + EventsTraceResult, + EventsUserInfo } from "../models/mappers"; - diff --git a/sdk/applicationinsights/applicationinsights-query/src/models/getMappers.ts b/sdk/applicationinsights/applicationinsights-query/src/models/getMappers.ts new file mode 100644 index 000000000000..db864c3dc3ed --- /dev/null +++ b/sdk/applicationinsights/applicationinsights-query/src/models/getMappers.ts @@ -0,0 +1,20 @@ +/* + * 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 { + discriminators, + ErrorDetail, + ErrorInfo, + ErrorResponse, + MetadataApplication, + MetadataFunction, + MetadataResults, + MetadataTable, + MetadataTableColumnsItem, + MetadataTableGroup +} from "../models/mappers"; diff --git a/sdk/applicationinsights/applicationinsights-query/src/models/index.ts b/sdk/applicationinsights/applicationinsights-query/src/models/index.ts index 50135f90faa0..a121d3ae48c2 100644 --- a/sdk/applicationinsights/applicationinsights-query/src/models/index.ts +++ b/sdk/applicationinsights/applicationinsights-query/src/models/index.ts @@ -1,430 +1,326 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { ServiceClientOptions } from "@azure/ms-rest-js"; import * as msRest from "@azure/ms-rest-js"; - /** - * @interface - * An interface representing MetricsPostBodySchemaParameters. * The parameters for a single metrics query - * */ export interface MetricsPostBodySchemaParameters { /** - * @member {MetricId} metricId Possible values include: 'requests/count', - * 'requests/duration', 'requests/failed', 'users/count', - * 'users/authenticated', 'pageViews/count', 'pageViews/duration', - * 'client/processingDuration', 'client/receiveDuration', - * 'client/networkDuration', 'client/sendDuration', 'client/totalDuration', - * 'dependencies/count', 'dependencies/failed', 'dependencies/duration', - * 'exceptions/count', 'exceptions/browser', 'exceptions/server', + * Possible values include: 'requests/count', 'requests/duration', 'requests/failed', + * 'users/count', 'users/authenticated', 'pageViews/count', 'pageViews/duration', + * 'client/processingDuration', 'client/receiveDuration', 'client/networkDuration', + * 'client/sendDuration', 'client/totalDuration', 'dependencies/count', 'dependencies/failed', + * 'dependencies/duration', 'exceptions/count', 'exceptions/browser', 'exceptions/server', * 'sessions/count', 'performanceCounters/requestExecutionTime', - * 'performanceCounters/requestsPerSecond', - * 'performanceCounters/requestsInQueue', - * 'performanceCounters/memoryAvailableBytes', - * 'performanceCounters/exceptionsPerSecond', - * 'performanceCounters/processCpuPercentage', - * 'performanceCounters/processIOBytesPerSecond', - * 'performanceCounters/processPrivateBytes', - * 'performanceCounters/processorCpuPercentage', - * 'availabilityResults/availabilityPercentage', - * 'availabilityResults/duration', 'billing/telemetryCount', - * 'customEvents/count' + * 'performanceCounters/requestsPerSecond', 'performanceCounters/requestsInQueue', + * 'performanceCounters/memoryAvailableBytes', 'performanceCounters/exceptionsPerSecond', + * 'performanceCounters/processCpuPercentage', 'performanceCounters/processIOBytesPerSecond', + * 'performanceCounters/processPrivateBytes', 'performanceCounters/processorCpuPercentage', + * 'availabilityResults/availabilityPercentage', 'availabilityResults/duration', + * 'billing/telemetryCount', 'customEvents/count' */ metricId: MetricId; - /** - * @member {string} [timespan] - */ timespan?: string; - /** - * @member {MetricsAggregation[]} [aggregation] - */ aggregation?: MetricsAggregation[]; - /** - * @member {string} [interval] - */ interval?: string; - /** - * @member {MetricsSegment[]} [segment] - */ segment?: MetricsSegment[]; - /** - * @member {number} [top] - */ top?: number; - /** - * @member {string} [orderby] - */ orderby?: string; - /** - * @member {string} [filter] - */ filter?: string; } /** - * @interface - * An interface representing MetricsPostBodySchema. * A metric request - * */ export interface MetricsPostBodySchema { /** - * @member {string} id An identifier for this query. Must be unique within - * the post body of the request. This identifier will be the 'id' property - * of the response object representing this query. + * An identifier for this query. Must be unique within the post body of the request. This + * identifier will be the 'id' property of the response object representing this query. */ id: string; /** - * @member {MetricsPostBodySchemaParameters} parameters The parameters for a - * single metrics query + * The parameters for a single metrics query */ parameters: MetricsPostBodySchemaParameters; } /** - * @interface - * An interface representing MetricsSegmentInfo. * A metric segment - * */ export interface MetricsSegmentInfo { /** - * @member {Date} [start] Start time of the metric segment (only when an - * interval was specified). + * Start time of the metric segment (only when an interval was specified). */ start?: Date; /** - * @member {Date} [end] Start time of the metric segment (only when an - * interval was specified). + * Start time of the metric segment (only when an interval was specified). */ end?: Date; /** - * @member {MetricsSegmentInfo[]} [segments] Segmented metric data (if - * further segmented). + * Segmented metric data (if further segmented). */ segments?: MetricsSegmentInfo[]; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing MetricsResultInfo. * A metric result data. - * */ export interface MetricsResultInfo { /** - * @member {Date} [start] Start time of the metric. + * Start time of the metric. */ start?: Date; /** - * @member {Date} [end] Start time of the metric. + * Start time of the metric. */ end?: Date; /** - * @member {string} [interval] The interval used to segment the metric data. + * The interval used to segment the metric data. */ interval?: string; /** - * @member {MetricsSegmentInfo[]} [segments] Segmented metric data (if - * segmented). + * Segmented metric data (if segmented). */ segments?: MetricsSegmentInfo[]; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing MetricsResult. * A metric result. - * */ export interface MetricsResult { - /** - * @member {MetricsResultInfo} [value] - */ value?: MetricsResultInfo; } /** - * @interface * An interface representing MetricsResultsItem. */ export interface MetricsResultsItem { /** - * @member {string} id The specified ID for this metric. + * The specified ID for this metric. */ id: string; /** - * @member {number} status The HTTP status code of this metric query. + * The HTTP status code of this metric query. */ status: number; /** - * @member {MetricsResult} body The results of this metric query. + * The results of this metric query. */ body: MetricsResult; } /** - * @interface * An interface representing ErrorDetail. * @summary Error details. - * */ export interface ErrorDetail { /** - * @member {string} code The error's code. + * The error's code. */ code: string; /** - * @member {string} message A human readable error message. + * A human readable error message. */ message: string; /** - * @member {string} [target] Indicates which property in the request is - * responsible for the error. + * Indicates which property in the request is responsible for the error. */ target?: string; /** - * @member {string} [value] Indicates which value in 'target' is responsible - * for the error. + * Indicates which value in 'target' is responsible for the error. */ value?: string; /** - * @member {string[]} [resources] Indicates resources which were responsible - * for the error. + * Indicates resources which were responsible for the error. */ resources?: string[]; - /** - * @member {any} [additionalProperties] - */ additionalProperties?: any; } /** - * @interface * An interface representing ErrorInfo. * @summary The code and message for an error. - * */ export interface ErrorInfo { /** - * @member {string} code A machine readable error code. + * A machine readable error code. */ code: string; /** - * @member {string} message A human readable error message. + * A human readable error message. */ message: string; /** - * @member {ErrorDetail[]} [details] error details. + * error details. */ details?: ErrorDetail[]; /** - * @member {ErrorInfo} [innererror] Inner error details if they exist. + * Inner error details if they exist. */ innererror?: ErrorInfo; - /** - * @member {any} [additionalProperties] - */ additionalProperties?: any; } /** - * @interface - * An interface representing EventsResultDataCustomDimensions. * Custom dimensions of the event - * */ export interface EventsResultDataCustomDimensions { - /** - * @member {any} [additionalProperties] - */ additionalProperties?: any; } /** - * @interface - * An interface representing EventsResultDataCustomMeasurements. * Custom measurements of the event - * */ export interface EventsResultDataCustomMeasurements { - /** - * @member {any} [additionalProperties] - */ additionalProperties?: any; } /** - * @interface - * An interface representing EventsOperationInfo. * Operation info for an event result - * */ export interface EventsOperationInfo { /** - * @member {string} [name] Name of the operation + * Name of the operation */ name?: string; /** - * @member {string} [id] ID of the operation + * ID of the operation */ id?: string; /** - * @member {string} [parentId] Parent ID of the operation + * Parent ID of the operation */ parentId?: string; /** - * @member {string} [syntheticSource] Synthetic source of the operation + * Synthetic source of the operation */ syntheticSource?: string; } /** - * @interface - * An interface representing EventsSessionInfo. * Session info for an event result - * */ export interface EventsSessionInfo { /** - * @member {string} [id] ID of the session + * ID of the session */ id?: string; } /** - * @interface - * An interface representing EventsUserInfo. * User info for an event result - * */ export interface EventsUserInfo { /** - * @member {string} [id] ID of the user + * ID of the user */ id?: string; /** - * @member {string} [accountId] Account ID of the user + * Account ID of the user */ accountId?: string; /** - * @member {string} [authenticatedId] Authenticated ID of the user + * Authenticated ID of the user */ authenticatedId?: string; } /** - * @interface - * An interface representing EventsCloudInfo. * Cloud info for an event result - * */ export interface EventsCloudInfo { /** - * @member {string} [roleName] Role name of the cloud + * Role name of the cloud */ roleName?: string; /** - * @member {string} [roleInstance] Role instance of the cloud + * Role instance of the cloud */ roleInstance?: string; } /** - * @interface - * An interface representing EventsAiInfo. * AI related application info for an event result - * */ export interface EventsAiInfo { /** - * @member {string} [iKey] iKey of the app + * iKey of the app */ iKey?: string; /** - * @member {string} [appName] Name of the application + * Name of the application */ appName?: string; /** - * @member {string} [appId] ID of the application + * ID of the application */ appId?: string; /** - * @member {string} [sdkVersion] SDK version of the application + * SDK version of the application */ sdkVersion?: string; } /** - * @interface - * An interface representing EventsApplicationInfo. * Application info for an event result - * */ export interface EventsApplicationInfo { /** - * @member {string} [version] Version of the application + * Version of the application */ version?: string; } /** - * @interface - * An interface representing EventsClientInfo. * Client info for an event result - * */ export interface EventsClientInfo { /** - * @member {string} [model] Model of the client + * Model of the client */ model?: string; /** - * @member {string} [os] Operating system of the client + * Operating system of the client */ os?: string; /** - * @member {string} [type] Type of the client + * Type of the client */ type?: string; /** - * @member {string} [browser] Browser of the client + * Browser of the client */ browser?: string; /** - * @member {string} [ip] IP address of the client + * IP address of the client */ ip?: string; /** - * @member {string} [city] City of the client + * City of the client */ city?: string; /** - * @member {string} [stateOrProvince] State or province of the client + * State or province of the client */ stateOrProvince?: string; /** - * @member {string} [countryOrRegion] Country or region of the client + * Country or region of the client */ countryOrRegion?: string; } @@ -435,1485 +331,1453 @@ export interface EventsClientInfo { export type EventsResultDataUnion = EventsResultData | EventsTraceResult | EventsCustomEventResult | EventsPageViewResult | EventsBrowserTimingResult | EventsRequestResult | EventsDependencyResult | EventsExceptionResult | EventsAvailabilityResultResult | EventsPerformanceCounterResult | EventsCustomMetricResult; /** - * @interface - * An interface representing EventsResultData. * Events query result data. - * */ export interface EventsResultData { /** - * @member {string} type Polymorphic Discriminator + * Polymorphic Discriminator */ type: "eventsResultData"; /** - * @member {string} [id] The unique ID for this event. + * The unique ID for this event. */ id?: string; /** - * @member {number} [count] Count of the event + * Count of the event */ count?: number; /** - * @member {Date} [timestamp] Timestamp of the event + * Timestamp of the event */ timestamp?: Date; /** - * @member {EventsResultDataCustomDimensions} [customDimensions] Custom - * dimensions of the event + * Custom dimensions of the event */ customDimensions?: EventsResultDataCustomDimensions; /** - * @member {EventsResultDataCustomMeasurements} [customMeasurements] Custom - * measurements of the event + * Custom measurements of the event */ customMeasurements?: EventsResultDataCustomMeasurements; /** - * @member {EventsOperationInfo} [operation] Operation info of the event + * Operation info of the event */ operation?: EventsOperationInfo; /** - * @member {EventsSessionInfo} [session] Session info of the event + * Session info of the event */ session?: EventsSessionInfo; /** - * @member {EventsUserInfo} [user] User info of the event + * User info of the event */ user?: EventsUserInfo; /** - * @member {EventsCloudInfo} [cloud] Cloud info of the event + * Cloud info of the event */ cloud?: EventsCloudInfo; /** - * @member {EventsAiInfo} [ai] AI info of the event + * AI info of the event */ ai?: EventsAiInfo; /** - * @member {EventsApplicationInfo} [application] Application info of the - * event + * Application info of the event */ application?: EventsApplicationInfo; /** - * @member {EventsClientInfo} [client] Client info of the event + * Client info of the event */ client?: EventsClientInfo; } /** - * @interface - * An interface representing EventsResults. * An events query result. - * */ export interface EventsResults { /** - * @member {string} [odatacontext] OData context metadata endpoint for this - * response + * OData context metadata endpoint for this response */ odatacontext?: string; /** - * @member {ErrorInfo[]} [aimessages] OData messages for this response. + * OData messages for this response. */ aimessages?: ErrorInfo[]; /** - * @member {EventsResultDataUnion[]} [value] Contents of the events query - * result. + * Contents of the events query result. */ value?: EventsResultDataUnion[]; } /** - * @interface - * An interface representing EventsResult. * An event query result. - * */ export interface EventsResult { /** - * @member {ErrorInfo[]} [aimessages] OData messages for this response. + * OData messages for this response. */ aimessages?: ErrorInfo[]; - /** - * @member {EventsResultDataUnion} [value] - */ value?: EventsResultDataUnion; } /** - * @interface - * An interface representing EventsTraceInfo. * The trace information - * */ export interface EventsTraceInfo { /** - * @member {string} [message] The trace message + * The trace message */ message?: string; /** - * @member {number} [severityLevel] The trace severity level + * The trace severity level */ severityLevel?: number; } /** - * @interface - * An interface representing EventsTraceResult. * A trace result - * */ export interface EventsTraceResult { /** - * @member {string} type Polymorphic Discriminator + * Polymorphic Discriminator */ type: "trace"; /** - * @member {string} [id] The unique ID for this event. + * The unique ID for this event. */ id?: string; /** - * @member {number} [count] Count of the event + * Count of the event */ count?: number; /** - * @member {Date} [timestamp] Timestamp of the event + * Timestamp of the event */ timestamp?: Date; /** - * @member {EventsResultDataCustomDimensions} [customDimensions] Custom - * dimensions of the event + * Custom dimensions of the event */ customDimensions?: EventsResultDataCustomDimensions; /** - * @member {EventsResultDataCustomMeasurements} [customMeasurements] Custom - * measurements of the event + * Custom measurements of the event */ customMeasurements?: EventsResultDataCustomMeasurements; /** - * @member {EventsOperationInfo} [operation] Operation info of the event + * Operation info of the event */ operation?: EventsOperationInfo; /** - * @member {EventsSessionInfo} [session] Session info of the event + * Session info of the event */ session?: EventsSessionInfo; /** - * @member {EventsUserInfo} [user] User info of the event + * User info of the event */ user?: EventsUserInfo; /** - * @member {EventsCloudInfo} [cloud] Cloud info of the event + * Cloud info of the event */ cloud?: EventsCloudInfo; /** - * @member {EventsAiInfo} [ai] AI info of the event + * AI info of the event */ ai?: EventsAiInfo; /** - * @member {EventsApplicationInfo} [application] Application info of the - * event + * Application info of the event */ application?: EventsApplicationInfo; /** - * @member {EventsClientInfo} [client] Client info of the event + * Client info of the event */ client?: EventsClientInfo; - /** - * @member {EventsTraceInfo} [trace] - */ trace?: EventsTraceInfo; } /** - * @interface - * An interface representing EventsCustomEventInfo. * The custom event information - * */ export interface EventsCustomEventInfo { /** - * @member {string} [name] The name of the custom event + * The name of the custom event */ name?: string; } /** - * @interface - * An interface representing EventsCustomEventResult. * A custom event result - * */ export interface EventsCustomEventResult { /** - * @member {string} type Polymorphic Discriminator + * Polymorphic Discriminator */ type: "customEvent"; /** - * @member {string} [id] The unique ID for this event. + * The unique ID for this event. */ id?: string; /** - * @member {number} [count] Count of the event + * Count of the event */ count?: number; /** - * @member {Date} [timestamp] Timestamp of the event + * Timestamp of the event */ timestamp?: Date; /** - * @member {EventsResultDataCustomDimensions} [customDimensions] Custom - * dimensions of the event + * Custom dimensions of the event */ customDimensions?: EventsResultDataCustomDimensions; /** - * @member {EventsResultDataCustomMeasurements} [customMeasurements] Custom - * measurements of the event + * Custom measurements of the event */ customMeasurements?: EventsResultDataCustomMeasurements; /** - * @member {EventsOperationInfo} [operation] Operation info of the event + * Operation info of the event */ operation?: EventsOperationInfo; /** - * @member {EventsSessionInfo} [session] Session info of the event + * Session info of the event */ session?: EventsSessionInfo; /** - * @member {EventsUserInfo} [user] User info of the event + * User info of the event */ user?: EventsUserInfo; /** - * @member {EventsCloudInfo} [cloud] Cloud info of the event + * Cloud info of the event */ cloud?: EventsCloudInfo; /** - * @member {EventsAiInfo} [ai] AI info of the event + * AI info of the event */ ai?: EventsAiInfo; /** - * @member {EventsApplicationInfo} [application] Application info of the - * event + * Application info of the event */ application?: EventsApplicationInfo; /** - * @member {EventsClientInfo} [client] Client info of the event + * Client info of the event */ client?: EventsClientInfo; - /** - * @member {EventsCustomEventInfo} [customEvent] - */ customEvent?: EventsCustomEventInfo; } /** - * @interface - * An interface representing EventsPageViewInfo. * The page view information - * */ export interface EventsPageViewInfo { /** - * @member {string} [name] The name of the page + * The name of the page */ name?: string; /** - * @member {string} [url] The URL of the page + * The URL of the page */ url?: string; /** - * @member {string} [duration] The duration of the page view + * The duration of the page view */ duration?: string; /** - * @member {string} [performanceBucket] The performance bucket of the page - * view + * The performance bucket of the page view */ performanceBucket?: string; } /** - * @interface - * An interface representing EventsPageViewResult. * A page view result - * */ export interface EventsPageViewResult { /** - * @member {string} type Polymorphic Discriminator + * Polymorphic Discriminator */ type: "pageView"; /** - * @member {string} [id] The unique ID for this event. + * The unique ID for this event. */ id?: string; /** - * @member {number} [count] Count of the event + * Count of the event */ count?: number; /** - * @member {Date} [timestamp] Timestamp of the event + * Timestamp of the event */ timestamp?: Date; /** - * @member {EventsResultDataCustomDimensions} [customDimensions] Custom - * dimensions of the event + * Custom dimensions of the event */ customDimensions?: EventsResultDataCustomDimensions; /** - * @member {EventsResultDataCustomMeasurements} [customMeasurements] Custom - * measurements of the event + * Custom measurements of the event */ customMeasurements?: EventsResultDataCustomMeasurements; /** - * @member {EventsOperationInfo} [operation] Operation info of the event + * Operation info of the event */ operation?: EventsOperationInfo; /** - * @member {EventsSessionInfo} [session] Session info of the event + * Session info of the event */ session?: EventsSessionInfo; /** - * @member {EventsUserInfo} [user] User info of the event + * User info of the event */ user?: EventsUserInfo; /** - * @member {EventsCloudInfo} [cloud] Cloud info of the event + * Cloud info of the event */ cloud?: EventsCloudInfo; /** - * @member {EventsAiInfo} [ai] AI info of the event + * AI info of the event */ ai?: EventsAiInfo; /** - * @member {EventsApplicationInfo} [application] Application info of the - * event + * Application info of the event */ application?: EventsApplicationInfo; /** - * @member {EventsClientInfo} [client] Client info of the event + * Client info of the event */ client?: EventsClientInfo; - /** - * @member {EventsPageViewInfo} [pageView] - */ pageView?: EventsPageViewInfo; } /** - * @interface - * An interface representing EventsBrowserTimingInfo. * The browser timing information - * */ export interface EventsBrowserTimingInfo { /** - * @member {string} [urlPath] The path of the URL + * The path of the URL */ urlPath?: string; /** - * @member {string} [urlHost] The host of the URL + * The host of the URL */ urlHost?: string; /** - * @member {string} [name] The name of the page + * The name of the page */ name?: string; /** - * @member {string} [url] The url of the page + * The url of the page */ url?: string; /** - * @member {number} [totalDuration] The total duration of the load + * The total duration of the load */ totalDuration?: number; /** - * @member {string} [performanceBucket] The performance bucket of the load + * The performance bucket of the load */ performanceBucket?: string; /** - * @member {number} [networkDuration] The network duration of the load + * The network duration of the load */ networkDuration?: number; /** - * @member {number} [sendDuration] The send duration of the load + * The send duration of the load */ sendDuration?: number; /** - * @member {number} [receiveDuration] The receive duration of the load + * The receive duration of the load */ receiveDuration?: number; /** - * @member {number} [processingDuration] The processing duration of the load + * The processing duration of the load */ processingDuration?: number; } /** - * @interface - * An interface representing EventsClientPerformanceInfo. * Client performance information - * */ export interface EventsClientPerformanceInfo { /** - * @member {string} [name] The name of the client performance + * The name of the client performance */ name?: string; } /** - * @interface - * An interface representing EventsBrowserTimingResult. * A browser timing result - * */ export interface EventsBrowserTimingResult { /** - * @member {string} type Polymorphic Discriminator + * Polymorphic Discriminator */ type: "browserTiming"; /** - * @member {string} [id] The unique ID for this event. + * The unique ID for this event. */ id?: string; /** - * @member {number} [count] Count of the event + * Count of the event */ count?: number; /** - * @member {Date} [timestamp] Timestamp of the event + * Timestamp of the event */ timestamp?: Date; /** - * @member {EventsResultDataCustomDimensions} [customDimensions] Custom - * dimensions of the event + * Custom dimensions of the event */ customDimensions?: EventsResultDataCustomDimensions; /** - * @member {EventsResultDataCustomMeasurements} [customMeasurements] Custom - * measurements of the event + * Custom measurements of the event */ customMeasurements?: EventsResultDataCustomMeasurements; /** - * @member {EventsOperationInfo} [operation] Operation info of the event + * Operation info of the event */ operation?: EventsOperationInfo; /** - * @member {EventsSessionInfo} [session] Session info of the event + * Session info of the event */ session?: EventsSessionInfo; /** - * @member {EventsUserInfo} [user] User info of the event + * User info of the event */ user?: EventsUserInfo; /** - * @member {EventsCloudInfo} [cloud] Cloud info of the event + * Cloud info of the event */ cloud?: EventsCloudInfo; /** - * @member {EventsAiInfo} [ai] AI info of the event + * AI info of the event */ ai?: EventsAiInfo; /** - * @member {EventsApplicationInfo} [application] Application info of the - * event + * Application info of the event */ application?: EventsApplicationInfo; /** - * @member {EventsClientInfo} [client] Client info of the event + * Client info of the event */ client?: EventsClientInfo; - /** - * @member {EventsBrowserTimingInfo} [browserTiming] - */ browserTiming?: EventsBrowserTimingInfo; - /** - * @member {EventsClientPerformanceInfo} [clientPerformance] - */ clientPerformance?: EventsClientPerformanceInfo; } /** - * @interface - * An interface representing EventsRequestInfo. * The request info - * */ export interface EventsRequestInfo { /** - * @member {string} [name] The name of the request + * The name of the request */ name?: string; /** - * @member {string} [url] The URL of the request + * The URL of the request */ url?: string; /** - * @member {string} [success] Indicates if the request was successful + * Indicates if the request was successful */ success?: string; /** - * @member {number} [duration] The duration of the request + * The duration of the request */ duration?: number; /** - * @member {string} [performanceBucket] The performance bucket of the request + * The performance bucket of the request */ performanceBucket?: string; /** - * @member {string} [resultCode] The result code of the request + * The result code of the request */ resultCode?: string; /** - * @member {string} [source] The source of the request + * The source of the request */ source?: string; /** - * @member {string} [id] The ID of the request + * The ID of the request */ id?: string; } /** - * @interface - * An interface representing EventsRequestResult. * A request result - * */ export interface EventsRequestResult { /** - * @member {string} type Polymorphic Discriminator + * Polymorphic Discriminator */ type: "request"; /** - * @member {string} [id] The unique ID for this event. + * The unique ID for this event. */ id?: string; /** - * @member {number} [count] Count of the event + * Count of the event */ count?: number; /** - * @member {Date} [timestamp] Timestamp of the event + * Timestamp of the event */ timestamp?: Date; /** - * @member {EventsResultDataCustomDimensions} [customDimensions] Custom - * dimensions of the event + * Custom dimensions of the event */ customDimensions?: EventsResultDataCustomDimensions; /** - * @member {EventsResultDataCustomMeasurements} [customMeasurements] Custom - * measurements of the event + * Custom measurements of the event */ customMeasurements?: EventsResultDataCustomMeasurements; /** - * @member {EventsOperationInfo} [operation] Operation info of the event + * Operation info of the event */ operation?: EventsOperationInfo; /** - * @member {EventsSessionInfo} [session] Session info of the event + * Session info of the event */ session?: EventsSessionInfo; /** - * @member {EventsUserInfo} [user] User info of the event + * User info of the event */ user?: EventsUserInfo; /** - * @member {EventsCloudInfo} [cloud] Cloud info of the event + * Cloud info of the event */ cloud?: EventsCloudInfo; /** - * @member {EventsAiInfo} [ai] AI info of the event + * AI info of the event */ ai?: EventsAiInfo; /** - * @member {EventsApplicationInfo} [application] Application info of the - * event + * Application info of the event */ application?: EventsApplicationInfo; /** - * @member {EventsClientInfo} [client] Client info of the event + * Client info of the event */ client?: EventsClientInfo; - /** - * @member {EventsRequestInfo} [request] - */ request?: EventsRequestInfo; } /** - * @interface - * An interface representing EventsDependencyInfo. * The dependency info - * */ export interface EventsDependencyInfo { /** - * @member {string} [target] The target of the dependency + * The target of the dependency */ target?: string; /** - * @member {string} [data] The data of the dependency + * The data of the dependency */ data?: string; /** - * @member {string} [success] Indicates if the dependency was successful + * Indicates if the dependency was successful */ success?: string; /** - * @member {number} [duration] The duration of the dependency + * The duration of the dependency */ duration?: number; /** - * @member {string} [performanceBucket] The performance bucket of the - * dependency + * The performance bucket of the dependency */ performanceBucket?: string; /** - * @member {string} [resultCode] The result code of the dependency + * The result code of the dependency */ resultCode?: string; /** - * @member {string} [type] The type of the dependency + * The type of the dependency */ type?: string; /** - * @member {string} [name] The name of the dependency + * The name of the dependency */ name?: string; /** - * @member {string} [id] The ID of the dependency + * The ID of the dependency */ id?: string; } /** - * @interface - * An interface representing EventsDependencyResult. * A dependency result - * */ export interface EventsDependencyResult { /** - * @member {string} type Polymorphic Discriminator + * Polymorphic Discriminator */ type: "dependency"; /** - * @member {string} [id] The unique ID for this event. + * The unique ID for this event. */ id?: string; /** - * @member {number} [count] Count of the event + * Count of the event */ count?: number; /** - * @member {Date} [timestamp] Timestamp of the event + * Timestamp of the event */ timestamp?: Date; /** - * @member {EventsResultDataCustomDimensions} [customDimensions] Custom - * dimensions of the event + * Custom dimensions of the event */ customDimensions?: EventsResultDataCustomDimensions; /** - * @member {EventsResultDataCustomMeasurements} [customMeasurements] Custom - * measurements of the event + * Custom measurements of the event */ customMeasurements?: EventsResultDataCustomMeasurements; /** - * @member {EventsOperationInfo} [operation] Operation info of the event + * Operation info of the event */ operation?: EventsOperationInfo; /** - * @member {EventsSessionInfo} [session] Session info of the event + * Session info of the event */ session?: EventsSessionInfo; /** - * @member {EventsUserInfo} [user] User info of the event + * User info of the event */ user?: EventsUserInfo; /** - * @member {EventsCloudInfo} [cloud] Cloud info of the event + * Cloud info of the event */ cloud?: EventsCloudInfo; /** - * @member {EventsAiInfo} [ai] AI info of the event + * AI info of the event */ ai?: EventsAiInfo; /** - * @member {EventsApplicationInfo} [application] Application info of the - * event + * Application info of the event */ application?: EventsApplicationInfo; /** - * @member {EventsClientInfo} [client] Client info of the event + * Client info of the event */ client?: EventsClientInfo; - /** - * @member {EventsDependencyInfo} [dependency] - */ dependency?: EventsDependencyInfo; } /** - * @interface - * An interface representing EventsExceptionDetailsParsedStack. * A parsed stack entry - * */ export interface EventsExceptionDetailsParsedStack { /** - * @member {string} [assembly] The assembly of the stack entry + * The assembly of the stack entry */ assembly?: string; /** - * @member {string} [method] The method of the stack entry + * The method of the stack entry */ method?: string; /** - * @member {number} [level] The level of the stack entry + * The level of the stack entry */ level?: number; /** - * @member {number} [line] The line of the stack entry + * The line of the stack entry */ line?: number; } /** - * @interface - * An interface representing EventsExceptionDetail. * Exception details - * */ export interface EventsExceptionDetail { /** - * @member {string} [severityLevel] The severity level of the exception - * detail + * The severity level of the exception detail */ severityLevel?: string; /** - * @member {string} [outerId] The outer ID of the exception detail + * The outer ID of the exception detail */ outerId?: string; /** - * @member {string} [message] The message of the exception detail + * The message of the exception detail */ message?: string; /** - * @member {string} [type] The type of the exception detail + * The type of the exception detail */ type?: string; /** - * @member {string} [id] The ID of the exception detail + * The ID of the exception detail */ id?: string; /** - * @member {EventsExceptionDetailsParsedStack[]} [parsedStack] The parsed - * stack + * The parsed stack */ parsedStack?: EventsExceptionDetailsParsedStack[]; } /** - * @interface - * An interface representing EventsExceptionInfo. * The exception info - * */ export interface EventsExceptionInfo { /** - * @member {number} [severityLevel] The severity level of the exception + * The severity level of the exception */ severityLevel?: number; /** - * @member {string} [problemId] The problem ID of the exception + * The problem ID of the exception */ problemId?: string; /** - * @member {string} [handledAt] Indicates where the exception was handled at + * Indicates where the exception was handled at */ handledAt?: string; /** - * @member {string} [assembly] The assembly which threw the exception + * The assembly which threw the exception */ assembly?: string; /** - * @member {string} [method] The method that threw the exception + * The method that threw the exception */ method?: string; /** - * @member {string} [message] The message of the exception + * The message of the exception */ message?: string; /** - * @member {string} [type] The type of the exception + * The type of the exception */ type?: string; /** - * @member {string} [outerType] The outer type of the exception + * The outer type of the exception */ outerType?: string; /** - * @member {string} [outerMethod] The outer method of the exception + * The outer method of the exception */ outerMethod?: string; /** - * @member {string} [outerAssembly] The outer assmebly of the exception + * The outer assembly of the exception */ outerAssembly?: string; /** - * @member {string} [outerMessage] The outer message of the exception + * The outer message of the exception */ outerMessage?: string; /** - * @member {string} [innermostType] The inner most type of the exception + * The inner most type of the exception */ innermostType?: string; /** - * @member {string} [innermostMessage] The inner most message of the - * exception + * The inner most message of the exception */ innermostMessage?: string; /** - * @member {string} [innermostMethod] The inner most method of the exception + * The inner most method of the exception */ innermostMethod?: string; /** - * @member {string} [innermostAssembly] The inner most assembly of the - * exception + * The inner most assembly of the exception */ innermostAssembly?: string; /** - * @member {EventsExceptionDetail[]} [details] The details of the exception + * The details of the exception */ details?: EventsExceptionDetail[]; } /** - * @interface - * An interface representing EventsExceptionResult. * An exception result - * */ export interface EventsExceptionResult { /** - * @member {string} type Polymorphic Discriminator + * Polymorphic Discriminator */ type: "exception"; /** - * @member {string} [id] The unique ID for this event. + * The unique ID for this event. */ id?: string; /** - * @member {number} [count] Count of the event + * Count of the event */ count?: number; /** - * @member {Date} [timestamp] Timestamp of the event + * Timestamp of the event */ timestamp?: Date; /** - * @member {EventsResultDataCustomDimensions} [customDimensions] Custom - * dimensions of the event + * Custom dimensions of the event */ customDimensions?: EventsResultDataCustomDimensions; /** - * @member {EventsResultDataCustomMeasurements} [customMeasurements] Custom - * measurements of the event + * Custom measurements of the event */ customMeasurements?: EventsResultDataCustomMeasurements; /** - * @member {EventsOperationInfo} [operation] Operation info of the event + * Operation info of the event */ operation?: EventsOperationInfo; /** - * @member {EventsSessionInfo} [session] Session info of the event + * Session info of the event */ session?: EventsSessionInfo; /** - * @member {EventsUserInfo} [user] User info of the event + * User info of the event */ user?: EventsUserInfo; /** - * @member {EventsCloudInfo} [cloud] Cloud info of the event + * Cloud info of the event */ cloud?: EventsCloudInfo; /** - * @member {EventsAiInfo} [ai] AI info of the event + * AI info of the event */ ai?: EventsAiInfo; /** - * @member {EventsApplicationInfo} [application] Application info of the - * event + * Application info of the event */ application?: EventsApplicationInfo; /** - * @member {EventsClientInfo} [client] Client info of the event + * Client info of the event */ client?: EventsClientInfo; - /** - * @member {EventsExceptionInfo} [exception] - */ exception?: EventsExceptionInfo; } /** - * @interface - * An interface representing EventsAvailabilityResultInfo. * The availability result info - * */ export interface EventsAvailabilityResultInfo { /** - * @member {string} [name] The name of the availability result + * The name of the availability result */ name?: string; /** - * @member {string} [success] Indicates if the availability result was - * successful + * Indicates if the availability result was successful */ success?: string; /** - * @member {number} [duration] The duration of the availability result + * The duration of the availability result */ duration?: number; /** - * @member {string} [performanceBucket] The performance bucket of the - * availability result + * The performance bucket of the availability result */ performanceBucket?: string; /** - * @member {string} [message] The message of the availability result + * The message of the availability result */ message?: string; /** - * @member {string} [location] The location of the availability result + * The location of the availability result */ location?: string; /** - * @member {string} [id] The ID of the availability result + * The ID of the availability result */ id?: string; /** - * @member {string} [size] The size of the availability result + * The size of the availability result */ size?: string; } /** - * @interface - * An interface representing EventsAvailabilityResultResult. * An availability result result - * */ export interface EventsAvailabilityResultResult { /** - * @member {string} type Polymorphic Discriminator + * Polymorphic Discriminator */ type: "availabilityResult"; /** - * @member {string} [id] The unique ID for this event. + * The unique ID for this event. */ id?: string; /** - * @member {number} [count] Count of the event + * Count of the event */ count?: number; /** - * @member {Date} [timestamp] Timestamp of the event + * Timestamp of the event */ timestamp?: Date; /** - * @member {EventsResultDataCustomDimensions} [customDimensions] Custom - * dimensions of the event + * Custom dimensions of the event */ customDimensions?: EventsResultDataCustomDimensions; /** - * @member {EventsResultDataCustomMeasurements} [customMeasurements] Custom - * measurements of the event + * Custom measurements of the event */ customMeasurements?: EventsResultDataCustomMeasurements; /** - * @member {EventsOperationInfo} [operation] Operation info of the event + * Operation info of the event */ operation?: EventsOperationInfo; /** - * @member {EventsSessionInfo} [session] Session info of the event + * Session info of the event */ session?: EventsSessionInfo; /** - * @member {EventsUserInfo} [user] User info of the event + * User info of the event */ user?: EventsUserInfo; /** - * @member {EventsCloudInfo} [cloud] Cloud info of the event + * Cloud info of the event */ cloud?: EventsCloudInfo; /** - * @member {EventsAiInfo} [ai] AI info of the event + * AI info of the event */ ai?: EventsAiInfo; /** - * @member {EventsApplicationInfo} [application] Application info of the - * event + * Application info of the event */ application?: EventsApplicationInfo; /** - * @member {EventsClientInfo} [client] Client info of the event + * Client info of the event */ client?: EventsClientInfo; - /** - * @member {EventsAvailabilityResultInfo} [availabilityResult] - */ availabilityResult?: EventsAvailabilityResultInfo; } /** - * @interface - * An interface representing EventsPerformanceCounterInfo. * The performance counter info - * */ export interface EventsPerformanceCounterInfo { /** - * @member {number} [value] The value of the performance counter + * The value of the performance counter */ value?: number; /** - * @member {string} [name] The name of the performance counter + * The name of the performance counter */ name?: string; /** - * @member {string} [category] The category of the performance counter + * The category of the performance counter */ category?: string; /** - * @member {string} [counter] The counter of the performance counter + * The counter of the performance counter */ counter?: string; /** - * @member {string} [instanceName] The instance name of the performance - * counter + * The instance name of the performance counter */ instanceName?: string; /** - * @member {string} [instance] The instance of the performance counter + * The instance of the performance counter */ instance?: string; } /** - * @interface - * An interface representing EventsPerformanceCounterResult. * A performance counter result - * */ export interface EventsPerformanceCounterResult { /** - * @member {string} type Polymorphic Discriminator + * Polymorphic Discriminator */ type: "performanceCounter"; /** - * @member {string} [id] The unique ID for this event. + * The unique ID for this event. */ id?: string; /** - * @member {number} [count] Count of the event + * Count of the event */ count?: number; /** - * @member {Date} [timestamp] Timestamp of the event + * Timestamp of the event */ timestamp?: Date; /** - * @member {EventsResultDataCustomDimensions} [customDimensions] Custom - * dimensions of the event + * Custom dimensions of the event */ customDimensions?: EventsResultDataCustomDimensions; /** - * @member {EventsResultDataCustomMeasurements} [customMeasurements] Custom - * measurements of the event + * Custom measurements of the event */ customMeasurements?: EventsResultDataCustomMeasurements; /** - * @member {EventsOperationInfo} [operation] Operation info of the event + * Operation info of the event */ operation?: EventsOperationInfo; /** - * @member {EventsSessionInfo} [session] Session info of the event + * Session info of the event */ session?: EventsSessionInfo; /** - * @member {EventsUserInfo} [user] User info of the event + * User info of the event */ user?: EventsUserInfo; /** - * @member {EventsCloudInfo} [cloud] Cloud info of the event + * Cloud info of the event */ cloud?: EventsCloudInfo; /** - * @member {EventsAiInfo} [ai] AI info of the event + * AI info of the event */ ai?: EventsAiInfo; /** - * @member {EventsApplicationInfo} [application] Application info of the - * event + * Application info of the event */ application?: EventsApplicationInfo; /** - * @member {EventsClientInfo} [client] Client info of the event + * Client info of the event */ client?: EventsClientInfo; - /** - * @member {EventsPerformanceCounterInfo} [performanceCounter] - */ performanceCounter?: EventsPerformanceCounterInfo; } /** - * @interface - * An interface representing EventsCustomMetricInfo. * The custom metric info - * */ export interface EventsCustomMetricInfo { /** - * @member {string} [name] The name of the custom metric + * The name of the custom metric */ name?: string; /** - * @member {number} [value] The value of the custom metric + * The value of the custom metric */ value?: number; /** - * @member {number} [valueSum] The sum of the custom metric + * The sum of the custom metric */ valueSum?: number; /** - * @member {number} [valueCount] The count of the custom metric + * The count of the custom metric */ valueCount?: number; /** - * @member {number} [valueMin] The minimum value of the custom metric + * The minimum value of the custom metric */ valueMin?: number; /** - * @member {number} [valueMax] The maximum value of the custom metric + * The maximum value of the custom metric */ valueMax?: number; /** - * @member {number} [valueStdDev] The standard deviation of the custom metric + * The standard deviation of the custom metric */ valueStdDev?: number; } /** - * @interface - * An interface representing EventsCustomMetricResult. * A custom metric result - * */ export interface EventsCustomMetricResult { /** - * @member {string} type Polymorphic Discriminator + * Polymorphic Discriminator */ type: "customMetric"; /** - * @member {string} [id] The unique ID for this event. + * The unique ID for this event. */ id?: string; /** - * @member {number} [count] Count of the event + * Count of the event */ count?: number; /** - * @member {Date} [timestamp] Timestamp of the event + * Timestamp of the event */ timestamp?: Date; /** - * @member {EventsResultDataCustomDimensions} [customDimensions] Custom - * dimensions of the event + * Custom dimensions of the event */ customDimensions?: EventsResultDataCustomDimensions; /** - * @member {EventsResultDataCustomMeasurements} [customMeasurements] Custom - * measurements of the event + * Custom measurements of the event */ customMeasurements?: EventsResultDataCustomMeasurements; /** - * @member {EventsOperationInfo} [operation] Operation info of the event + * Operation info of the event */ operation?: EventsOperationInfo; /** - * @member {EventsSessionInfo} [session] Session info of the event + * Session info of the event */ session?: EventsSessionInfo; /** - * @member {EventsUserInfo} [user] User info of the event + * User info of the event */ user?: EventsUserInfo; /** - * @member {EventsCloudInfo} [cloud] Cloud info of the event + * Cloud info of the event */ cloud?: EventsCloudInfo; /** - * @member {EventsAiInfo} [ai] AI info of the event + * AI info of the event */ ai?: EventsAiInfo; /** - * @member {EventsApplicationInfo} [application] Application info of the - * event + * Application info of the event */ application?: EventsApplicationInfo; /** - * @member {EventsClientInfo} [client] Client info of the event + * Client info of the event */ client?: EventsClientInfo; - /** - * @member {EventsCustomMetricInfo} [customMetric] - */ customMetric?: EventsCustomMetricInfo; } /** - * @interface - * An interface representing QueryBody. * The Analytics query. Learn more about the [Analytics query * syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) - * */ export interface QueryBody { /** - * @member {string} query The query to execute. + * The query to execute. */ query: string; /** - * @member {string} [timespan] Optional. The timespan over which to query - * data. This is an ISO8601 time period value. This timespan is applied in - * addition to any that are specified in the query expression. + * Optional. The timespan over which to query data. This is an ISO8601 time period value. This + * timespan is applied in addition to any that are specified in the query expression. */ timespan?: string; /** - * @member {string[]} [applications] A list of Application IDs for - * cross-application queries. + * A list of Application IDs for cross-application queries. */ applications?: string[]; } /** - * @interface - * An interface representing Column. - * @summary A table column. - * * A column in a table. - * + * @summary A table column. */ export interface Column { /** - * @member {string} [name] The name of this column. + * The name of this column. */ name?: string; /** - * @member {string} [type] The data type of this column. + * The data type of this column. */ type?: string; } /** - * @interface - * An interface representing Table. - * @summary A query response table. - * * Contains the columns and rows for one table in a query response. - * + * @summary A query response table. */ export interface Table { /** - * @member {string} name The name of the table. + * The name of the table. */ name: string; /** - * @member {Column[]} columns The list of columns in this table. + * The list of columns in this table. */ columns: Column[]; /** - * @member {any[][]} rows The resulting rows from this query. + * The resulting rows from this query. */ rows: any[][]; } /** - * @interface - * An interface representing QueryResults. - * @summary A query response. - * * Contains the tables, columns & rows resulting from a query. - * + * @summary A query response. */ export interface QueryResults { /** - * @member {Table[]} tables The list of tables, columns and rows. + * The list of tables, columns and rows. */ tables: Table[]; } /** - * @interface - * An interface representing ErrorResponse. - * @summary Error details. - * + * The table grouping can be either an Application Insights schema or a Log Analytics solution. + * @summary A group of tables. + */ +export interface MetadataTableGroup { + /** + * The ID of the table group + */ + id: string; + /** + * The name of the table group + */ + name: string; + /** + * The source of the table group, can be either AI or OMS for Log Analytics workspaces + */ + source?: string; + /** + * The display name of the table group + */ + displayName?: string; + /** + * The description of the table group + */ + description?: string; + /** + * The list of tables contained in the table group + */ + tables?: string[]; +} + +/** + * An interface representing MetadataTableColumnsItem. + */ +export interface MetadataTableColumnsItem { + /** + * The name of the column + */ + name: string; + /** + * The description of the column + */ + description?: string; + /** + * The data type of the column. Possible values include: 'bool', 'datetime', 'dynamic', 'int', + * 'long', 'real', 'string' + */ + type: MetadataColumnDataType; + /** + * A flag indicating this column is a preferred facet + */ + isPreferredFacet?: boolean; + /** + * an indication of the source of the column, used only when multiple apps have conflicting + * definition for the column + */ + source?: any; +} + +/** + * Tables are part of the app schema, and contain a list of columns and a reference to other + * relevant metadata items. + * @summary A data table that takes part in a schema of an Application Insights app. + */ +export interface MetadataTable { + /** + * The ID of the table + */ + id: string; + /** + * The name of the table + */ + name: string; + /** + * The description of the table + */ + description?: string; + /** + * The column associated with the timespan query parameter for the table + */ + timespanColumn?: string; + /** + * The list of columns defined on the table + */ + columns?: MetadataTableColumnsItem[]; +} + +/** + * Functions are stored Kusto queries that can be specified as part of queries by using their name. + * @summary A stored function. + */ +export interface MetadataFunction { + /** + * The ID of the function. + */ + id: string; + /** + * The name of the function, to be used in queries. + */ + name: string; + /** + * The parameters/arguments of the function, if any. + */ + parameters?: string; + /** + * The display name of the function. + */ + displayName?: string; + /** + * The description of the function. + */ + description?: string; + /** + * The KQL body of the function. + */ + body: string; +} + +/** + * Application Insights apps that were part of the metadata request and that the user has access + * to. + * @summary An Application Insights application. + */ +export interface MetadataApplication { + /** + * The ID of the Application Insights app. + */ + id: string; + /** + * The ARM resource ID of the Application Insights app. + */ + resourceId: string; + /** + * The name of the Application Insights app. + */ + name: string; + /** + * The Azure region of the Application Insights app. + */ + region: string; + /** + * The list of custom tables for the Application Insights app. + */ + tables?: string[]; + /** + * The list of stored functions on the Application Insights app + */ + functions?: string[]; + /** + * The list of table groups on the Application Insights app + */ + tableGroups?: string[]; +} + +/** + * The metadata result for the app, including available tables, etc. + * @summary A metadata response. + */ +export interface MetadataResults { + /** + * The list of groups of tables on the app. + */ + tableGroups?: MetadataTableGroup[]; + /** + * The list of tables and columns that comprise the schema of the app. + */ + tables?: MetadataTable[]; + /** + * The list of functions stored on the app. + */ + functions?: MetadataFunction[]; + /** + * The list of Application Insights apps that were referenced in the metadata request. + */ + applications?: MetadataApplication[]; +} + +/** * Contains details when the response code indicates an error. - * + * @summary Error details. */ export interface ErrorResponse { /** - * @member {ErrorInfo} error The error details. + * The error details. */ error: ErrorInfo; } /** - * @interface * An interface representing ApplicationInsightsDataClientOptions. - * @extends ServiceClientOptions */ export interface ApplicationInsightsDataClientOptions extends ServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } /** - * @interface - * An interface representing MetricsGetOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface MetricsGetOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [timespan] The timespan over which to retrieve metric - * values. This is an ISO8601 time period value. If timespan is omitted, a - * default time range of `PT12H` ("last 12 hours") is used. The actual - * timespan that is queried may be adjusted by the server based. In all - * cases, the actual time span used for the query is included in the - * response. + * The timespan over which to retrieve metric values. This is an ISO8601 time period value. If + * timespan is omitted, a default time range of `PT12H` ("last 12 hours") is used. The actual + * timespan that is queried may be adjusted by the server based. In all cases, the actual time + * span used for the query is included in the response. */ timespan?: string; /** - * @member {string} [interval] The time interval to use when retrieving - * metric values. This is an ISO8601 duration. If interval is omitted, the - * metric value is aggregated across the entire timespan. If interval is - * supplied, the server may adjust the interval to a more appropriate size - * based on the timespan used for the query. In all cases, the actual - * interval used for the query is included in the response. + * The time interval to use when retrieving metric values. This is an ISO8601 duration. If + * interval is omitted, the metric value is aggregated across the entire timespan. If interval is + * supplied, the server may adjust the interval to a more appropriate size based on the timespan + * used for the query. In all cases, the actual interval used for the query is included in the + * response. */ interval?: string; /** - * @member {MetricsAggregation[]} [aggregation] The aggregation to use when - * computing the metric values. To retrieve more than one aggregation at a - * time, separate them with a comma. If no aggregation is specified, then the - * default aggregation for the metric is used. + * The aggregation to use when computing the metric values. To retrieve more than one aggregation + * at a time, separate them with a comma. If no aggregation is specified, then the default + * aggregation for the metric is used. */ aggregation?: MetricsAggregation[]; /** - * @member {MetricsSegment[]} [segment] The name of the dimension to segment - * the metric values by. This dimension must be applicable to the metric you - * are retrieving. To segment by more than one dimension at a time, separate - * them with a comma (,). In this case, the metric data will be segmented in - * the order the dimensions are listed in the parameter. + * The name of the dimension to segment the metric values by. This dimension must be applicable + * to the metric you are retrieving. To segment by more than one dimension at a time, separate + * them with a comma (,). In this case, the metric data will be segmented in the order the + * dimensions are listed in the parameter. */ segment?: MetricsSegment[]; /** - * @member {number} [top] The number of segments to return. This value is - * only valid when segment is specified. + * The number of segments to return. This value is only valid when segment is specified. */ top?: number; /** - * @member {string} [orderby] The aggregation function and direction to sort - * the segments by. This value is only valid when segment is specified. + * The aggregation function and direction to sort the segments by. This value is only valid when + * segment is specified. */ orderby?: string; /** - * @member {string} [filter] An expression used to filter the results. This - * value should be a valid OData filter expression where the keys of each - * clause should be applicable dimensions for the metric you are retrieving. + * An expression used to filter the results. This value should be a valid OData filter + * expression where the keys of each clause should be applicable dimensions for the metric you + * are retrieving. */ filter?: string; } /** - * @interface - * An interface representing EventsGetByTypeOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface EventsGetByTypeOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [timespan] Optional. The timespan over which to retrieve - * events. This is an ISO8601 time period value. This timespan is applied in - * addition to any that are specified in the Odata expression. + * Optional. The timespan over which to retrieve events. This is an ISO8601 time period value. + * This timespan is applied in addition to any that are specified in the Odata expression. */ timespan?: string; /** - * @member {string} [filter] An expression used to filter the returned events + * An expression used to filter the returned events */ filter?: string; /** - * @member {string} [search] A free-text search expression to match for - * whether a particular event should be returned + * A free-text search expression to match for whether a particular event should be returned */ search?: string; /** - * @member {string} [orderby] A comma-separated list of properties with - * \"asc\" (the default) or \"desc\" to control the order of returned events + * A comma-separated list of properties with \"asc\" (the default) or \"desc\" to control the + * order of returned events */ orderby?: string; /** - * @member {string} [select] Limits the properties to just those requested on - * each returned event + * Limits the properties to just those requested on each returned event */ select?: string; /** - * @member {number} [skip] The number of items to skip over before returning - * events + * The number of items to skip over before returning events */ skip?: number; /** - * @member {number} [top] The number of events to return + * The number of events to return */ top?: number; /** - * @member {string} [format] Format for the returned events + * Format for the returned events */ format?: string; /** - * @member {boolean} [count] Request a count of matching items included with - * the returned events + * Request a count of matching items included with the returned events */ count?: boolean; /** - * @member {string} [apply] An expression used for aggregation over returned - * events + * An expression used for aggregation over returned events */ apply?: string; } /** - * @interface - * An interface representing EventsGetOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface EventsGetOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [timespan] Optional. The timespan over which to retrieve - * events. This is an ISO8601 time period value. This timespan is applied in - * addition to any that are specified in the Odata expression. + * Optional. The timespan over which to retrieve events. This is an ISO8601 time period value. + * This timespan is applied in addition to any that are specified in the Odata expression. */ timespan?: string; } @@ -1966,6 +1830,14 @@ export type MetricsSegment = 'applicationBuild' | 'applicationVersion' | 'authen */ export type EventType = '$all' | 'traces' | 'customEvents' | 'pageViews' | 'browserTimings' | 'requests' | 'dependencies' | 'exceptions' | 'availabilityResults' | 'performanceCounters' | 'customMetrics'; +/** + * Defines values for MetadataColumnDataType. + * Possible values include: 'bool', 'datetime', 'dynamic', 'int', 'long', 'real', 'string' + * @readonly + * @enum {string} + */ +export type MetadataColumnDataType = 'bool' | 'datetime' | 'dynamic' | 'int' | 'long' | 'real' | 'string'; + /** * Contains response data for the get operation. */ @@ -1978,6 +1850,7 @@ export type MetricsGetResponse = MetricsResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1997,6 +1870,7 @@ export type MetricsGetMultipleResponse = Array & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2012,6 +1886,7 @@ export type MetricsGetMetadataResponse = { * The parsed response body. */ body: any; + /** * The underlying HTTP response. */ @@ -2020,6 +1895,7 @@ export type MetricsGetMetadataResponse = { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2039,6 +1915,7 @@ export type EventsGetByTypeResponse = EventsResults & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2058,6 +1935,7 @@ export type EventsGetResponse = EventsResults & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2077,9 +1955,50 @@ export type QueryExecuteResponse = QueryResults & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ parsedBody: QueryResults; }; }; + +/** + * Contains response data for the metadata operation. + */ +export type PostMetadataResponse = MetadataResults & { + /** + * 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: MetadataResults; + }; +}; + +/** + * Contains response data for the metadata operation. + */ +export type GetMetadataResponse = MetadataResults & { + /** + * 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: MetadataResults; + }; +}; diff --git a/sdk/applicationinsights/applicationinsights-query/src/models/mappers.ts b/sdk/applicationinsights/applicationinsights-query/src/models/mappers.ts index 41143e2b862a..58a26d481a88 100644 --- a/sdk/applicationinsights/applicationinsights-query/src/models/mappers.ts +++ b/sdk/applicationinsights/applicationinsights-query/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as msRest from "@azure/ms-rest-js"; @@ -1734,6 +1732,339 @@ export const QueryResults: msRest.CompositeMapper = { } }; +export const MetadataTableGroup: msRest.CompositeMapper = { + serializedName: "metadataTableGroup", + type: { + name: "Composite", + className: "MetadataTableGroup", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + source: { + serializedName: "source", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + tables: { + serializedName: "tables", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MetadataTableColumnsItem: msRest.CompositeMapper = { + serializedName: "metadataTable_columnsItem", + type: { + name: "Composite", + className: "MetadataTableColumnsItem", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + }, + isPreferredFacet: { + serializedName: "isPreferredFacet", + type: { + name: "Boolean" + } + }, + source: { + serializedName: "source", + type: { + name: "Object" + } + } + } + } +}; + +export const MetadataTable: msRest.CompositeMapper = { + serializedName: "metadataTable", + type: { + name: "Composite", + className: "MetadataTable", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + timespanColumn: { + serializedName: "timespanColumn", + type: { + name: "String" + } + }, + columns: { + serializedName: "columns", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetadataTableColumnsItem" + } + } + } + } + } + } +}; + +export const MetadataFunction: msRest.CompositeMapper = { + serializedName: "metadataFunction", + type: { + name: "Composite", + className: "MetadataFunction", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + parameters: { + serializedName: "parameters", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + body: { + required: true, + serializedName: "body", + type: { + name: "String" + } + } + } + } +}; + +export const MetadataApplication: msRest.CompositeMapper = { + serializedName: "metadataApplication", + type: { + name: "Composite", + className: "MetadataApplication", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + resourceId: { + required: true, + serializedName: "resourceId", + type: { + name: "String" + } + }, + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + region: { + required: true, + serializedName: "region", + type: { + name: "String" + } + }, + tables: { + serializedName: "tables", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + functions: { + serializedName: "functions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + tableGroups: { + serializedName: "tableGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MetadataResults: msRest.CompositeMapper = { + serializedName: "metadataResults", + type: { + name: "Composite", + className: "MetadataResults", + modelProperties: { + tableGroups: { + serializedName: "tableGroups", + constraints: { + UniqueItems: true + }, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetadataTableGroup" + } + } + } + }, + tables: { + serializedName: "tables", + constraints: { + UniqueItems: true + }, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetadataTable" + } + } + } + }, + functions: { + serializedName: "functions", + constraints: { + UniqueItems: true + }, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetadataFunction" + } + } + } + }, + applications: { + serializedName: "applications", + constraints: { + UniqueItems: true + }, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetadataApplication" + } + } + } + } + } + } +}; + export const ErrorResponse: msRest.CompositeMapper = { serializedName: "errorResponse", type: { @@ -1764,4 +2095,5 @@ export const discriminators = { 'EventsResultData.availabilityResult' : EventsAvailabilityResultResult, 'EventsResultData.performanceCounter' : EventsPerformanceCounterResult, 'EventsResultData.customMetric' : EventsCustomMetricResult + }; diff --git a/sdk/applicationinsights/applicationinsights-query/src/models/metricsMappers.ts b/sdk/applicationinsights/applicationinsights-query/src/models/metricsMappers.ts index 63828bb2eb67..7efa25701e61 100644 --- a/sdk/applicationinsights/applicationinsights-query/src/models/metricsMappers.ts +++ b/sdk/applicationinsights/applicationinsights-query/src/models/metricsMappers.ts @@ -1,23 +1,20 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - MetricsResult, - MetricsResultInfo, - MetricsSegmentInfo, - ErrorResponse, - ErrorInfo, ErrorDetail, + ErrorInfo, + ErrorResponse, MetricsPostBodySchema, MetricsPostBodySchemaParameters, - MetricsResultsItem + MetricsResult, + MetricsResultInfo, + MetricsResultsItem, + MetricsSegmentInfo } from "../models/mappers"; - diff --git a/sdk/applicationinsights/applicationinsights-query/src/models/postMappers.ts b/sdk/applicationinsights/applicationinsights-query/src/models/postMappers.ts new file mode 100644 index 000000000000..db864c3dc3ed --- /dev/null +++ b/sdk/applicationinsights/applicationinsights-query/src/models/postMappers.ts @@ -0,0 +1,20 @@ +/* + * 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 { + discriminators, + ErrorDetail, + ErrorInfo, + ErrorResponse, + MetadataApplication, + MetadataFunction, + MetadataResults, + MetadataTable, + MetadataTableColumnsItem, + MetadataTableGroup +} from "../models/mappers"; diff --git a/sdk/applicationinsights/applicationinsights-query/src/models/queryMappers.ts b/sdk/applicationinsights/applicationinsights-query/src/models/queryMappers.ts index a2bf85da4560..cd3d1ffea4f0 100644 --- a/sdk/applicationinsights/applicationinsights-query/src/models/queryMappers.ts +++ b/sdk/applicationinsights/applicationinsights-query/src/models/queryMappers.ts @@ -1,21 +1,18 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - QueryBody, - QueryResults, - Table, Column, - ErrorResponse, + ErrorDetail, ErrorInfo, - ErrorDetail + ErrorResponse, + QueryBody, + QueryResults, + Table } from "../models/mappers"; - diff --git a/sdk/applicationinsights/applicationinsights-query/src/operations/get.ts b/sdk/applicationinsights/applicationinsights-query/src/operations/get.ts new file mode 100644 index 000000000000..f04a17e72937 --- /dev/null +++ b/sdk/applicationinsights/applicationinsights-query/src/operations/get.ts @@ -0,0 +1,79 @@ +/* + * 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/getMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsDataClientContext } from "../applicationInsightsDataClientContext"; + +/** Class representing a Get. */ +export class Get { + private readonly client: ApplicationInsightsDataClientContext; + + /** + * Create a Get. + * @param {ApplicationInsightsDataClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsDataClientContext) { + this.client = client; + } + + /** + * Retrieve the metadata information for the app, including its schema, etc. + * @summary Gets metadata information + * @param appId ID of the application. This is Application ID from the API Access settings blade in + * the Azure portal. + * @param [options] The optional parameters + * @returns Promise + */ + metadata(appId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param appId ID of the application. This is Application ID from the API Access settings blade in + * the Azure portal. + * @param callback The callback + */ + metadata(appId: string, callback: msRest.ServiceCallback): void; + /** + * @param appId ID of the application. This is Application ID from the API Access settings blade in + * the Azure portal. + * @param options The optional parameters + * @param callback The callback + */ + metadata(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + metadata(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + appId, + options + }, + metadataOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const metadataOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "v1/apps/{appId}/metadata", + urlParameters: [ + Parameters.appId + ], + responses: { + 200: { + bodyMapper: Mappers.MetadataResults + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/applicationinsights/applicationinsights-query/src/operations/index.ts b/sdk/applicationinsights/applicationinsights-query/src/operations/index.ts index 0a63b995a17a..fd1382a484cc 100644 --- a/sdk/applicationinsights/applicationinsights-query/src/operations/index.ts +++ b/sdk/applicationinsights/applicationinsights-query/src/operations/index.ts @@ -11,3 +11,5 @@ export * from "./metrics"; export * from "./events"; export * from "./query"; +export * from "./post"; +export * from "./get"; diff --git a/sdk/applicationinsights/applicationinsights-query/src/operations/metrics.ts b/sdk/applicationinsights/applicationinsights-query/src/operations/metrics.ts index 56a1c8e0b26f..14f5da59bacc 100644 --- a/sdk/applicationinsights/applicationinsights-query/src/operations/metrics.ts +++ b/sdk/applicationinsights/applicationinsights-query/src/operations/metrics.ts @@ -136,7 +136,7 @@ export class Metrics { /** * Gets metadata describing the available metrics - * @summary Retrieve metric metatadata + * @summary Retrieve metric metadata * @param appId ID of the application. This is Application ID from the API Access settings blade in * the Azure portal. * @param [options] The optional parameters diff --git a/sdk/applicationinsights/applicationinsights-query/src/operations/post.ts b/sdk/applicationinsights/applicationinsights-query/src/operations/post.ts new file mode 100644 index 000000000000..348342ac7339 --- /dev/null +++ b/sdk/applicationinsights/applicationinsights-query/src/operations/post.ts @@ -0,0 +1,79 @@ +/* + * 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/postMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsDataClientContext } from "../applicationInsightsDataClientContext"; + +/** Class representing a Post. */ +export class Post { + private readonly client: ApplicationInsightsDataClientContext; + + /** + * Create a Post. + * @param {ApplicationInsightsDataClientContext} client Reference to the service client. + */ + constructor(client: ApplicationInsightsDataClientContext) { + this.client = client; + } + + /** + * Retrieve the metadata information for the app, including its schema, etc. + * @summary Gets metadata information + * @param appId ID of the application. This is Application ID from the API Access settings blade in + * the Azure portal. + * @param [options] The optional parameters + * @returns Promise + */ + metadata(appId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param appId ID of the application. This is Application ID from the API Access settings blade in + * the Azure portal. + * @param callback The callback + */ + metadata(appId: string, callback: msRest.ServiceCallback): void; + /** + * @param appId ID of the application. This is Application ID from the API Access settings blade in + * the Azure portal. + * @param options The optional parameters + * @param callback The callback + */ + metadata(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + metadata(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + appId, + options + }, + metadataOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const metadataOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "v1/apps/{appId}/metadata", + urlParameters: [ + Parameters.appId + ], + responses: { + 200: { + bodyMapper: Mappers.MetadataResults + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/applicationinsights/applicationinsights-query/tsconfig.json b/sdk/applicationinsights/applicationinsights-query/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/applicationinsights/applicationinsights-query/tsconfig.json +++ b/sdk/applicationinsights/applicationinsights-query/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true