import { createSpan } from "../tracing" ; import { Flattencomplex } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as coreTracing from "@azure/core-tracing" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { BodyComplexWithTracing } from "../bodyComplexWithTracing" ; import { FlattencomplexGetValidOptionalParams , FlattencomplexGetValidResponse } from "../models" ; /** Class containing Flattencomplex operations. */ export class FlattencomplexImpl implements Flattencomplex { private readonly client : BodyComplexWithTracing ; param client constructor ( client ) { this . client = client ; } param options async getValid ( options ? ) { const { span } = createSpan ( "BodyComplexWithTracing-getValid" , options || { } ) ; try { const result = await this . client . sendOperationRequest ( { options } , getValidOperationSpec ) ; return result as FlattencomplexGetValidResponse ; } catch ( error ) { span . setStatus ( { code : coreTracing . SpanStatusCode . UNSET , message : error . message } ) ; throw error ; } finally { span . end ( ) ; } } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const getValidOperationSpec = { path : "/complex/flatten/valid" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . MyBaseType } } , urlParameters : [ Parameters . $host ] , headerParameters : [ Parameters . accept ] , serializer } ;