import * as coreClient from "@azure/core-client" ; import { OperationsImpl , DpsCertificateImpl , IotDpsResourceImpl } from "./operations" ; import { Operations , DpsCertificate , IotDpsResource } from "./operationsInterfaces" ; import { DeviceProvisioningClientOptionalParams } from "./models" ; export class DeviceProvisioningClient extends coreClient . ServiceClient { $host : string ; apiVersion : string ; subscriptionId : string ; param subscriptionId param options constructor ( subscriptionId , options ? ) { if ( subscriptionId === undefined ) { throw new Error ( "'subscriptionId' cannot be null" ) ; } if ( ! options ) { options = { } ; } const defaults = { requestContentType : "application/json; charset=utf-8" } ; const packageDetails = `azsdk-js-deviceprovisioning/1.0.0-preview1` ; const userAgentPrefix = options . userAgentOptions && options . userAgentOptions . userAgentPrefix ? `${ options . userAgentOptions . userAgentPrefix } ${ packageDetails }` : `${ packageDetails }` ; const optionsWithDefaults = { ... defaults , ... options , userAgentOptions : { userAgentPrefix } , baseUri : options . endpoint || "https://management.azure.com" } ; super ( optionsWithDefaults ) ; this . subscriptionId = subscriptionId ; this . $host = options . $host || "https://management.azure.com" ; this . apiVersion = options . apiVersion || "2020-03-01" ; this . operations = new OperationsImpl ( this ) ; this . dpsCertificate = new DpsCertificateImpl ( this ) ; this . iotDpsResource = new IotDpsResourceImpl ( this ) ; } operations : Operations ; dpsCertificate : DpsCertificate ; iotDpsResource : IotDpsResource ; }