import * as coreClient from "@azure/core-client" ; import * as coreAuth from "@azure/core-auth" ; import { MetricsImpl } from "./operations" ; import { Metrics } from "./operationsInterfaces" ; import { MonitorClientOptionalParams } from "./models" ; export class MonitorClient extends coreClient . ServiceClient { $host : string ; param credentials param options constructor ( credentials , options ? ) { if ( credentials === undefined ) { throw new Error ( "'credentials' cannot be null" ) ; } if ( ! options ) { options = { } ; } const defaults = { requestContentType : "application/json; charset=utf-8" , credential : credentials } ; const packageDetails = `azsdk-js-monitor-data-plane/1.0.0-beta.1` ; const userAgentPrefix = options . userAgentOptions && options . userAgentOptions . userAgentPrefix ? `${ options . userAgentOptions . userAgentPrefix } ${ packageDetails }` : `${ packageDetails }` ; const optionsWithDefaults = { ... defaults , ... options , userAgentOptions : { userAgentPrefix } , baseUri : options . endpoint || "https://monitoring.azure.com" } ; super ( optionsWithDefaults ) ; this . $host = options . $host || "https://monitoring.azure.com" ; this . metrics = new MetricsImpl ( this ) ; } metrics : Metrics ; }