import { Time } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { BodyTimeClient } from "../bodyTimeClient" ; import { TimeGetOptionalParams , TimeGetResponse , TimePutOptionalParams , TimePutResponse } from "../models" ; /** Class containing Time operations. */ export class TimeImpl implements Time { private readonly client : BodyTimeClient ; param client constructor ( client ) { this . client = client ; } param options get ( options ? ) { return this . client . sendOperationRequest ( { options } , getOperationSpec ) ; } param timeBody param options put ( timeBody , options ? ) { return this . client . sendOperationRequest ( { timeBody , options } , putOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const getOperationSpec = { path : "/time/get" , httpMethod : "GET" , responses : { 200 : { bodyMapper : { type : { name : "String" } } } , default : { bodyMapper : Mappers . ErrorModel } } , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept ] , serializer } ; const putOperationSpec = { path : "/time/put" , httpMethod : "PUT" , responses : { 200 : { bodyMapper : { type : { name : "String" } } } , default : { bodyMapper : Mappers . ErrorModel } } , requestBody : Parameters . timeBody , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ;