import * as coreClient from "@azure/core-client" ; import * as Parameters from "./models/parameters" ; import * as Mappers from "./models/mappers" ; import { MapperRequiredClientOptionalParams , UpdateCertificateIssuerOptionalParams , UpdateCertificateIssuerResponse } from "./models" ; export class MapperRequiredClient extends coreClient . ServiceClient { $host : string ; param $host param options constructor ( $host , options ? ) { if ( $host === undefined ) { throw new Error ( "'$host' cannot be null" ) ; } if ( ! options ) { options = { } ; } const defaults = { requestContentType : "application/json; charset=utf-8" } ; const packageDetails = `azsdk-js-mapperrequired/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 ; } param issuerName param options updateCertificateIssuer ( issuerName , options ? ) { return this . sendOperationRequest ( { issuerName , options } , updateCertificateIssuerOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const updateCertificateIssuerOperationSpec = { path : "/certificates/issuers/{issuer-name}" , httpMethod : "PATCH" , responses : { 200 : { bodyMapper : { type : { name : "String" } } } } , requestBody : { parameterPath : { provider : [ "options" , "provider" ] } , mapper : { ... Mappers . CertificateIssuerUpdateParameters , required : true } } , urlParameters : [ Parameters . $host , Parameters . issuerName ] , headerParameters : [ Parameters . contentType , Parameters . accept ] , mediaType : "json" , serializer } ;