-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'Azure/master' into move_challenge_based…
…_auth
- Loading branch information
Showing
9 changed files
with
1,812 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ browser | |
coverage | ||
# don't lint generated files | ||
src/Declarations | ||
src/generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
sdk/monitor/monitor-opentelemetry-exporter/src/generated/applicationInsightsClient.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. | ||
* Licensed under the MIT License. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
*/ | ||
|
||
import * as coreHttp from "@azure/core-http"; | ||
import * as Parameters from "./models/parameters"; | ||
import * as Mappers from "./models/mappers"; | ||
import { ApplicationInsightsClientContext } from "./applicationInsightsClientContext"; | ||
import { | ||
ApplicationInsightsClientOptionalParams, | ||
TelemetryItem, | ||
ApplicationInsightsClientTrackResponse | ||
} from "./models"; | ||
|
||
export class ApplicationInsightsClient extends ApplicationInsightsClientContext { | ||
/** | ||
* Initializes a new instance of the ApplicationInsightsClient class. | ||
* @param options The parameter options | ||
*/ | ||
constructor(options?: ApplicationInsightsClientOptionalParams) { | ||
super(options); | ||
} | ||
|
||
/** | ||
* This operation generates a model using an entire series, each point is detected with the same model. | ||
* With this method, points before and after a certain point are used to determine whether it is an | ||
* anomaly. The entire detection can give user an overall status of the time series. | ||
* @param body Time series points and period if needed. Advanced model parameters can also be set in | ||
* the request. | ||
* @param options The options parameters. | ||
*/ | ||
track( | ||
body: TelemetryItem[], | ||
options?: coreHttp.OperationOptions | ||
): Promise<ApplicationInsightsClientTrackResponse> { | ||
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase( | ||
options || {} | ||
); | ||
return this.sendOperationRequest( | ||
{ body, options: operationOptions }, | ||
trackOperationSpec | ||
) as Promise<ApplicationInsightsClientTrackResponse>; | ||
} | ||
} | ||
// Operation Specifications | ||
|
||
const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false); | ||
|
||
const trackOperationSpec: coreHttp.OperationSpec = { | ||
path: "/track", | ||
httpMethod: "POST", | ||
responses: { | ||
200: { | ||
bodyMapper: Mappers.TrackResponse | ||
}, | ||
206: { | ||
bodyMapper: Mappers.TrackResponse | ||
}, | ||
400: { | ||
bodyMapper: Mappers.TrackResponse | ||
}, | ||
402: { | ||
bodyMapper: Mappers.TrackResponse | ||
}, | ||
429: { | ||
bodyMapper: Mappers.TrackResponse | ||
}, | ||
500: { | ||
bodyMapper: Mappers.TrackResponse | ||
}, | ||
503: { | ||
bodyMapper: Mappers.TrackResponse | ||
} | ||
}, | ||
requestBody: Parameters.body, | ||
urlParameters: [Parameters.host], | ||
headerParameters: [Parameters.contentType, Parameters.accept], | ||
mediaType: "json", | ||
serializer | ||
}; |
42 changes: 42 additions & 0 deletions
42
sdk/monitor/monitor-opentelemetry-exporter/src/generated/applicationInsightsClientContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. | ||
* Licensed under the MIT License. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
*/ | ||
|
||
import * as coreHttp from "@azure/core-http"; | ||
import { ApplicationInsightsClientOptionalParams } from "./models"; | ||
|
||
const packageName = "@azure/monitor-opentelemetry-exporter"; | ||
const packageVersion = "1.0.0"; | ||
|
||
export class ApplicationInsightsClientContext extends coreHttp.ServiceClient { | ||
host: string; | ||
|
||
/** | ||
* Initializes a new instance of the ApplicationInsightsClientContext class. | ||
* @param options The parameter options | ||
*/ | ||
constructor(options?: ApplicationInsightsClientOptionalParams) { | ||
// Initializing default values for options | ||
if (!options) { | ||
options = {}; | ||
} | ||
|
||
if (!options.userAgent) { | ||
const defaultUserAgent = coreHttp.getDefaultUserAgentValue(); | ||
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; | ||
} | ||
|
||
super(undefined, options); | ||
|
||
this.requestContentType = "application/json; charset=utf-8"; | ||
|
||
this.baseUri = options.endpoint || "{Host}/v2"; | ||
|
||
// Assigning values to Constant parameters | ||
this.host = options.host || "https://dc.services.visualstudio.com"; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
sdk/monitor/monitor-opentelemetry-exporter/src/generated/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. | ||
* Licensed under the MIT License. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
*/ | ||
|
||
export * from "./models"; | ||
export { ApplicationInsightsClient } from "./applicationInsightsClient"; | ||
export { ApplicationInsightsClientContext } from "./applicationInsightsClientContext"; |
Oops, something went wrong.