import { TestComplexType , TestComplexTypeField , TestEntity } from '@sap-cloud-sdk/test-services/v4/test-service' ; import { defaultDeSerializers } from '@sap-cloud-sdk/odata-v4/internal' ; import { FieldBuilder } from '@sap-cloud-sdk/odata-common/internal' ; const entityFieldBuilder = new FieldBuilder ( TestEntity , defaultDeSerializers ) ; entityFieldBuilder . buildEdmTypeField ( 'fieldName' , 'Edm.String' , true ) ; entityFieldBuilder . buildEdmTypeField ( 'fieldName' , 'Edm.Int16' , false ) ; const complexTypeField = entityFieldBuilder . buildComplexTypeField ( 'fieldName' , TestComplexTypeField , true ) ; entityFieldBuilder . buildCollectionField ( 'fieldName' , 'Edm.Int32' , false ) ; entityFieldBuilder . buildCollectionField ( 'fieldName' , TestComplexType , true ) ; const complexTypeFieldBuilder = new FieldBuilder ( complexTypeField , defaultDeSerializers ) ; complexTypeFieldBuilder . buildEdmTypeField ( 'fieldName' , 'Edm.String' , true ) ; complexTypeFieldBuilder . buildEdmTypeField ( 'fieldName' , 'Edm.Int16' , false ) ; complexTypeFieldBuilder . buildComplexTypeField ( 'fieldName' , TestComplexTypeField , true ) ; complexTypeFieldBuilder . buildCollectionField ( 'fieldName' , 'Edm.Int32' , false ) ; complexTypeFieldBuilder . buildCollectionField ( 'fieldName' , TestComplexType , true ) ;