import * as coreClient from "@azure/core-client" ; import * as Parameters from "./models/parameters" ; import { Enum0 , LicenseHeaderClientOptionalParams , ApiV1ValueGetOptionalParams , ApiV1ValueGetResponse } from "./models" ; export class LicenseHeaderClient extends coreClient . ServiceClient { $host : string ; apiVersion : Enum0 ; param $host param apiVersion param options constructor ( $host , apiVersion , options ? ) { if ( $host === undefined ) { throw new Error ( "'$host' cannot be null" ) ; } if ( apiVersion === undefined ) { throw new Error ( "'apiVersion' cannot be null" ) ; } if ( ! options ) { options = { } ; } const defaults = { requestContentType : "application/json; charset=utf-8" } ; const packageDetails = `azsdk-js-license-header/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 || "{$host}" } ; super ( optionsWithDefaults ) ; this . $host = $host ; this . apiVersion = apiVersion ; } param options apiV1ValueGet ( options ? ) { return this . sendOperationRequest ( { options } , apiV1ValueGetOperationSpec ) ; } } const serializer = coreClient . createSerializer ( { } , false ) ; const apiV1ValueGetOperationSpec = { path : "/api/v1/value" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "String" } } } } , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept , Parameters . apiVersion ] , serializer } ;