import { TestEntityApi } from './TestEntityApi' ; import { TestEntityLinkApi } from './TestEntityLinkApi' ; import { concatStrings , getAll , getByKey , returnCollection , returnInt , returnSapCloudSdk , ConcatStringsParameters , GetAllParameters , GetByKeyParameters , ReturnCollectionParameters , ReturnIntParameters , ReturnSapCloudSdkParameters } from './function-imports' ; import { createTestEntityById , createTestEntityByIdReturnId , CreateTestEntityByIdParameters , CreateTestEntityByIdReturnIdParameters } from './action-imports' ; import { BigNumber } from 'bignumber.js' ; import { batch } from './BatchRequest' ; import { Moment , Duration } from 'moment' ; import { defaultDeSerializers , DeSerializers , DefaultDeSerializers , mergeDefaultDeSerializersWith , Time } from '@sap-cloud-sdk/odata-v4' ; export function testService < BinaryT = string , BooleanT = boolean , ByteT = number , DecimalT = BigNumber , DoubleT = number , FloatT = number , Int16T = number , Int32T = number , Int64T = BigNumber , GuidT = string , SByteT = number , SingleT = number , StringT = string , AnyT = any , DateTimeOffsetT = Moment , DateT = Moment , DurationT = Duration , TimeOfDayT = Time > ( deSerializers = defaultDeSerializers as any ) { return new TestService ( mergeDefaultDeSerializersWith ( deSerializers ) ) ; } export class TestService < DeSerializersT extends DeSerializers = DefaultDeSerializers > { private apis : Record < string , any > = { } ; private deSerializers : DeSerializersT ; constructor ( deSerializers ) { this . deSerializers = deSerializers ; } private initApi ( key , ctor ) { if ( ! this . apis [ key ] ) { this . apis [ key ] = new ctor ( this . deSerializers ) ; } return this . apis [ key ] ; } get testEntityApi ( ) : TestEntityApi < DeSerializersT > { const api = this . initApi ( 'testEntityApi' , TestEntityApi ) ; const linkedApis = [ this . initApi ( 'testEntityLinkApi' , TestEntityLinkApi ) ] ; api . _addNavigationProperties ( linkedApis ) ; return api ; } get testEntityLinkApi ( ) : TestEntityLinkApi < DeSerializersT > { return this . initApi ( 'testEntityLinkApi' , TestEntityLinkApi ) ; } get functionImports ( ) { return { concatStrings : ( parameter ) => concatStrings ( parameter , this . deSerializers ) , getAll : ( parameter ) => getAll ( parameter , this . deSerializers ) , getByKey : ( parameter ) => getByKey ( parameter , this . deSerializers ) , returnCollection : ( parameter ) => returnCollection ( parameter , this . deSerializers ) , returnInt : ( parameter ) => returnInt ( parameter , this . deSerializers ) , returnSapCloudSdk : ( parameter ) => returnSapCloudSdk ( parameter , this . deSerializers ) } ; } get actionImports ( ) { return { createTestEntityById : ( parameter ) => createTestEntityById ( parameter , this . deSerializers ) , createTestEntityByIdReturnId : ( parameter ) => createTestEntityByIdReturnId ( parameter , this . deSerializers ) } ; } get batch ( ) : typeof batch { return batch ; } }