/**
 * Generated by karavan build tools - do NOT edit this file!
 */
import {CamelElement} from "../model/IntegrationDefinition";
import {

    ProcessorDefinition,
    BeansDeserializer,
    ErrorHandlerBuilderDeserializer,
    NamedBeanDefinition,
    OutputAwareFromDefinition,
    AggregateDefinition,
    BeanDefinition,
    CatchDefinition,
    ChoiceDefinition,
    CircuitBreakerDefinition,
    ClaimCheckDefinition,
    ContextScanDefinition,
    ConvertBodyDefinition,
    DataFormatDefinition,
    DelayDefinition,
    DescriptionDefinition,
    DynamicRouterDefinition,
    EnrichDefinition,
    ErrorHandlerDefinition,
    ExpressionSubElementDefinition,
    FaultToleranceConfigurationDefinition,
    FilterDefinition,
    FinallyDefinition,
    FromDefinition,
    GlobalOptionDefinition,
    GlobalOptionsDefinition,
    IdempotentConsumerDefinition,
    InOnlyDefinition,
    InOutDefinition,
    InputTypeDefinition,
    InterceptDefinition,
    InterceptFromDefinition,
    InterceptSendToEndpointDefinition,
    KameletDefinition,
    LoadBalanceDefinition,
    LogDefinition,
    LoopDefinition,
    MarshalDefinition,
    MulticastDefinition,
    OnCompletionDefinition,
    OnExceptionDefinition,
    OnFallbackDefinition,
    OptimisticLockRetryPolicyDefinition,
    OtherwiseDefinition,
    OutputDefinition,
    OutputTypeDefinition,
    PackageScanDefinition,
    PausableDefinition,
    PipelineDefinition,
    PolicyDefinition,
    PollEnrichDefinition,
    ProcessDefinition,
    PropertyDefinition,
    PropertyExpressionDefinition,
    RecipientListDefinition,
    RedeliveryPolicyDefinition,
    RemoveHeaderDefinition,
    RemoveHeadersDefinition,
    RemovePropertiesDefinition,
    RemovePropertyDefinition,
    ResequenceDefinition,
    Resilience4jConfigurationDefinition,
    RestContextRefDefinition,
    ResumableDefinition,
    RollbackDefinition,
    RouteBuilderDefinition,
    RouteConfigurationContextRefDefinition,
    RouteConfigurationDefinition,
    RouteContextRefDefinition,
    RouteDefinition,
    RouteTemplateBeanDefinition,
    RouteTemplateDefinition,
    RouteTemplateParameterDefinition,
    RoutingSlipDefinition,
    SagaActionUriDefinition,
    SagaDefinition,
    SamplingDefinition,
    ScriptDefinition,
    SetBodyDefinition,
    SetExchangePatternDefinition,
    SetHeaderDefinition,
    SetPropertyDefinition,
    SortDefinition,
    SplitDefinition,
    StepDefinition,
    StopDefinition,
    TemplatedRouteBeanDefinition,
    TemplatedRouteDefinition,
    TemplatedRouteParameterDefinition,
    ThreadPoolProfileDefinition,
    ThreadsDefinition,
    ThrottleDefinition,
    ThrowExceptionDefinition,
    ToDefinition,
    ToDynamicDefinition,
    TransactedDefinition,
    TransformDefinition,
    TryDefinition,
    UnmarshalDefinition,
    ValidateDefinition,
    ValueDefinition,
    WhenDefinition,
    WhenSkipSendToEndpointDefinition,
    WireTapDefinition,
    BlacklistServiceCallServiceFilterConfiguration,
    CachingServiceCallServiceDiscoveryConfiguration,
    CombinedServiceCallServiceDiscoveryConfiguration,
    CombinedServiceCallServiceFilterConfiguration,
    ConsulServiceCallServiceDiscoveryConfiguration,
    CustomServiceCallServiceFilterConfiguration,
    DefaultServiceCallServiceLoadBalancerConfiguration,
    DnsServiceCallServiceDiscoveryConfiguration,
    HealthyServiceCallServiceFilterConfiguration,
    KubernetesServiceCallServiceDiscoveryConfiguration,
    PassThroughServiceCallServiceFilterConfiguration,
    ServiceCallConfigurationDefinition,
    ServiceCallDefinition,
    ServiceCallExpressionConfiguration,
    ServiceCallServiceChooserConfiguration,
    ServiceCallServiceDiscoveryConfiguration,
    ServiceCallServiceFilterConfiguration,
    ServiceCallServiceLoadBalancerConfiguration,
    StaticServiceCallServiceDiscoveryConfiguration,
    ZooKeeperServiceCallServiceDiscoveryConfiguration,
    BatchResequencerConfig,
    StreamResequencerConfig,
    ASN1DataFormat,
    Any23DataFormat,
    AvroDataFormat,
    BarcodeDataFormat,
    Base64DataFormat,
    BindyDataFormat,
    CBORDataFormat,
    CryptoDataFormat,
    CsvDataFormat,
    CustomDataFormat,
    DataFormatsDefinition,
    FhirJsonDataFormat,
    FhirXmlDataFormat,
    FlatpackDataFormat,
    GrokDataFormat,
    GzipDeflaterDataFormat,
    HL7DataFormat,
    IcalDataFormat,
    JacksonXMLDataFormat,
    JaxbDataFormat,
    JsonApiDataFormat,
    JsonDataFormat,
    LZFDataFormat,
    MimeMultipartDataFormat,
    PGPDataFormat,
    ProtobufDataFormat,
    RssDataFormat,
    SoapDataFormat,
    SwiftMtDataFormat,
    SwiftMxDataFormat,
    SyslogDataFormat,
    TarFileDataFormat,
    ThriftDataFormat,
    TidyMarkupDataFormat,
    UniVocityCsvDataFormat,
    UniVocityFixedDataFormat,
    UniVocityHeader,
    UniVocityTsvDataFormat,
    XMLSecurityDataFormat,
    XStreamDataFormat,
    YAMLDataFormat,
    YAMLTypeFilterDefinition,
    ZipDeflaterDataFormat,
    ZipFileDataFormat,
    DeadLetterChannelDefinition,
    DefaultErrorHandlerDefinition,
    JtaTransactionErrorHandlerDefinition,
    NoErrorHandlerDefinition,
    RefErrorHandlerDefinition,
    SpringTransactionErrorHandlerDefinition,
    CSimpleExpression,
    ConstantExpression,
    DatasonnetExpression,
    ExchangePropertyExpression,
    ExpressionDefinition,
    GroovyExpression,
    HeaderExpression,
    Hl7TerserExpression,
    JavaScriptExpression,
    JoorExpression,
    JqExpression,
    JsonPathExpression,
    LanguageExpression,
    MethodCallExpression,
    MvelExpression,
    OgnlExpression,
    PythonExpression,
    RefExpression,
    SimpleExpression,
    SpELExpression,
    TokenizerExpression,
    XMLTokenizerExpression,
    XPathExpression,
    XQueryExpression,
    CustomLoadBalancerDefinition,
    FailoverLoadBalancerDefinition,
    RandomLoadBalancerDefinition,
    RoundRobinLoadBalancerDefinition,
    StickyLoadBalancerDefinition,
    TopicLoadBalancerDefinition,
    WeightedLoadBalancerDefinition,
    ApiKeyDefinition,
    BasicAuthDefinition,
    BearerTokenDefinition,
    DeleteDefinition,
    GetDefinition,
    HeadDefinition,
    MutualTLSDefinition,
    OAuth2Definition,
    OpenIdConnectDefinition,
    ParamDefinition,
    PatchDefinition,
    PostDefinition,
    PutDefinition,
    ResponseHeaderDefinition,
    ResponseMessageDefinition,
    RestBindingDefinition,
    RestConfigurationDefinition,
    RestDefinition,
    RestPropertyDefinition,
    RestSecuritiesDefinition,
    RestsDefinition,
    SecurityDefinition,
    CustomTransformerDefinition,
    DataFormatTransformerDefinition,
    EndpointTransformerDefinition,
    TransformersDefinition,
    CustomValidatorDefinition,
    EndpointValidatorDefinition,
    PredicateValidatorDefinition,
    ValidatorsDefinition,
} from '../model/CamelDefinition';
import {CamelUtil} from './CamelUtil';
import {CamelMetadataApi} from '../model/CamelMetadata';

export class CamelDefinitionYamlStep { 

    static readProcessorDefinition = (element: any): ProcessorDefinition => {
        
        const def = element ? new ProcessorDefinition({...element}) : new ProcessorDefinition();
        if (element?.idempotentConsumer !== undefined) { 
            if (Array.isArray(element.idempotentConsumer)) { 
               def.idempotentConsumer = CamelDefinitionYamlStep.readIdempotentConsumerDefinition(element.idempotentConsumer[0]); 
            } else { 
               def.idempotentConsumer = CamelDefinitionYamlStep.readIdempotentConsumerDefinition(element.idempotentConsumer); 
            } 
        } 
        if (element?.resumable !== undefined) { 
            if (Array.isArray(element.resumable)) { 
               def.resumable = CamelDefinitionYamlStep.readResumableDefinition(element.resumable[0]); 
            } else { 
               def.resumable = CamelDefinitionYamlStep.readResumableDefinition(element.resumable); 
            } 
        } 
        if (element?.doTry !== undefined) { 
            if (Array.isArray(element.doTry)) { 
               def.doTry = CamelDefinitionYamlStep.readTryDefinition(element.doTry[0]); 
            } else { 
               def.doTry = CamelDefinitionYamlStep.readTryDefinition(element.doTry); 
            } 
        } 
        if (element?.convertBodyTo !== undefined) { 
            if (Array.isArray(element.convertBodyTo)) { 
               def.convertBodyTo = CamelDefinitionYamlStep.readConvertBodyDefinition(element.convertBodyTo[0]); 
            } else { 
               def.convertBodyTo = CamelDefinitionYamlStep.readConvertBodyDefinition(element.convertBodyTo); 
            } 
        } 
        if (element?.recipientList !== undefined) { 
            if (Array.isArray(element.recipientList)) { 
               def.recipientList = CamelDefinitionYamlStep.readRecipientListDefinition(element.recipientList[0]); 
            } else { 
               def.recipientList = CamelDefinitionYamlStep.readRecipientListDefinition(element.recipientList); 
            } 
        } 
        if (element?.when !== undefined) { 
            if (Array.isArray(element.when)) { 
               def.when = CamelDefinitionYamlStep.readWhenDefinition(element.when[0]); 
            } else { 
               def.when = CamelDefinitionYamlStep.readWhenDefinition(element.when); 
            } 
        } 
        if (element?.setHeader !== undefined) { 
            if (Array.isArray(element.setHeader)) { 
               def.setHeader = CamelDefinitionYamlStep.readSetHeaderDefinition(element.setHeader[0]); 
            } else { 
               def.setHeader = CamelDefinitionYamlStep.readSetHeaderDefinition(element.setHeader); 
            } 
        } 
        if (element?.inOnly !== undefined) { 
            if (Array.isArray(element.inOnly)) { 
               def.inOnly = CamelDefinitionYamlStep.readInOnlyDefinition(element.inOnly[0]); 
            } else { 
               def.inOnly = CamelDefinitionYamlStep.readInOnlyDefinition(element.inOnly); 
            } 
        } 
        if (element?.inOut !== undefined) { 
            if (Array.isArray(element.inOut)) { 
               def.inOut = CamelDefinitionYamlStep.readInOutDefinition(element.inOut[0]); 
            } else { 
               def.inOut = CamelDefinitionYamlStep.readInOutDefinition(element.inOut); 
            } 
        } 
        if (element?.split !== undefined) { 
            if (Array.isArray(element.split)) { 
               def.split = CamelDefinitionYamlStep.readSplitDefinition(element.split[0]); 
            } else { 
               def.split = CamelDefinitionYamlStep.readSplitDefinition(element.split); 
            } 
        } 
        if (element?.interceptSendToEndpoint !== undefined) { 
            if (Array.isArray(element.interceptSendToEndpoint)) { 
               def.interceptSendToEndpoint = CamelDefinitionYamlStep.readInterceptSendToEndpointDefinition(element.interceptSendToEndpoint[0]); 
            } else { 
               def.interceptSendToEndpoint = CamelDefinitionYamlStep.readInterceptSendToEndpointDefinition(element.interceptSendToEndpoint); 
            } 
        } 
        if (element?.loop !== undefined) { 
            if (Array.isArray(element.loop)) { 
               def.loop = CamelDefinitionYamlStep.readLoopDefinition(element.loop[0]); 
            } else { 
               def.loop = CamelDefinitionYamlStep.readLoopDefinition(element.loop); 
            } 
        } 
        if (element?.setExchangePattern !== undefined) { 
            if (Array.isArray(element.setExchangePattern)) { 
               def.setExchangePattern = CamelDefinitionYamlStep.readSetExchangePatternDefinition(element.setExchangePattern[0]); 
            } else { 
               def.setExchangePattern = CamelDefinitionYamlStep.readSetExchangePatternDefinition(element.setExchangePattern); 
            } 
        } 
        if (element?.marshal !== undefined) { 
            if (Array.isArray(element.marshal)) { 
               def.marshal = CamelDefinitionYamlStep.readMarshalDefinition(element.marshal[0]); 
            } else { 
               def.marshal = CamelDefinitionYamlStep.readMarshalDefinition(element.marshal); 
            } 
        } 
        if (element?.onFallback !== undefined) { 
            if (Array.isArray(element.onFallback)) { 
               def.onFallback = CamelDefinitionYamlStep.readOnFallbackDefinition(element.onFallback[0]); 
            } else { 
               def.onFallback = CamelDefinitionYamlStep.readOnFallbackDefinition(element.onFallback); 
            } 
        } 
        if (element?.circuitBreaker !== undefined) { 
            if (Array.isArray(element.circuitBreaker)) { 
               def.circuitBreaker = CamelDefinitionYamlStep.readCircuitBreakerDefinition(element.circuitBreaker[0]); 
            } else { 
               def.circuitBreaker = CamelDefinitionYamlStep.readCircuitBreakerDefinition(element.circuitBreaker); 
            } 
        } 
        if (element?.enrich !== undefined) { 
            if (Array.isArray(element.enrich)) { 
               def.enrich = CamelDefinitionYamlStep.readEnrichDefinition(element.enrich[0]); 
            } else { 
               def.enrich = CamelDefinitionYamlStep.readEnrichDefinition(element.enrich); 
            } 
        } 
        if (element?.kamelet !== undefined) { 
            if (Array.isArray(element.kamelet)) { 
               def.kamelet = CamelDefinitionYamlStep.readKameletDefinition(element.kamelet[0]); 
            } else { 
               def.kamelet = CamelDefinitionYamlStep.readKameletDefinition(element.kamelet); 
            } 
        } 
        if (element?.saga !== undefined) { 
            if (Array.isArray(element.saga)) { 
               def.saga = CamelDefinitionYamlStep.readSagaDefinition(element.saga[0]); 
            } else { 
               def.saga = CamelDefinitionYamlStep.readSagaDefinition(element.saga); 
            } 
        } 
        if (element?.bean !== undefined) { 
            if (Array.isArray(element.bean)) { 
               def.bean = CamelDefinitionYamlStep.readBeanDefinition(element.bean[0]); 
            } else { 
               def.bean = CamelDefinitionYamlStep.readBeanDefinition(element.bean); 
            } 
        } 
        if (element?.otherwise !== undefined) { 
            if (Array.isArray(element.otherwise)) { 
               def.otherwise = CamelDefinitionYamlStep.readOtherwiseDefinition(element.otherwise[0]); 
            } else { 
               def.otherwise = CamelDefinitionYamlStep.readOtherwiseDefinition(element.otherwise); 
            } 
        } 
        if (element?.sort !== undefined) { 
            if (Array.isArray(element.sort)) { 
               def.sort = CamelDefinitionYamlStep.readSortDefinition(element.sort[0]); 
            } else { 
               def.sort = CamelDefinitionYamlStep.readSortDefinition(element.sort); 
            } 
        } 
        if (element?.loadBalance !== undefined) { 
            if (Array.isArray(element.loadBalance)) { 
               def.loadBalance = CamelDefinitionYamlStep.readLoadBalanceDefinition(element.loadBalance[0]); 
            } else { 
               def.loadBalance = CamelDefinitionYamlStep.readLoadBalanceDefinition(element.loadBalance); 
            } 
        } 
        if (element?.script !== undefined) { 
            if (Array.isArray(element.script)) { 
               def.script = CamelDefinitionYamlStep.readScriptDefinition(element.script[0]); 
            } else { 
               def.script = CamelDefinitionYamlStep.readScriptDefinition(element.script); 
            } 
        } 
        if (element?.removeHeader !== undefined) { 
            if (Array.isArray(element.removeHeader)) { 
               def.removeHeader = CamelDefinitionYamlStep.readRemoveHeaderDefinition(element.removeHeader[0]); 
            } else { 
               def.removeHeader = CamelDefinitionYamlStep.readRemoveHeaderDefinition(element.removeHeader); 
            } 
        } 
        if (element?.delay !== undefined) { 
            if (Array.isArray(element.delay)) { 
               def.delay = CamelDefinitionYamlStep.readDelayDefinition(element.delay[0]); 
            } else { 
               def.delay = CamelDefinitionYamlStep.readDelayDefinition(element.delay); 
            } 
        } 
        if (element?.stop !== undefined) { 
            if (Array.isArray(element.stop)) { 
               def.stop = CamelDefinitionYamlStep.readStopDefinition(element.stop[0]); 
            } else { 
               def.stop = CamelDefinitionYamlStep.readStopDefinition(element.stop); 
            } 
        } 
        if (element?.serviceCall !== undefined) { 
            if (Array.isArray(element.serviceCall)) { 
               def.serviceCall = CamelDefinitionYamlStep.readServiceCallDefinition(element.serviceCall[0]); 
            } else { 
               def.serviceCall = CamelDefinitionYamlStep.readServiceCallDefinition(element.serviceCall); 
            } 
        } 
        if (element?.intercept !== undefined) { 
            if (Array.isArray(element.intercept)) { 
               def.intercept = CamelDefinitionYamlStep.readInterceptDefinition(element.intercept[0]); 
            } else { 
               def.intercept = CamelDefinitionYamlStep.readInterceptDefinition(element.intercept); 
            } 
        } 
        if (element?.whenSkipSendToEndpoint !== undefined) { 
            if (Array.isArray(element.whenSkipSendToEndpoint)) { 
               def.whenSkipSendToEndpoint = CamelDefinitionYamlStep.readWhenSkipSendToEndpointDefinition(element.whenSkipSendToEndpoint[0]); 
            } else { 
               def.whenSkipSendToEndpoint = CamelDefinitionYamlStep.readWhenSkipSendToEndpointDefinition(element.whenSkipSendToEndpoint); 
            } 
        } 
        if (element?.setProperty !== undefined) { 
            if (Array.isArray(element.setProperty)) { 
               def.setProperty = CamelDefinitionYamlStep.readSetPropertyDefinition(element.setProperty[0]); 
            } else { 
               def.setProperty = CamelDefinitionYamlStep.readSetPropertyDefinition(element.setProperty); 
            } 
        } 
        if (element?.removeProperty !== undefined) { 
            if (Array.isArray(element.removeProperty)) { 
               def.removeProperty = CamelDefinitionYamlStep.readRemovePropertyDefinition(element.removeProperty[0]); 
            } else { 
               def.removeProperty = CamelDefinitionYamlStep.readRemovePropertyDefinition(element.removeProperty); 
            } 
        } 
        if (element?.interceptFrom !== undefined) { 
            if (Array.isArray(element.interceptFrom)) { 
               def.interceptFrom = CamelDefinitionYamlStep.readInterceptFromDefinition(element.interceptFrom[0]); 
            } else { 
               def.interceptFrom = CamelDefinitionYamlStep.readInterceptFromDefinition(element.interceptFrom); 
            } 
        } 
        if (element?.onCompletion !== undefined) { 
            if (Array.isArray(element.onCompletion)) { 
               def.onCompletion = CamelDefinitionYamlStep.readOnCompletionDefinition(element.onCompletion[0]); 
            } else { 
               def.onCompletion = CamelDefinitionYamlStep.readOnCompletionDefinition(element.onCompletion); 
            } 
        } 
        if (element?.pausable !== undefined) { 
            if (Array.isArray(element.pausable)) { 
               def.pausable = CamelDefinitionYamlStep.readPausableDefinition(element.pausable[0]); 
            } else { 
               def.pausable = CamelDefinitionYamlStep.readPausableDefinition(element.pausable); 
            } 
        } 
        if (element?.throttle !== undefined) { 
            if (Array.isArray(element.throttle)) { 
               def.throttle = CamelDefinitionYamlStep.readThrottleDefinition(element.throttle[0]); 
            } else { 
               def.throttle = CamelDefinitionYamlStep.readThrottleDefinition(element.throttle); 
            } 
        } 
        if (element?.doFinally !== undefined) { 
            if (Array.isArray(element.doFinally)) { 
               def.doFinally = CamelDefinitionYamlStep.readFinallyDefinition(element.doFinally[0]); 
            } else { 
               def.doFinally = CamelDefinitionYamlStep.readFinallyDefinition(element.doFinally); 
            } 
        } 
        if (element?.log !== undefined) { 
            if (Array.isArray(element.log)) { 
               def.log = CamelDefinitionYamlStep.readLogDefinition(element.log[0]); 
            } else { 
               def.log = CamelDefinitionYamlStep.readLogDefinition(element.log); 
            } 
        } 
        if (element?.doCatch !== undefined) { 
            if (Array.isArray(element.doCatch)) { 
               def.doCatch = CamelDefinitionYamlStep.readCatchDefinition(element.doCatch[0]); 
            } else { 
               def.doCatch = CamelDefinitionYamlStep.readCatchDefinition(element.doCatch); 
            } 
        } 
        if (element?.transacted !== undefined) { 
            if (Array.isArray(element.transacted)) { 
               def.transacted = CamelDefinitionYamlStep.readTransactedDefinition(element.transacted[0]); 
            } else { 
               def.transacted = CamelDefinitionYamlStep.readTransactedDefinition(element.transacted); 
            } 
        } 
        if (element?.claimCheck !== undefined) { 
            if (Array.isArray(element.claimCheck)) { 
               def.claimCheck = CamelDefinitionYamlStep.readClaimCheckDefinition(element.claimCheck[0]); 
            } else { 
               def.claimCheck = CamelDefinitionYamlStep.readClaimCheckDefinition(element.claimCheck); 
            } 
        } 
        if (element?.pollEnrich !== undefined) { 
            if (Array.isArray(element.pollEnrich)) { 
               def.pollEnrich = CamelDefinitionYamlStep.readPollEnrichDefinition(element.pollEnrich[0]); 
            } else { 
               def.pollEnrich = CamelDefinitionYamlStep.readPollEnrichDefinition(element.pollEnrich); 
            } 
        } 
        if (element?.removeHeaders !== undefined) { 
            if (Array.isArray(element.removeHeaders)) { 
               def.removeHeaders = CamelDefinitionYamlStep.readRemoveHeadersDefinition(element.removeHeaders[0]); 
            } else { 
               def.removeHeaders = CamelDefinitionYamlStep.readRemoveHeadersDefinition(element.removeHeaders); 
            } 
        } 
        if (element?.aggregate !== undefined) { 
            if (Array.isArray(element.aggregate)) { 
               def.aggregate = CamelDefinitionYamlStep.readAggregateDefinition(element.aggregate[0]); 
            } else { 
               def.aggregate = CamelDefinitionYamlStep.readAggregateDefinition(element.aggregate); 
            } 
        } 
        if (element?.resequence !== undefined) { 
            if (Array.isArray(element.resequence)) { 
               def.resequence = CamelDefinitionYamlStep.readResequenceDefinition(element.resequence[0]); 
            } else { 
               def.resequence = CamelDefinitionYamlStep.readResequenceDefinition(element.resequence); 
            } 
        } 
        if (element?.routingSlip !== undefined) { 
            if (Array.isArray(element.routingSlip)) { 
               def.routingSlip = CamelDefinitionYamlStep.readRoutingSlipDefinition(element.routingSlip[0]); 
            } else { 
               def.routingSlip = CamelDefinitionYamlStep.readRoutingSlipDefinition(element.routingSlip); 
            } 
        } 
        if (element?.transform !== undefined) { 
            if (Array.isArray(element.transform)) { 
               def.transform = CamelDefinitionYamlStep.readTransformDefinition(element.transform[0]); 
            } else { 
               def.transform = CamelDefinitionYamlStep.readTransformDefinition(element.transform); 
            } 
        } 
        if (element?.removeProperties !== undefined) { 
            if (Array.isArray(element.removeProperties)) { 
               def.removeProperties = CamelDefinitionYamlStep.readRemovePropertiesDefinition(element.removeProperties[0]); 
            } else { 
               def.removeProperties = CamelDefinitionYamlStep.readRemovePropertiesDefinition(element.removeProperties); 
            } 
        } 
        if (element?.policy !== undefined) { 
            if (Array.isArray(element.policy)) { 
               def.policy = CamelDefinitionYamlStep.readPolicyDefinition(element.policy[0]); 
            } else { 
               def.policy = CamelDefinitionYamlStep.readPolicyDefinition(element.policy); 
            } 
        } 
        if (element?.validate !== undefined) { 
            if (Array.isArray(element.validate)) { 
               def.validate = CamelDefinitionYamlStep.readValidateDefinition(element.validate[0]); 
            } else { 
               def.validate = CamelDefinitionYamlStep.readValidateDefinition(element.validate); 
            } 
        } 
        if (element?.rollback !== undefined) { 
            if (Array.isArray(element.rollback)) { 
               def.rollback = CamelDefinitionYamlStep.readRollbackDefinition(element.rollback[0]); 
            } else { 
               def.rollback = CamelDefinitionYamlStep.readRollbackDefinition(element.rollback); 
            } 
        } 
        if (element?.process !== undefined) { 
            if (Array.isArray(element.process)) { 
               def.process = CamelDefinitionYamlStep.readProcessDefinition(element.process[0]); 
            } else { 
               def.process = CamelDefinitionYamlStep.readProcessDefinition(element.process); 
            } 
        } 
        if (element?.threads !== undefined) { 
            if (Array.isArray(element.threads)) { 
               def.threads = CamelDefinitionYamlStep.readThreadsDefinition(element.threads[0]); 
            } else { 
               def.threads = CamelDefinitionYamlStep.readThreadsDefinition(element.threads); 
            } 
        } 
        if (element?.setBody !== undefined) { 
            if (Array.isArray(element.setBody)) { 
               def.setBody = CamelDefinitionYamlStep.readSetBodyDefinition(element.setBody[0]); 
            } else { 
               def.setBody = CamelDefinitionYamlStep.readSetBodyDefinition(element.setBody); 
            } 
        } 
        if (element?.sample !== undefined) { 
            if (Array.isArray(element.sample)) { 
               def.sample = CamelDefinitionYamlStep.readSamplingDefinition(element.sample[0]); 
            } else { 
               def.sample = CamelDefinitionYamlStep.readSamplingDefinition(element.sample); 
            } 
        } 
        if (element?.throwException !== undefined) { 
            if (Array.isArray(element.throwException)) { 
               def.throwException = CamelDefinitionYamlStep.readThrowExceptionDefinition(element.throwException[0]); 
            } else { 
               def.throwException = CamelDefinitionYamlStep.readThrowExceptionDefinition(element.throwException); 
            } 
        } 
        if (element?.dynamicRouter !== undefined) { 
            if (Array.isArray(element.dynamicRouter)) { 
               def.dynamicRouter = CamelDefinitionYamlStep.readDynamicRouterDefinition(element.dynamicRouter[0]); 
            } else { 
               def.dynamicRouter = CamelDefinitionYamlStep.readDynamicRouterDefinition(element.dynamicRouter); 
            } 
        } 
        if (element?.multicast !== undefined) { 
            if (Array.isArray(element.multicast)) { 
               def.multicast = CamelDefinitionYamlStep.readMulticastDefinition(element.multicast[0]); 
            } else { 
               def.multicast = CamelDefinitionYamlStep.readMulticastDefinition(element.multicast); 
            } 
        } 
        if (element?.filter !== undefined) { 
            if (Array.isArray(element.filter)) { 
               def.filter = CamelDefinitionYamlStep.readFilterDefinition(element.filter[0]); 
            } else { 
               def.filter = CamelDefinitionYamlStep.readFilterDefinition(element.filter); 
            } 
        } 
        if (element?.pipeline !== undefined) { 
            if (Array.isArray(element.pipeline)) { 
               def.pipeline = CamelDefinitionYamlStep.readPipelineDefinition(element.pipeline[0]); 
            } else { 
               def.pipeline = CamelDefinitionYamlStep.readPipelineDefinition(element.pipeline); 
            } 
        } 
        if (element?.unmarshal !== undefined) { 
            if (Array.isArray(element.unmarshal)) { 
               def.unmarshal = CamelDefinitionYamlStep.readUnmarshalDefinition(element.unmarshal[0]); 
            } else { 
               def.unmarshal = CamelDefinitionYamlStep.readUnmarshalDefinition(element.unmarshal); 
            } 
        } 
        if (element?.wireTap !== undefined) { 
            if (Array.isArray(element.wireTap)) { 
               def.wireTap = CamelDefinitionYamlStep.readWireTapDefinition(element.wireTap[0]); 
            } else { 
               def.wireTap = CamelDefinitionYamlStep.readWireTapDefinition(element.wireTap); 
            } 
        } 
        if (element?.step !== undefined) { 
            if (Array.isArray(element.step)) { 
               def.step = CamelDefinitionYamlStep.readStepDefinition(element.step[0]); 
            } else { 
               def.step = CamelDefinitionYamlStep.readStepDefinition(element.step); 
            } 
        } 
        if (element?.choice !== undefined) { 
            if (Array.isArray(element.choice)) { 
               def.choice = CamelDefinitionYamlStep.readChoiceDefinition(element.choice[0]); 
            } else { 
               def.choice = CamelDefinitionYamlStep.readChoiceDefinition(element.choice); 
            } 
        } 

        return def;
    }

    static readBeansDeserializer = (element: any): BeansDeserializer => {
        
        const def = element ? new BeansDeserializer({...element}) : new BeansDeserializer();

        return def;
    }

    static readErrorHandlerBuilderDeserializer = (element: any): ErrorHandlerBuilderDeserializer => {
        
        const def = element ? new ErrorHandlerBuilderDeserializer({...element}) : new ErrorHandlerBuilderDeserializer();
        if (element?.deadLetterChannel !== undefined) { 
            if (Array.isArray(element.deadLetterChannel)) { 
               def.deadLetterChannel = CamelDefinitionYamlStep.readDeadLetterChannelDefinition(element.deadLetterChannel[0]); 
            } else { 
               def.deadLetterChannel = CamelDefinitionYamlStep.readDeadLetterChannelDefinition(element.deadLetterChannel); 
            } 
        } 
        if (element?.noErrorHandler !== undefined) { 
            if (Array.isArray(element.noErrorHandler)) { 
               def.noErrorHandler = CamelDefinitionYamlStep.readNoErrorHandlerDefinition(element.noErrorHandler[0]); 
            } else { 
               def.noErrorHandler = CamelDefinitionYamlStep.readNoErrorHandlerDefinition(element.noErrorHandler); 
            } 
        } 
        if (element?.jtaTransactionErrorHandler !== undefined) { 
            if (Array.isArray(element.jtaTransactionErrorHandler)) { 
               def.jtaTransactionErrorHandler = CamelDefinitionYamlStep.readJtaTransactionErrorHandlerDefinition(element.jtaTransactionErrorHandler[0]); 
            } else { 
               def.jtaTransactionErrorHandler = CamelDefinitionYamlStep.readJtaTransactionErrorHandlerDefinition(element.jtaTransactionErrorHandler); 
            } 
        } 
        if (element?.defaultErrorHandler !== undefined) { 
            if (Array.isArray(element.defaultErrorHandler)) { 
               def.defaultErrorHandler = CamelDefinitionYamlStep.readDefaultErrorHandlerDefinition(element.defaultErrorHandler[0]); 
            } else { 
               def.defaultErrorHandler = CamelDefinitionYamlStep.readDefaultErrorHandlerDefinition(element.defaultErrorHandler); 
            } 
        } 
        if (element?.springTransactionErrorHandler !== undefined) { 
            if (Array.isArray(element.springTransactionErrorHandler)) { 
               def.springTransactionErrorHandler = CamelDefinitionYamlStep.readSpringTransactionErrorHandlerDefinition(element.springTransactionErrorHandler[0]); 
            } else { 
               def.springTransactionErrorHandler = CamelDefinitionYamlStep.readSpringTransactionErrorHandlerDefinition(element.springTransactionErrorHandler); 
            } 
        } 
        if (element?.refErrorHandler !== undefined) { 
            if (Array.isArray(element.refErrorHandler)) { 
               def.refErrorHandler = CamelDefinitionYamlStep.readRefErrorHandlerDefinition(element.refErrorHandler[0]); 
            } else { 
               def.refErrorHandler = CamelDefinitionYamlStep.readRefErrorHandlerDefinition(element.refErrorHandler); 
            } 
        } 

        return def;
    }

    static readNamedBeanDefinition = (element: any): NamedBeanDefinition => {
        
        const def = element ? new NamedBeanDefinition({...element}) : new NamedBeanDefinition();

        return def;
    }

    static readOutputAwareFromDefinition = (element: any): OutputAwareFromDefinition => {
        
        const def = element ? new OutputAwareFromDefinition({...element}) : new OutputAwareFromDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readAggregateDefinition = (element: any): AggregateDefinition => {
        
        const def = element ? new AggregateDefinition({...element}) : new AggregateDefinition();
        if (element?.completionTimeoutExpression !== undefined) { 
            if (Array.isArray(element.completionTimeoutExpression)) { 
               def.completionTimeoutExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionTimeoutExpression[0]); 
            } else { 
               def.completionTimeoutExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionTimeoutExpression); 
            } 
        } 
        if (element?.correlationExpression !== undefined) { 
            if (Array.isArray(element.correlationExpression)) { 
               def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression[0]); 
            } else { 
               def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression); 
            } 
        } 
        if (element?.completionPredicate !== undefined) { 
            if (Array.isArray(element.completionPredicate)) { 
               def.completionPredicate = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionPredicate[0]); 
            } else { 
               def.completionPredicate = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionPredicate); 
            } 
        } 
        if (element?.optimisticLockRetryPolicy !== undefined) { 
            if (Array.isArray(element.optimisticLockRetryPolicy)) { 
               def.optimisticLockRetryPolicy = CamelDefinitionYamlStep.readOptimisticLockRetryPolicyDefinition(element.optimisticLockRetryPolicy[0]); 
            } else { 
               def.optimisticLockRetryPolicy = CamelDefinitionYamlStep.readOptimisticLockRetryPolicyDefinition(element.optimisticLockRetryPolicy); 
            } 
        } 
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
        if (element?.completionSizeExpression !== undefined) { 
            if (Array.isArray(element.completionSizeExpression)) { 
               def.completionSizeExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionSizeExpression[0]); 
            } else { 
               def.completionSizeExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionSizeExpression); 
            } 
        } 

        return def;
    }

    static readBeanDefinition = (element: any): BeanDefinition => {
        
        const def = element ? new BeanDefinition({...element}) : new BeanDefinition();

        return def;
    }

    static readCatchDefinition = (element: any): CatchDefinition => {
        
        const def = element ? new CatchDefinition({...element}) : new CatchDefinition();
        if (element?.onWhen !== undefined) { 
            if (Array.isArray(element.onWhen)) { 
               def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen[0]); 
            } else { 
               def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen); 
            } 
        } 
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readChoiceDefinition = (element: any): ChoiceDefinition => {
        
        const def = element ? new ChoiceDefinition({...element}) : new ChoiceDefinition();
        if (element?.otherwise !== undefined) { 
            if (Array.isArray(element.otherwise)) { 
               def.otherwise = CamelDefinitionYamlStep.readOtherwiseDefinition(element.otherwise[0]); 
            } else { 
               def.otherwise = CamelDefinitionYamlStep.readOtherwiseDefinition(element.otherwise); 
            } 
        } 
        def.when = element && element?.when ? element?.when.map((x:any) => CamelDefinitionYamlStep.readWhenDefinition(x)) :[]; 

        return def;
    }

    static readCircuitBreakerDefinition = (element: any): CircuitBreakerDefinition => {
        
        const def = element ? new CircuitBreakerDefinition({...element}) : new CircuitBreakerDefinition();
        if (element?.faultToleranceConfiguration !== undefined) { 
            if (Array.isArray(element.faultToleranceConfiguration)) { 
               def.faultToleranceConfiguration = CamelDefinitionYamlStep.readFaultToleranceConfigurationDefinition(element.faultToleranceConfiguration[0]); 
            } else { 
               def.faultToleranceConfiguration = CamelDefinitionYamlStep.readFaultToleranceConfigurationDefinition(element.faultToleranceConfiguration); 
            } 
        } 
        if (element?.resilience4jConfiguration !== undefined) { 
            if (Array.isArray(element.resilience4jConfiguration)) { 
               def.resilience4jConfiguration = CamelDefinitionYamlStep.readResilience4jConfigurationDefinition(element.resilience4jConfiguration[0]); 
            } else { 
               def.resilience4jConfiguration = CamelDefinitionYamlStep.readResilience4jConfigurationDefinition(element.resilience4jConfiguration); 
            } 
        } 
        if (element?.onFallback !== undefined) { 
            if (Array.isArray(element.onFallback)) { 
               def.onFallback = CamelDefinitionYamlStep.readOnFallbackDefinition(element.onFallback[0]); 
            } else { 
               def.onFallback = CamelDefinitionYamlStep.readOnFallbackDefinition(element.onFallback); 
            } 
        } 
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readClaimCheckDefinition = (element: any): ClaimCheckDefinition => {
        
        const def = element ? new ClaimCheckDefinition({...element}) : new ClaimCheckDefinition();

        return def;
    }

    static readContextScanDefinition = (element: any): ContextScanDefinition => {
        
        const def = element ? new ContextScanDefinition({...element}) : new ContextScanDefinition();

        return def;
    }

    static readConvertBodyDefinition = (element: any): ConvertBodyDefinition => {
        if (element && typeof element === 'string') element = {type: element};
        const def = element ? new ConvertBodyDefinition({...element}) : new ConvertBodyDefinition();

        return def;
    }

    static readDataFormatDefinition = (element: any): DataFormatDefinition => {
        
        const def = element ? new DataFormatDefinition({...element}) : new DataFormatDefinition();

        return def;
    }

    static readDelayDefinition = (element: any): DelayDefinition => {
        
        const def = element ? new DelayDefinition({...element}) : new DelayDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readDescriptionDefinition = (element: any): DescriptionDefinition => {
        
        const def = element ? new DescriptionDefinition({...element}) : new DescriptionDefinition();

        return def;
    }

    static readDynamicRouterDefinition = (element: any): DynamicRouterDefinition => {
        
        const def = element ? new DynamicRouterDefinition({...element}) : new DynamicRouterDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readEnrichDefinition = (element: any): EnrichDefinition => {
        
        const def = element ? new EnrichDefinition({...element}) : new EnrichDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readErrorHandlerDefinition = (element: any): ErrorHandlerDefinition => {
        
        const def = element ? new ErrorHandlerDefinition({...element}) : new ErrorHandlerDefinition();
        if (element?.deadLetterChannel !== undefined) { 
            if (Array.isArray(element.deadLetterChannel)) { 
               def.deadLetterChannel = CamelDefinitionYamlStep.readDeadLetterChannelDefinition(element.deadLetterChannel[0]); 
            } else { 
               def.deadLetterChannel = CamelDefinitionYamlStep.readDeadLetterChannelDefinition(element.deadLetterChannel); 
            } 
        } 
        if (element?.noErrorHandler !== undefined) { 
            if (Array.isArray(element.noErrorHandler)) { 
               def.noErrorHandler = CamelDefinitionYamlStep.readNoErrorHandlerDefinition(element.noErrorHandler[0]); 
            } else { 
               def.noErrorHandler = CamelDefinitionYamlStep.readNoErrorHandlerDefinition(element.noErrorHandler); 
            } 
        } 
        if (element?.jtaTransactionErrorHandler !== undefined) { 
            if (Array.isArray(element.jtaTransactionErrorHandler)) { 
               def.jtaTransactionErrorHandler = CamelDefinitionYamlStep.readJtaTransactionErrorHandlerDefinition(element.jtaTransactionErrorHandler[0]); 
            } else { 
               def.jtaTransactionErrorHandler = CamelDefinitionYamlStep.readJtaTransactionErrorHandlerDefinition(element.jtaTransactionErrorHandler); 
            } 
        } 
        if (element?.defaultErrorHandler !== undefined) { 
            if (Array.isArray(element.defaultErrorHandler)) { 
               def.defaultErrorHandler = CamelDefinitionYamlStep.readDefaultErrorHandlerDefinition(element.defaultErrorHandler[0]); 
            } else { 
               def.defaultErrorHandler = CamelDefinitionYamlStep.readDefaultErrorHandlerDefinition(element.defaultErrorHandler); 
            } 
        } 
        if (element?.springTransactionErrorHandler !== undefined) { 
            if (Array.isArray(element.springTransactionErrorHandler)) { 
               def.springTransactionErrorHandler = CamelDefinitionYamlStep.readSpringTransactionErrorHandlerDefinition(element.springTransactionErrorHandler[0]); 
            } else { 
               def.springTransactionErrorHandler = CamelDefinitionYamlStep.readSpringTransactionErrorHandlerDefinition(element.springTransactionErrorHandler); 
            } 
        } 

        return def;
    }

    static readExpressionSubElementDefinition = (element: any): ExpressionSubElementDefinition => {
        
        const def = element ? new ExpressionSubElementDefinition({...element}) : new ExpressionSubElementDefinition();
        if (element?.ognl !== undefined) { 
            if (Array.isArray(element.ognl)) { 
               def.ognl = CamelDefinitionYamlStep.readOgnlExpression(element.ognl[0]); 
            } else { 
               def.ognl = CamelDefinitionYamlStep.readOgnlExpression(element.ognl); 
            } 
        } 
        if (element?.python !== undefined) { 
            if (Array.isArray(element.python)) { 
               def.python = CamelDefinitionYamlStep.readPythonExpression(element.python[0]); 
            } else { 
               def.python = CamelDefinitionYamlStep.readPythonExpression(element.python); 
            } 
        } 
        if (element?.constant !== undefined) { 
            if (Array.isArray(element.constant)) { 
               def.constant = CamelDefinitionYamlStep.readConstantExpression(element.constant[0]); 
            } else { 
               def.constant = CamelDefinitionYamlStep.readConstantExpression(element.constant); 
            } 
        } 
        if (element?.mvel !== undefined) { 
            if (Array.isArray(element.mvel)) { 
               def.mvel = CamelDefinitionYamlStep.readMvelExpression(element.mvel[0]); 
            } else { 
               def.mvel = CamelDefinitionYamlStep.readMvelExpression(element.mvel); 
            } 
        } 
        if (element?.method !== undefined) { 
            if (Array.isArray(element.method)) { 
               def.method = CamelDefinitionYamlStep.readMethodCallExpression(element.method[0]); 
            } else { 
               def.method = CamelDefinitionYamlStep.readMethodCallExpression(element.method); 
            } 
        } 
        if (element?.xquery !== undefined) { 
            if (Array.isArray(element.xquery)) { 
               def.xquery = CamelDefinitionYamlStep.readXQueryExpression(element.xquery[0]); 
            } else { 
               def.xquery = CamelDefinitionYamlStep.readXQueryExpression(element.xquery); 
            } 
        } 
        if (element?.datasonnet !== undefined) { 
            if (Array.isArray(element.datasonnet)) { 
               def.datasonnet = CamelDefinitionYamlStep.readDatasonnetExpression(element.datasonnet[0]); 
            } else { 
               def.datasonnet = CamelDefinitionYamlStep.readDatasonnetExpression(element.datasonnet); 
            } 
        } 
        if (element?.jq !== undefined) { 
            if (Array.isArray(element.jq)) { 
               def.jq = CamelDefinitionYamlStep.readJqExpression(element.jq[0]); 
            } else { 
               def.jq = CamelDefinitionYamlStep.readJqExpression(element.jq); 
            } 
        } 
        if (element?.js !== undefined) { 
            if (Array.isArray(element.js)) { 
               def.js = CamelDefinitionYamlStep.readJavaScriptExpression(element.js[0]); 
            } else { 
               def.js = CamelDefinitionYamlStep.readJavaScriptExpression(element.js); 
            } 
        } 
        if (element?.language !== undefined) { 
            if (Array.isArray(element.language)) { 
               def.language = CamelDefinitionYamlStep.readLanguageExpression(element.language[0]); 
            } else { 
               def.language = CamelDefinitionYamlStep.readLanguageExpression(element.language); 
            } 
        } 
        if (element?.simple !== undefined) { 
            if (Array.isArray(element.simple)) { 
               def.simple = CamelDefinitionYamlStep.readSimpleExpression(element.simple[0]); 
            } else { 
               def.simple = CamelDefinitionYamlStep.readSimpleExpression(element.simple); 
            } 
        } 
        if (element?.hl7terser !== undefined) { 
            if (Array.isArray(element.hl7terser)) { 
               def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser[0]); 
            } else { 
               def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser); 
            } 
        } 
        if (element?.tokenize !== undefined) { 
            if (Array.isArray(element.tokenize)) { 
               def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize[0]); 
            } else { 
               def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize); 
            } 
        } 
        if (element?.spel !== undefined) { 
            if (Array.isArray(element.spel)) { 
               def.spel = CamelDefinitionYamlStep.readSpELExpression(element.spel[0]); 
            } else { 
               def.spel = CamelDefinitionYamlStep.readSpELExpression(element.spel); 
            } 
        } 
        if (element?.ref !== undefined) { 
            if (Array.isArray(element.ref)) { 
               def.ref = CamelDefinitionYamlStep.readRefExpression(element.ref[0]); 
            } else { 
               def.ref = CamelDefinitionYamlStep.readRefExpression(element.ref); 
            } 
        } 
        if (element?.xpath !== undefined) { 
            if (Array.isArray(element.xpath)) { 
               def.xpath = CamelDefinitionYamlStep.readXPathExpression(element.xpath[0]); 
            } else { 
               def.xpath = CamelDefinitionYamlStep.readXPathExpression(element.xpath); 
            } 
        } 
        if (element?.groovy !== undefined) { 
            if (Array.isArray(element.groovy)) { 
               def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy[0]); 
            } else { 
               def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy); 
            } 
        } 
        if (element?.csimple !== undefined) { 
            if (Array.isArray(element.csimple)) { 
               def.csimple = CamelDefinitionYamlStep.readCSimpleExpression(element.csimple[0]); 
            } else { 
               def.csimple = CamelDefinitionYamlStep.readCSimpleExpression(element.csimple); 
            } 
        } 
        if (element?.exchangeProperty !== undefined) { 
            if (Array.isArray(element.exchangeProperty)) { 
               def.exchangeProperty = CamelDefinitionYamlStep.readExchangePropertyExpression(element.exchangeProperty[0]); 
            } else { 
               def.exchangeProperty = CamelDefinitionYamlStep.readExchangePropertyExpression(element.exchangeProperty); 
            } 
        } 
        if (element?.jsonpath !== undefined) { 
            if (Array.isArray(element.jsonpath)) { 
               def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath[0]); 
            } else { 
               def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath); 
            } 
        } 
        if (element?.header !== undefined) { 
            if (Array.isArray(element.header)) { 
               def.header = CamelDefinitionYamlStep.readHeaderExpression(element.header[0]); 
            } else { 
               def.header = CamelDefinitionYamlStep.readHeaderExpression(element.header); 
            } 
        } 
        if (element?.joor !== undefined) { 
            if (Array.isArray(element.joor)) { 
               def.joor = CamelDefinitionYamlStep.readJoorExpression(element.joor[0]); 
            } else { 
               def.joor = CamelDefinitionYamlStep.readJoorExpression(element.joor); 
            } 
        } 
        if (element?.xtokenize !== undefined) { 
            if (Array.isArray(element.xtokenize)) { 
               def.xtokenize = CamelDefinitionYamlStep.readXMLTokenizerExpression(element.xtokenize[0]); 
            } else { 
               def.xtokenize = CamelDefinitionYamlStep.readXMLTokenizerExpression(element.xtokenize); 
            } 
        } 

        return def;
    }

    static readFaultToleranceConfigurationDefinition = (element: any): FaultToleranceConfigurationDefinition => {
        
        const def = element ? new FaultToleranceConfigurationDefinition({...element}) : new FaultToleranceConfigurationDefinition();

        return def;
    }

    static readFilterDefinition = (element: any): FilterDefinition => {
        
        const def = element ? new FilterDefinition({...element}) : new FilterDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readFinallyDefinition = (element: any): FinallyDefinition => {
        
        const def = element ? new FinallyDefinition({...element}) : new FinallyDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readFromDefinition = (element: any): FromDefinition => {
        if (element && typeof element === 'string') element = { uri: element};
        const def = element ? new FromDefinition({...element}) : new FromDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readGlobalOptionDefinition = (element: any): GlobalOptionDefinition => {
        
        const def = element ? new GlobalOptionDefinition({...element}) : new GlobalOptionDefinition();

        return def;
    }

    static readGlobalOptionsDefinition = (element: any): GlobalOptionsDefinition => {
        
        const def = element ? new GlobalOptionsDefinition({...element}) : new GlobalOptionsDefinition();
        def.globalOption = element && element?.globalOption ? element?.globalOption.map((x:any) => CamelDefinitionYamlStep.readGlobalOptionDefinition(x)) :[]; 

        return def;
    }

    static readIdempotentConsumerDefinition = (element: any): IdempotentConsumerDefinition => {
        
        const def = element ? new IdempotentConsumerDefinition({...element}) : new IdempotentConsumerDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readInOnlyDefinition = (element: any): InOnlyDefinition => {
        if (element && typeof element === 'string') element = {uri: element};
        const def = element ? new InOnlyDefinition({...element}) : new InOnlyDefinition();

        return def;
    }

    static readInOutDefinition = (element: any): InOutDefinition => {
        if (element && typeof element === 'string') element = {uri: element};
        const def = element ? new InOutDefinition({...element}) : new InOutDefinition();

        return def;
    }

    static readInputTypeDefinition = (element: any): InputTypeDefinition => {
        
        const def = element ? new InputTypeDefinition({...element}) : new InputTypeDefinition();

        return def;
    }

    static readInterceptDefinition = (element: any): InterceptDefinition => {
        
        const def = element ? new InterceptDefinition({...element}) : new InterceptDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readInterceptFromDefinition = (element: any): InterceptFromDefinition => {
        
        const def = element ? new InterceptFromDefinition({...element}) : new InterceptFromDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readInterceptSendToEndpointDefinition = (element: any): InterceptSendToEndpointDefinition => {
        if (element && typeof element === 'string') element = {uri: element};
        const def = element ? new InterceptSendToEndpointDefinition({...element}) : new InterceptSendToEndpointDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readKameletDefinition = (element: any): KameletDefinition => {
        if (element && typeof element === 'string') element = {name: element};
        const def = element ? new KameletDefinition({...element}) : new KameletDefinition();

        return def;
    }

    static readLoadBalanceDefinition = (element: any): LoadBalanceDefinition => {
        
        const def = element ? new LoadBalanceDefinition({...element}) : new LoadBalanceDefinition();
        if (element?.random !== undefined) { 
            if (Array.isArray(element.random)) { 
               def.random = CamelDefinitionYamlStep.readRandomLoadBalancerDefinition(element.random[0]); 
            } else { 
               def.random = CamelDefinitionYamlStep.readRandomLoadBalancerDefinition(element.random); 
            } 
        } 
        if (element?.customLoadBalancer !== undefined) { 
            if (Array.isArray(element.customLoadBalancer)) { 
               def.customLoadBalancer = CamelDefinitionYamlStep.readCustomLoadBalancerDefinition(element.customLoadBalancer[0]); 
            } else { 
               def.customLoadBalancer = CamelDefinitionYamlStep.readCustomLoadBalancerDefinition(element.customLoadBalancer); 
            } 
        } 
        if (element?.failover !== undefined) { 
            if (Array.isArray(element.failover)) { 
               def.failover = CamelDefinitionYamlStep.readFailoverLoadBalancerDefinition(element.failover[0]); 
            } else { 
               def.failover = CamelDefinitionYamlStep.readFailoverLoadBalancerDefinition(element.failover); 
            } 
        } 
        if (element?.sticky !== undefined) { 
            if (Array.isArray(element.sticky)) { 
               def.sticky = CamelDefinitionYamlStep.readStickyLoadBalancerDefinition(element.sticky[0]); 
            } else { 
               def.sticky = CamelDefinitionYamlStep.readStickyLoadBalancerDefinition(element.sticky); 
            } 
        } 
        if (element?.topic !== undefined) { 
            if (Array.isArray(element.topic)) { 
               def.topic = CamelDefinitionYamlStep.readTopicLoadBalancerDefinition(element.topic[0]); 
            } else { 
               def.topic = CamelDefinitionYamlStep.readTopicLoadBalancerDefinition(element.topic); 
            } 
        } 
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
        if (element?.weighted !== undefined) { 
            if (Array.isArray(element.weighted)) { 
               def.weighted = CamelDefinitionYamlStep.readWeightedLoadBalancerDefinition(element.weighted[0]); 
            } else { 
               def.weighted = CamelDefinitionYamlStep.readWeightedLoadBalancerDefinition(element.weighted); 
            } 
        } 
        if (element?.roundRobin !== undefined) { 
            if (Array.isArray(element.roundRobin)) { 
               def.roundRobin = CamelDefinitionYamlStep.readRoundRobinLoadBalancerDefinition(element.roundRobin[0]); 
            } else { 
               def.roundRobin = CamelDefinitionYamlStep.readRoundRobinLoadBalancerDefinition(element.roundRobin); 
            } 
        } 

        return def;
    }

    static readLogDefinition = (element: any): LogDefinition => {
        if (element && typeof element === 'string') element = {message: element};
        const def = element ? new LogDefinition({...element}) : new LogDefinition();

        return def;
    }

    static readLoopDefinition = (element: any): LoopDefinition => {
        
        const def = element ? new LoopDefinition({...element}) : new LoopDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readMarshalDefinition = (element: any): MarshalDefinition => {
        
        const def = element ? new MarshalDefinition({...element}) : new MarshalDefinition();
        if (element?.univocityCsv !== undefined) { 
            if (Array.isArray(element.univocityCsv)) { 
               def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv[0]); 
            } else { 
               def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv); 
            } 
        } 
        if (element?.protobuf !== undefined) { 
            if (Array.isArray(element.protobuf)) { 
               def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf[0]); 
            } else { 
               def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf); 
            } 
        } 
        if (element?.tarFile !== undefined) { 
            if (Array.isArray(element.tarFile)) { 
               def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile[0]); 
            } else { 
               def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile); 
            } 
        } 
        if (element?.tidyMarkup !== undefined) { 
            if (Array.isArray(element.tidyMarkup)) { 
               def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup[0]); 
            } else { 
               def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup); 
            } 
        } 
        if (element?.csv !== undefined) { 
            if (Array.isArray(element.csv)) { 
               def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv[0]); 
            } else { 
               def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv); 
            } 
        } 
        if (element?.base64 !== undefined) { 
            if (Array.isArray(element.base64)) { 
               def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64[0]); 
            } else { 
               def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64); 
            } 
        } 
        if (element?.zipDeflater !== undefined) { 
            if (Array.isArray(element.zipDeflater)) { 
               def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater[0]); 
            } else { 
               def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater); 
            } 
        } 
        if (element?.bindy !== undefined) { 
            if (Array.isArray(element.bindy)) { 
               def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy[0]); 
            } else { 
               def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy); 
            } 
        } 
        if (element?.syslog !== undefined) { 
            if (Array.isArray(element.syslog)) { 
               def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog[0]); 
            } else { 
               def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog); 
            } 
        } 
        if (element?.zipFile !== undefined) { 
            if (Array.isArray(element.zipFile)) { 
               def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile[0]); 
            } else { 
               def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile); 
            } 
        } 
        if (element?.jaxb !== undefined) { 
            if (Array.isArray(element.jaxb)) { 
               def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb[0]); 
            } else { 
               def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb); 
            } 
        } 
        if (element?.rss !== undefined) { 
            if (Array.isArray(element.rss)) { 
               def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss[0]); 
            } else { 
               def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss); 
            } 
        } 
        if (element?.mimeMultipart !== undefined) { 
            if (Array.isArray(element.mimeMultipart)) { 
               def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart[0]); 
            } else { 
               def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart); 
            } 
        } 
        if (element?.asn1 !== undefined) { 
            if (Array.isArray(element.asn1)) { 
               def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1[0]); 
            } else { 
               def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1); 
            } 
        } 
        if (element?.pgp !== undefined) { 
            if (Array.isArray(element.pgp)) { 
               def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp[0]); 
            } else { 
               def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp); 
            } 
        } 
        if (element?.thrift !== undefined) { 
            if (Array.isArray(element.thrift)) { 
               def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift[0]); 
            } else { 
               def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift); 
            } 
        } 
        if (element?.json !== undefined) { 
            if (Array.isArray(element.json)) { 
               def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json[0]); 
            } else { 
               def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json); 
            } 
        } 
        if (element?.lzf !== undefined) { 
            if (Array.isArray(element.lzf)) { 
               def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf[0]); 
            } else { 
               def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf); 
            } 
        } 
        if (element?.fhirXml !== undefined) { 
            if (Array.isArray(element.fhirXml)) { 
               def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml[0]); 
            } else { 
               def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml); 
            } 
        } 
        if (element?.barcode !== undefined) { 
            if (Array.isArray(element.barcode)) { 
               def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode[0]); 
            } else { 
               def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode); 
            } 
        } 
        if (element?.avro !== undefined) { 
            if (Array.isArray(element.avro)) { 
               def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro[0]); 
            } else { 
               def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro); 
            } 
        } 
        if (element?.yaml !== undefined) { 
            if (Array.isArray(element.yaml)) { 
               def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml[0]); 
            } else { 
               def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml); 
            } 
        } 
        if (element?.fhirJson !== undefined) { 
            if (Array.isArray(element.fhirJson)) { 
               def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson[0]); 
            } else { 
               def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson); 
            } 
        } 
        if (element?.any23 !== undefined) { 
            if (Array.isArray(element.any23)) { 
               def.any23 = CamelDefinitionYamlStep.readAny23DataFormat(element.any23[0]); 
            } else { 
               def.any23 = CamelDefinitionYamlStep.readAny23DataFormat(element.any23); 
            } 
        } 
        if (element?.custom !== undefined) { 
            if (Array.isArray(element.custom)) { 
               def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom[0]); 
            } else { 
               def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom); 
            } 
        } 
        if (element?.flatpack !== undefined) { 
            if (Array.isArray(element.flatpack)) { 
               def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack[0]); 
            } else { 
               def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack); 
            } 
        } 
        if (element?.swiftMx !== undefined) { 
            if (Array.isArray(element.swiftMx)) { 
               def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx[0]); 
            } else { 
               def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx); 
            } 
        } 
        if (element?.cbor !== undefined) { 
            if (Array.isArray(element.cbor)) { 
               def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor[0]); 
            } else { 
               def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor); 
            } 
        } 
        if (element?.crypto !== undefined) { 
            if (Array.isArray(element.crypto)) { 
               def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto[0]); 
            } else { 
               def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto); 
            } 
        } 
        if (element?.swiftMt !== undefined) { 
            if (Array.isArray(element.swiftMt)) { 
               def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt[0]); 
            } else { 
               def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt); 
            } 
        } 
        if (element?.univocityTsv !== undefined) { 
            if (Array.isArray(element.univocityTsv)) { 
               def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv[0]); 
            } else { 
               def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv); 
            } 
        } 
        if (element?.hl7 !== undefined) { 
            if (Array.isArray(element.hl7)) { 
               def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7[0]); 
            } else { 
               def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7); 
            } 
        } 
        if (element?.jsonApi !== undefined) { 
            if (Array.isArray(element.jsonApi)) { 
               def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi[0]); 
            } else { 
               def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi); 
            } 
        } 
        if (element?.xmlSecurity !== undefined) { 
            if (Array.isArray(element.xmlSecurity)) { 
               def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity[0]); 
            } else { 
               def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity); 
            } 
        } 
        if (element?.ical !== undefined) { 
            if (Array.isArray(element.ical)) { 
               def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical[0]); 
            } else { 
               def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical); 
            } 
        } 
        if (element?.univocityFixed !== undefined) { 
            if (Array.isArray(element.univocityFixed)) { 
               def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed[0]); 
            } else { 
               def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed); 
            } 
        } 
        if (element?.jacksonXml !== undefined) { 
            if (Array.isArray(element.jacksonXml)) { 
               def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml[0]); 
            } else { 
               def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml); 
            } 
        } 
        if (element?.grok !== undefined) { 
            if (Array.isArray(element.grok)) { 
               def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok[0]); 
            } else { 
               def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok); 
            } 
        } 
        if (element?.xstream !== undefined) { 
            if (Array.isArray(element.xstream)) { 
               def.xstream = CamelDefinitionYamlStep.readXStreamDataFormat(element.xstream[0]); 
            } else { 
               def.xstream = CamelDefinitionYamlStep.readXStreamDataFormat(element.xstream); 
            } 
        } 
        if (element?.gzipDeflater !== undefined) { 
            if (Array.isArray(element.gzipDeflater)) { 
               def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater[0]); 
            } else { 
               def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater); 
            } 
        } 
        if (element?.soap !== undefined) { 
            if (Array.isArray(element.soap)) { 
               def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap[0]); 
            } else { 
               def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap); 
            } 
        } 

        return def;
    }

    static readMulticastDefinition = (element: any): MulticastDefinition => {
        
        const def = element ? new MulticastDefinition({...element}) : new MulticastDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readOnCompletionDefinition = (element: any): OnCompletionDefinition => {
        
        const def = element ? new OnCompletionDefinition({...element}) : new OnCompletionDefinition();
        if (element?.onWhen !== undefined) { 
            if (Array.isArray(element.onWhen)) { 
               def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen[0]); 
            } else { 
               def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen); 
            } 
        } 
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readOnExceptionDefinition = (element: any): OnExceptionDefinition => {
        
        const def = element ? new OnExceptionDefinition({...element}) : new OnExceptionDefinition();
        if (element?.retryWhile !== undefined) { 
            if (Array.isArray(element.retryWhile)) { 
               def.retryWhile = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.retryWhile[0]); 
            } else { 
               def.retryWhile = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.retryWhile); 
            } 
        } 
        if (element?.redeliveryPolicy !== undefined) { 
            if (Array.isArray(element.redeliveryPolicy)) { 
               def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy[0]); 
            } else { 
               def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy); 
            } 
        } 
        if (element?.handled !== undefined) { 
            if (Array.isArray(element.handled)) { 
               def.handled = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.handled[0]); 
            } else { 
               def.handled = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.handled); 
            } 
        } 
        if (element?.onWhen !== undefined) { 
            if (Array.isArray(element.onWhen)) { 
               def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen[0]); 
            } else { 
               def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen); 
            } 
        } 
        if (element?.continued !== undefined) { 
            if (Array.isArray(element.continued)) { 
               def.continued = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.continued[0]); 
            } else { 
               def.continued = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.continued); 
            } 
        } 
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readOnFallbackDefinition = (element: any): OnFallbackDefinition => {
        
        const def = element ? new OnFallbackDefinition({...element}) : new OnFallbackDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readOptimisticLockRetryPolicyDefinition = (element: any): OptimisticLockRetryPolicyDefinition => {
        
        const def = element ? new OptimisticLockRetryPolicyDefinition({...element}) : new OptimisticLockRetryPolicyDefinition();

        return def;
    }

    static readOtherwiseDefinition = (element: any): OtherwiseDefinition => {
        
        const def = element ? new OtherwiseDefinition({...element}) : new OtherwiseDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readOutputDefinition = (element: any): OutputDefinition => {
        
        const def = element ? new OutputDefinition({...element}) : new OutputDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readOutputTypeDefinition = (element: any): OutputTypeDefinition => {
        
        const def = element ? new OutputTypeDefinition({...element}) : new OutputTypeDefinition();

        return def;
    }

    static readPackageScanDefinition = (element: any): PackageScanDefinition => {
        
        const def = element ? new PackageScanDefinition({...element}) : new PackageScanDefinition();

        return def;
    }

    static readPausableDefinition = (element: any): PausableDefinition => {
        
        const def = element ? new PausableDefinition({...element}) : new PausableDefinition();

        return def;
    }

    static readPipelineDefinition = (element: any): PipelineDefinition => {
        
        const def = element ? new PipelineDefinition({...element}) : new PipelineDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readPolicyDefinition = (element: any): PolicyDefinition => {
        
        const def = element ? new PolicyDefinition({...element}) : new PolicyDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readPollEnrichDefinition = (element: any): PollEnrichDefinition => {
        
        const def = element ? new PollEnrichDefinition({...element}) : new PollEnrichDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readProcessDefinition = (element: any): ProcessDefinition => {
        
        const def = element ? new ProcessDefinition({...element}) : new ProcessDefinition();

        return def;
    }

    static readPropertyDefinition = (element: any): PropertyDefinition => {
        
        const def = element ? new PropertyDefinition({...element}) : new PropertyDefinition();

        return def;
    }

    static readPropertyExpressionDefinition = (element: any): PropertyExpressionDefinition => {
        
        const def = element ? new PropertyExpressionDefinition({...element}) : new PropertyExpressionDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readRecipientListDefinition = (element: any): RecipientListDefinition => {
        
        const def = element ? new RecipientListDefinition({...element}) : new RecipientListDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readRedeliveryPolicyDefinition = (element: any): RedeliveryPolicyDefinition => {
        
        const def = element ? new RedeliveryPolicyDefinition({...element}) : new RedeliveryPolicyDefinition();

        return def;
    }

    static readRemoveHeaderDefinition = (element: any): RemoveHeaderDefinition => {
        if (element && typeof element === 'string') element = {name: element};
        const def = element ? new RemoveHeaderDefinition({...element}) : new RemoveHeaderDefinition();

        return def;
    }

    static readRemoveHeadersDefinition = (element: any): RemoveHeadersDefinition => {
        if (element && typeof element === 'string') element = {pattern: element};
        const def = element ? new RemoveHeadersDefinition({...element}) : new RemoveHeadersDefinition();

        return def;
    }

    static readRemovePropertiesDefinition = (element: any): RemovePropertiesDefinition => {
        if (element && typeof element === 'string') element = {pattern: element};
        const def = element ? new RemovePropertiesDefinition({...element}) : new RemovePropertiesDefinition();

        return def;
    }

    static readRemovePropertyDefinition = (element: any): RemovePropertyDefinition => {
        if (element && typeof element === 'string') element = {name: element};
        const def = element ? new RemovePropertyDefinition({...element}) : new RemovePropertyDefinition();

        return def;
    }

    static readResequenceDefinition = (element: any): ResequenceDefinition => {
        
        const def = element ? new ResequenceDefinition({...element}) : new ResequenceDefinition();
        if (element?.streamConfig !== undefined) { 
            if (Array.isArray(element.streamConfig)) { 
               def.streamConfig = CamelDefinitionYamlStep.readStreamResequencerConfig(element.streamConfig[0]); 
            } else { 
               def.streamConfig = CamelDefinitionYamlStep.readStreamResequencerConfig(element.streamConfig); 
            } 
        } 
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
        if (element?.batchConfig !== undefined) { 
            if (Array.isArray(element.batchConfig)) { 
               def.batchConfig = CamelDefinitionYamlStep.readBatchResequencerConfig(element.batchConfig[0]); 
            } else { 
               def.batchConfig = CamelDefinitionYamlStep.readBatchResequencerConfig(element.batchConfig); 
            } 
        } 

        return def;
    }

    static readResilience4jConfigurationDefinition = (element: any): Resilience4jConfigurationDefinition => {
        
        const def = element ? new Resilience4jConfigurationDefinition({...element}) : new Resilience4jConfigurationDefinition();

        return def;
    }

    static readRestContextRefDefinition = (element: any): RestContextRefDefinition => {
        if (element && typeof element === 'string') element = {ref: element};
        const def = element ? new RestContextRefDefinition({...element}) : new RestContextRefDefinition();

        return def;
    }

    static readResumableDefinition = (element: any): ResumableDefinition => {
        
        const def = element ? new ResumableDefinition({...element}) : new ResumableDefinition();

        return def;
    }

    static readRollbackDefinition = (element: any): RollbackDefinition => {
        
        const def = element ? new RollbackDefinition({...element}) : new RollbackDefinition();

        return def;
    }

    static readRouteBuilderDefinition = (element: any): RouteBuilderDefinition => {
        if (element && typeof element === 'string') element = {ref: element};
        const def = element ? new RouteBuilderDefinition({...element}) : new RouteBuilderDefinition();

        return def;
    }

    static readRouteConfigurationContextRefDefinition = (element: any): RouteConfigurationContextRefDefinition => {
        if (element && typeof element === 'string') element = {ref: element};
        const def = element ? new RouteConfigurationContextRefDefinition({...element}) : new RouteConfigurationContextRefDefinition();

        return def;
    }

    static readRouteConfigurationDefinition = (element: any): RouteConfigurationDefinition => {
        
        const def = element ? new RouteConfigurationDefinition({...element}) : new RouteConfigurationDefinition();
        def.onCompletion = element && element?.onCompletion ? element?.onCompletion.map((x:any) => CamelDefinitionYamlStep.readOnCompletionDefinition(x)) :[]; 
        def.interceptSendToEndpoint = element && element?.interceptSendToEndpoint ? element?.interceptSendToEndpoint.map((x:any) => CamelDefinitionYamlStep.readInterceptSendToEndpointDefinition(x)) :[]; 
        def.intercept = element && element?.intercept ? element?.intercept.map((x:any) => CamelDefinitionYamlStep.readInterceptDefinition(x)) :[]; 
        if (element?.errorHandler !== undefined) { 
            if (Array.isArray(element.errorHandler)) { 
               def.errorHandler = CamelDefinitionYamlStep.readErrorHandlerDefinition(element.errorHandler[0]); 
            } else { 
               def.errorHandler = CamelDefinitionYamlStep.readErrorHandlerDefinition(element.errorHandler); 
            } 
        } 
        def.onException = element && element?.onException ? element?.onException.map((x:any) => CamelDefinitionYamlStep.readOnExceptionDefinition(x)) :[]; 
        def.interceptFrom = element && element?.interceptFrom ? element?.interceptFrom.map((x:any) => CamelDefinitionYamlStep.readInterceptFromDefinition(x)) :[]; 

        return def;
    }

    static readRouteContextRefDefinition = (element: any): RouteContextRefDefinition => {
        if (element && typeof element === 'string') element = {ref: element};
        const def = element ? new RouteContextRefDefinition({...element}) : new RouteContextRefDefinition();

        return def;
    }

    static readRouteDefinition = (element: any): RouteDefinition => {
        
        const def = element ? new RouteDefinition({...element}) : new RouteDefinition();
        if (element?.from !== undefined) { 
            if (Array.isArray(element.from)) { 
               def.from = CamelDefinitionYamlStep.readFromDefinition(element.from[0]); 
            } else { 
               def.from = CamelDefinitionYamlStep.readFromDefinition(element.from); 
            } 
        } 

        return def;
    }

    static readRouteTemplateBeanDefinition = (element: any): RouteTemplateBeanDefinition => {
        
        const def = element ? new RouteTemplateBeanDefinition({...element}) : new RouteTemplateBeanDefinition();
        def.property = element && element?.property ? element?.property.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readRouteTemplateDefinition = (element: any): RouteTemplateDefinition => {
        
        const def = element ? new RouteTemplateDefinition({...element}) : new RouteTemplateDefinition();
        if (element?.route !== undefined) { 
            if (Array.isArray(element.route)) { 
               def.route = CamelDefinitionYamlStep.readRouteDefinition(element.route[0]); 
            } else { 
               def.route = CamelDefinitionYamlStep.readRouteDefinition(element.route); 
            } 
        } 
        def.beans = element && element?.beans ? element?.beans.map((x:any) => CamelDefinitionYamlStep.readNamedBeanDefinition(x)) :[]; 
        if (element?.from !== undefined) { 
            if (Array.isArray(element.from)) { 
               def.from = CamelDefinitionYamlStep.readFromDefinition(element.from[0]); 
            } else { 
               def.from = CamelDefinitionYamlStep.readFromDefinition(element.from); 
            } 
        } 
        def.parameters = element && element?.parameters ? element?.parameters.map((x:any) => CamelDefinitionYamlStep.readRouteTemplateParameterDefinition(x)) :[]; 

        return def;
    }

    static readRouteTemplateParameterDefinition = (element: any): RouteTemplateParameterDefinition => {
        
        const def = element ? new RouteTemplateParameterDefinition({...element}) : new RouteTemplateParameterDefinition();

        return def;
    }

    static readRoutingSlipDefinition = (element: any): RoutingSlipDefinition => {
        
        const def = element ? new RoutingSlipDefinition({...element}) : new RoutingSlipDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readSagaActionUriDefinition = (element: any): SagaActionUriDefinition => {
        if (element && typeof element === 'string') element = {uri: element};
        const def = element ? new SagaActionUriDefinition({...element}) : new SagaActionUriDefinition();

        return def;
    }

    static readSagaDefinition = (element: any): SagaDefinition => {
        
        const def = element ? new SagaDefinition({...element}) : new SagaDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
        def.option = element && element?.option ? element?.option.map((x:any) => CamelDefinitionYamlStep.readPropertyExpressionDefinition(x)) :[]; 

        return def;
    }

    static readSamplingDefinition = (element: any): SamplingDefinition => {
        
        const def = element ? new SamplingDefinition({...element}) : new SamplingDefinition();

        return def;
    }

    static readScriptDefinition = (element: any): ScriptDefinition => {
        
        const def = element ? new ScriptDefinition({...element}) : new ScriptDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readSetBodyDefinition = (element: any): SetBodyDefinition => {
        
        const def = element ? new SetBodyDefinition({...element}) : new SetBodyDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readSetExchangePatternDefinition = (element: any): SetExchangePatternDefinition => {
        if (element && typeof element === 'string') element = {pattern: element};
        const def = element ? new SetExchangePatternDefinition({...element}) : new SetExchangePatternDefinition();

        return def;
    }

    static readSetHeaderDefinition = (element: any): SetHeaderDefinition => {
        
        const def = element ? new SetHeaderDefinition({...element}) : new SetHeaderDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readSetPropertyDefinition = (element: any): SetPropertyDefinition => {
        
        const def = element ? new SetPropertyDefinition({...element}) : new SetPropertyDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readSortDefinition = (element: any): SortDefinition => {
        
        const def = element ? new SortDefinition({...element}) : new SortDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readSplitDefinition = (element: any): SplitDefinition => {
        
        const def = element ? new SplitDefinition({...element}) : new SplitDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readStepDefinition = (element: any): StepDefinition => {
        
        const def = element ? new StepDefinition({...element}) : new StepDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readStopDefinition = (element: any): StopDefinition => {
        
        const def = element ? new StopDefinition({...element}) : new StopDefinition();

        return def;
    }

    static readTemplatedRouteBeanDefinition = (element: any): TemplatedRouteBeanDefinition => {
        
        const def = element ? new TemplatedRouteBeanDefinition({...element}) : new TemplatedRouteBeanDefinition();
        def.property = element && element?.property ? element?.property.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readTemplatedRouteDefinition = (element: any): TemplatedRouteDefinition => {
        
        const def = element ? new TemplatedRouteDefinition({...element}) : new TemplatedRouteDefinition();
        def.beans = element && element?.beans ? element?.beans.map((x:any) => CamelDefinitionYamlStep.readNamedBeanDefinition(x)) :[]; 
        def.parameters = element && element?.parameters ? element?.parameters.map((x:any) => CamelDefinitionYamlStep.readTemplatedRouteParameterDefinition(x)) :[]; 

        return def;
    }

    static readTemplatedRouteParameterDefinition = (element: any): TemplatedRouteParameterDefinition => {
        
        const def = element ? new TemplatedRouteParameterDefinition({...element}) : new TemplatedRouteParameterDefinition();

        return def;
    }

    static readThreadPoolProfileDefinition = (element: any): ThreadPoolProfileDefinition => {
        
        const def = element ? new ThreadPoolProfileDefinition({...element}) : new ThreadPoolProfileDefinition();

        return def;
    }

    static readThreadsDefinition = (element: any): ThreadsDefinition => {
        
        const def = element ? new ThreadsDefinition({...element}) : new ThreadsDefinition();

        return def;
    }

    static readThrottleDefinition = (element: any): ThrottleDefinition => {
        
        const def = element ? new ThrottleDefinition({...element}) : new ThrottleDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }
        if (element?.correlationExpression !== undefined) { 
            if (Array.isArray(element.correlationExpression)) { 
               def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression[0]); 
            } else { 
               def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression); 
            } 
        } 

        return def;
    }

    static readThrowExceptionDefinition = (element: any): ThrowExceptionDefinition => {
        
        const def = element ? new ThrowExceptionDefinition({...element}) : new ThrowExceptionDefinition();

        return def;
    }

    static readToDefinition = (element: any): ToDefinition => {
        if (element && typeof element === 'string') element = {uri: element};
        const def = element ? new ToDefinition({...element}) : new ToDefinition();

        return def;
    }

    static readToDynamicDefinition = (element: any): ToDynamicDefinition => {
        if (element && typeof element === 'string') element = {uri: element};
        const def = element ? new ToDynamicDefinition({...element}) : new ToDynamicDefinition();

        return def;
    }

    static readTransactedDefinition = (element: any): TransactedDefinition => {
        
        const def = element ? new TransactedDefinition({...element}) : new TransactedDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readTransformDefinition = (element: any): TransformDefinition => {
        
        const def = element ? new TransformDefinition({...element}) : new TransformDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readTryDefinition = (element: any): TryDefinition => {
        
        const def = element ? new TryDefinition({...element}) : new TryDefinition();
        if (element?.doFinally !== undefined) { 
            if (Array.isArray(element.doFinally)) { 
               def.doFinally = CamelDefinitionYamlStep.readFinallyDefinition(element.doFinally[0]); 
            } else { 
               def.doFinally = CamelDefinitionYamlStep.readFinallyDefinition(element.doFinally); 
            } 
        } 
        def.doCatch = element && element?.doCatch ? element?.doCatch.map((x:any) => CamelDefinitionYamlStep.readCatchDefinition(x)) :[]; 
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readUnmarshalDefinition = (element: any): UnmarshalDefinition => {
        
        const def = element ? new UnmarshalDefinition({...element}) : new UnmarshalDefinition();
        if (element?.univocityCsv !== undefined) { 
            if (Array.isArray(element.univocityCsv)) { 
               def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv[0]); 
            } else { 
               def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv); 
            } 
        } 
        if (element?.protobuf !== undefined) { 
            if (Array.isArray(element.protobuf)) { 
               def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf[0]); 
            } else { 
               def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf); 
            } 
        } 
        if (element?.tarFile !== undefined) { 
            if (Array.isArray(element.tarFile)) { 
               def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile[0]); 
            } else { 
               def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile); 
            } 
        } 
        if (element?.tidyMarkup !== undefined) { 
            if (Array.isArray(element.tidyMarkup)) { 
               def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup[0]); 
            } else { 
               def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup); 
            } 
        } 
        if (element?.csv !== undefined) { 
            if (Array.isArray(element.csv)) { 
               def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv[0]); 
            } else { 
               def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv); 
            } 
        } 
        if (element?.base64 !== undefined) { 
            if (Array.isArray(element.base64)) { 
               def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64[0]); 
            } else { 
               def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64); 
            } 
        } 
        if (element?.zipDeflater !== undefined) { 
            if (Array.isArray(element.zipDeflater)) { 
               def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater[0]); 
            } else { 
               def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater); 
            } 
        } 
        if (element?.bindy !== undefined) { 
            if (Array.isArray(element.bindy)) { 
               def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy[0]); 
            } else { 
               def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy); 
            } 
        } 
        if (element?.syslog !== undefined) { 
            if (Array.isArray(element.syslog)) { 
               def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog[0]); 
            } else { 
               def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog); 
            } 
        } 
        if (element?.zipFile !== undefined) { 
            if (Array.isArray(element.zipFile)) { 
               def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile[0]); 
            } else { 
               def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile); 
            } 
        } 
        if (element?.jaxb !== undefined) { 
            if (Array.isArray(element.jaxb)) { 
               def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb[0]); 
            } else { 
               def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb); 
            } 
        } 
        if (element?.rss !== undefined) { 
            if (Array.isArray(element.rss)) { 
               def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss[0]); 
            } else { 
               def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss); 
            } 
        } 
        if (element?.mimeMultipart !== undefined) { 
            if (Array.isArray(element.mimeMultipart)) { 
               def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart[0]); 
            } else { 
               def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart); 
            } 
        } 
        if (element?.asn1 !== undefined) { 
            if (Array.isArray(element.asn1)) { 
               def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1[0]); 
            } else { 
               def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1); 
            } 
        } 
        if (element?.pgp !== undefined) { 
            if (Array.isArray(element.pgp)) { 
               def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp[0]); 
            } else { 
               def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp); 
            } 
        } 
        if (element?.thrift !== undefined) { 
            if (Array.isArray(element.thrift)) { 
               def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift[0]); 
            } else { 
               def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift); 
            } 
        } 
        if (element?.json !== undefined) { 
            if (Array.isArray(element.json)) { 
               def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json[0]); 
            } else { 
               def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json); 
            } 
        } 
        if (element?.lzf !== undefined) { 
            if (Array.isArray(element.lzf)) { 
               def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf[0]); 
            } else { 
               def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf); 
            } 
        } 
        if (element?.fhirXml !== undefined) { 
            if (Array.isArray(element.fhirXml)) { 
               def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml[0]); 
            } else { 
               def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml); 
            } 
        } 
        if (element?.barcode !== undefined) { 
            if (Array.isArray(element.barcode)) { 
               def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode[0]); 
            } else { 
               def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode); 
            } 
        } 
        if (element?.avro !== undefined) { 
            if (Array.isArray(element.avro)) { 
               def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro[0]); 
            } else { 
               def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro); 
            } 
        } 
        if (element?.yaml !== undefined) { 
            if (Array.isArray(element.yaml)) { 
               def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml[0]); 
            } else { 
               def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml); 
            } 
        } 
        if (element?.fhirJson !== undefined) { 
            if (Array.isArray(element.fhirJson)) { 
               def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson[0]); 
            } else { 
               def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson); 
            } 
        } 
        if (element?.any23 !== undefined) { 
            if (Array.isArray(element.any23)) { 
               def.any23 = CamelDefinitionYamlStep.readAny23DataFormat(element.any23[0]); 
            } else { 
               def.any23 = CamelDefinitionYamlStep.readAny23DataFormat(element.any23); 
            } 
        } 
        if (element?.custom !== undefined) { 
            if (Array.isArray(element.custom)) { 
               def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom[0]); 
            } else { 
               def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom); 
            } 
        } 
        if (element?.flatpack !== undefined) { 
            if (Array.isArray(element.flatpack)) { 
               def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack[0]); 
            } else { 
               def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack); 
            } 
        } 
        if (element?.swiftMx !== undefined) { 
            if (Array.isArray(element.swiftMx)) { 
               def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx[0]); 
            } else { 
               def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx); 
            } 
        } 
        if (element?.cbor !== undefined) { 
            if (Array.isArray(element.cbor)) { 
               def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor[0]); 
            } else { 
               def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor); 
            } 
        } 
        if (element?.crypto !== undefined) { 
            if (Array.isArray(element.crypto)) { 
               def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto[0]); 
            } else { 
               def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto); 
            } 
        } 
        if (element?.swiftMt !== undefined) { 
            if (Array.isArray(element.swiftMt)) { 
               def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt[0]); 
            } else { 
               def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt); 
            } 
        } 
        if (element?.univocityTsv !== undefined) { 
            if (Array.isArray(element.univocityTsv)) { 
               def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv[0]); 
            } else { 
               def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv); 
            } 
        } 
        if (element?.hl7 !== undefined) { 
            if (Array.isArray(element.hl7)) { 
               def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7[0]); 
            } else { 
               def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7); 
            } 
        } 
        if (element?.jsonApi !== undefined) { 
            if (Array.isArray(element.jsonApi)) { 
               def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi[0]); 
            } else { 
               def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi); 
            } 
        } 
        if (element?.xmlSecurity !== undefined) { 
            if (Array.isArray(element.xmlSecurity)) { 
               def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity[0]); 
            } else { 
               def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity); 
            } 
        } 
        if (element?.ical !== undefined) { 
            if (Array.isArray(element.ical)) { 
               def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical[0]); 
            } else { 
               def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical); 
            } 
        } 
        if (element?.univocityFixed !== undefined) { 
            if (Array.isArray(element.univocityFixed)) { 
               def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed[0]); 
            } else { 
               def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed); 
            } 
        } 
        if (element?.jacksonXml !== undefined) { 
            if (Array.isArray(element.jacksonXml)) { 
               def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml[0]); 
            } else { 
               def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml); 
            } 
        } 
        if (element?.grok !== undefined) { 
            if (Array.isArray(element.grok)) { 
               def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok[0]); 
            } else { 
               def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok); 
            } 
        } 
        if (element?.xstream !== undefined) { 
            if (Array.isArray(element.xstream)) { 
               def.xstream = CamelDefinitionYamlStep.readXStreamDataFormat(element.xstream[0]); 
            } else { 
               def.xstream = CamelDefinitionYamlStep.readXStreamDataFormat(element.xstream); 
            } 
        } 
        if (element?.gzipDeflater !== undefined) { 
            if (Array.isArray(element.gzipDeflater)) { 
               def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater[0]); 
            } else { 
               def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater); 
            } 
        } 
        if (element?.soap !== undefined) { 
            if (Array.isArray(element.soap)) { 
               def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap[0]); 
            } else { 
               def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap); 
            } 
        } 

        return def;
    }

    static readValidateDefinition = (element: any): ValidateDefinition => {
        
        const def = element ? new ValidateDefinition({...element}) : new ValidateDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readValueDefinition = (element: any): ValueDefinition => {
        
        const def = element ? new ValueDefinition({...element}) : new ValueDefinition();

        return def;
    }

    static readWhenDefinition = (element: any): WhenDefinition => {
        
        const def = element ? new WhenDefinition({...element}) : new WhenDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readWhenSkipSendToEndpointDefinition = (element: any): WhenSkipSendToEndpointDefinition => {
        
        const def = element ? new WhenSkipSendToEndpointDefinition({...element}) : new WhenSkipSendToEndpointDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readWireTapDefinition = (element: any): WireTapDefinition => {
        
        const def = element ? new WireTapDefinition({...element}) : new WireTapDefinition();

        return def;
    }

    static readBlacklistServiceCallServiceFilterConfiguration = (element: any): BlacklistServiceCallServiceFilterConfiguration => {
        
        const def = element ? new BlacklistServiceCallServiceFilterConfiguration({...element}) : new BlacklistServiceCallServiceFilterConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readCachingServiceCallServiceDiscoveryConfiguration = (element: any): CachingServiceCallServiceDiscoveryConfiguration => {
        
        const def = element ? new CachingServiceCallServiceDiscoveryConfiguration({...element}) : new CachingServiceCallServiceDiscoveryConfiguration();
        if (element?.dnsServiceDiscovery !== undefined) { 
            if (Array.isArray(element.dnsServiceDiscovery)) { 
               def.dnsServiceDiscovery = CamelDefinitionYamlStep.readDnsServiceCallServiceDiscoveryConfiguration(element.dnsServiceDiscovery[0]); 
            } else { 
               def.dnsServiceDiscovery = CamelDefinitionYamlStep.readDnsServiceCallServiceDiscoveryConfiguration(element.dnsServiceDiscovery); 
            } 
        } 
        if (element?.kubernetesServiceDiscovery !== undefined) { 
            if (Array.isArray(element.kubernetesServiceDiscovery)) { 
               def.kubernetesServiceDiscovery = CamelDefinitionYamlStep.readKubernetesServiceCallServiceDiscoveryConfiguration(element.kubernetesServiceDiscovery[0]); 
            } else { 
               def.kubernetesServiceDiscovery = CamelDefinitionYamlStep.readKubernetesServiceCallServiceDiscoveryConfiguration(element.kubernetesServiceDiscovery); 
            } 
        } 
        if (element?.consulServiceDiscovery !== undefined) { 
            if (Array.isArray(element.consulServiceDiscovery)) { 
               def.consulServiceDiscovery = CamelDefinitionYamlStep.readConsulServiceCallServiceDiscoveryConfiguration(element.consulServiceDiscovery[0]); 
            } else { 
               def.consulServiceDiscovery = CamelDefinitionYamlStep.readConsulServiceCallServiceDiscoveryConfiguration(element.consulServiceDiscovery); 
            } 
        } 
        if (element?.staticServiceDiscovery !== undefined) { 
            if (Array.isArray(element.staticServiceDiscovery)) { 
               def.staticServiceDiscovery = CamelDefinitionYamlStep.readStaticServiceCallServiceDiscoveryConfiguration(element.staticServiceDiscovery[0]); 
            } else { 
               def.staticServiceDiscovery = CamelDefinitionYamlStep.readStaticServiceCallServiceDiscoveryConfiguration(element.staticServiceDiscovery); 
            } 
        } 
        if (element?.combinedServiceDiscovery !== undefined) { 
            if (Array.isArray(element.combinedServiceDiscovery)) { 
               def.combinedServiceDiscovery = CamelDefinitionYamlStep.readCombinedServiceCallServiceDiscoveryConfiguration(element.combinedServiceDiscovery[0]); 
            } else { 
               def.combinedServiceDiscovery = CamelDefinitionYamlStep.readCombinedServiceCallServiceDiscoveryConfiguration(element.combinedServiceDiscovery); 
            } 
        } 
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readCombinedServiceCallServiceDiscoveryConfiguration = (element: any): CombinedServiceCallServiceDiscoveryConfiguration => {
        
        const def = element ? new CombinedServiceCallServiceDiscoveryConfiguration({...element}) : new CombinedServiceCallServiceDiscoveryConfiguration();
        if (element?.cachingServiceDiscovery !== undefined) { 
            if (Array.isArray(element.cachingServiceDiscovery)) { 
               def.cachingServiceDiscovery = CamelDefinitionYamlStep.readCachingServiceCallServiceDiscoveryConfiguration(element.cachingServiceDiscovery[0]); 
            } else { 
               def.cachingServiceDiscovery = CamelDefinitionYamlStep.readCachingServiceCallServiceDiscoveryConfiguration(element.cachingServiceDiscovery); 
            } 
        } 
        if (element?.dnsServiceDiscovery !== undefined) { 
            if (Array.isArray(element.dnsServiceDiscovery)) { 
               def.dnsServiceDiscovery = CamelDefinitionYamlStep.readDnsServiceCallServiceDiscoveryConfiguration(element.dnsServiceDiscovery[0]); 
            } else { 
               def.dnsServiceDiscovery = CamelDefinitionYamlStep.readDnsServiceCallServiceDiscoveryConfiguration(element.dnsServiceDiscovery); 
            } 
        } 
        if (element?.kubernetesServiceDiscovery !== undefined) { 
            if (Array.isArray(element.kubernetesServiceDiscovery)) { 
               def.kubernetesServiceDiscovery = CamelDefinitionYamlStep.readKubernetesServiceCallServiceDiscoveryConfiguration(element.kubernetesServiceDiscovery[0]); 
            } else { 
               def.kubernetesServiceDiscovery = CamelDefinitionYamlStep.readKubernetesServiceCallServiceDiscoveryConfiguration(element.kubernetesServiceDiscovery); 
            } 
        } 
        if (element?.consulServiceDiscovery !== undefined) { 
            if (Array.isArray(element.consulServiceDiscovery)) { 
               def.consulServiceDiscovery = CamelDefinitionYamlStep.readConsulServiceCallServiceDiscoveryConfiguration(element.consulServiceDiscovery[0]); 
            } else { 
               def.consulServiceDiscovery = CamelDefinitionYamlStep.readConsulServiceCallServiceDiscoveryConfiguration(element.consulServiceDiscovery); 
            } 
        } 
        if (element?.staticServiceDiscovery !== undefined) { 
            if (Array.isArray(element.staticServiceDiscovery)) { 
               def.staticServiceDiscovery = CamelDefinitionYamlStep.readStaticServiceCallServiceDiscoveryConfiguration(element.staticServiceDiscovery[0]); 
            } else { 
               def.staticServiceDiscovery = CamelDefinitionYamlStep.readStaticServiceCallServiceDiscoveryConfiguration(element.staticServiceDiscovery); 
            } 
        } 
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readCombinedServiceCallServiceFilterConfiguration = (element: any): CombinedServiceCallServiceFilterConfiguration => {
        
        const def = element ? new CombinedServiceCallServiceFilterConfiguration({...element}) : new CombinedServiceCallServiceFilterConfiguration();
        if (element?.blacklistServiceFilter !== undefined) { 
            if (Array.isArray(element.blacklistServiceFilter)) { 
               def.blacklistServiceFilter = CamelDefinitionYamlStep.readBlacklistServiceCallServiceFilterConfiguration(element.blacklistServiceFilter[0]); 
            } else { 
               def.blacklistServiceFilter = CamelDefinitionYamlStep.readBlacklistServiceCallServiceFilterConfiguration(element.blacklistServiceFilter); 
            } 
        } 
        if (element?.passThroughServiceFilter !== undefined) { 
            if (Array.isArray(element.passThroughServiceFilter)) { 
               def.passThroughServiceFilter = CamelDefinitionYamlStep.readPassThroughServiceCallServiceFilterConfiguration(element.passThroughServiceFilter[0]); 
            } else { 
               def.passThroughServiceFilter = CamelDefinitionYamlStep.readPassThroughServiceCallServiceFilterConfiguration(element.passThroughServiceFilter); 
            } 
        } 
        if (element?.healthyServiceFilter !== undefined) { 
            if (Array.isArray(element.healthyServiceFilter)) { 
               def.healthyServiceFilter = CamelDefinitionYamlStep.readHealthyServiceCallServiceFilterConfiguration(element.healthyServiceFilter[0]); 
            } else { 
               def.healthyServiceFilter = CamelDefinitionYamlStep.readHealthyServiceCallServiceFilterConfiguration(element.healthyServiceFilter); 
            } 
        } 
        if (element?.customServiceFilter !== undefined) { 
            if (Array.isArray(element.customServiceFilter)) { 
               def.customServiceFilter = CamelDefinitionYamlStep.readCustomServiceCallServiceFilterConfiguration(element.customServiceFilter[0]); 
            } else { 
               def.customServiceFilter = CamelDefinitionYamlStep.readCustomServiceCallServiceFilterConfiguration(element.customServiceFilter); 
            } 
        } 
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readConsulServiceCallServiceDiscoveryConfiguration = (element: any): ConsulServiceCallServiceDiscoveryConfiguration => {
        
        const def = element ? new ConsulServiceCallServiceDiscoveryConfiguration({...element}) : new ConsulServiceCallServiceDiscoveryConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readCustomServiceCallServiceFilterConfiguration = (element: any): CustomServiceCallServiceFilterConfiguration => {
        
        const def = element ? new CustomServiceCallServiceFilterConfiguration({...element}) : new CustomServiceCallServiceFilterConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readDefaultServiceCallServiceLoadBalancerConfiguration = (element: any): DefaultServiceCallServiceLoadBalancerConfiguration => {
        
        const def = element ? new DefaultServiceCallServiceLoadBalancerConfiguration({...element}) : new DefaultServiceCallServiceLoadBalancerConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readDnsServiceCallServiceDiscoveryConfiguration = (element: any): DnsServiceCallServiceDiscoveryConfiguration => {
        
        const def = element ? new DnsServiceCallServiceDiscoveryConfiguration({...element}) : new DnsServiceCallServiceDiscoveryConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readHealthyServiceCallServiceFilterConfiguration = (element: any): HealthyServiceCallServiceFilterConfiguration => {
        
        const def = element ? new HealthyServiceCallServiceFilterConfiguration({...element}) : new HealthyServiceCallServiceFilterConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readKubernetesServiceCallServiceDiscoveryConfiguration = (element: any): KubernetesServiceCallServiceDiscoveryConfiguration => {
        
        const def = element ? new KubernetesServiceCallServiceDiscoveryConfiguration({...element}) : new KubernetesServiceCallServiceDiscoveryConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readPassThroughServiceCallServiceFilterConfiguration = (element: any): PassThroughServiceCallServiceFilterConfiguration => {
        
        const def = element ? new PassThroughServiceCallServiceFilterConfiguration({...element}) : new PassThroughServiceCallServiceFilterConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readServiceCallConfigurationDefinition = (element: any): ServiceCallConfigurationDefinition => {
        
        const def = element ? new ServiceCallConfigurationDefinition({...element}) : new ServiceCallConfigurationDefinition();
        if (element?.defaultLoadBalancer !== undefined) { 
            if (Array.isArray(element.defaultLoadBalancer)) { 
               def.defaultLoadBalancer = CamelDefinitionYamlStep.readDefaultServiceCallServiceLoadBalancerConfiguration(element.defaultLoadBalancer[0]); 
            } else { 
               def.defaultLoadBalancer = CamelDefinitionYamlStep.readDefaultServiceCallServiceLoadBalancerConfiguration(element.defaultLoadBalancer); 
            } 
        } 
        if (element?.expression !== undefined) { 
            if (Array.isArray(element.expression)) { 
               def.expression = CamelDefinitionYamlStep.readServiceCallExpressionConfiguration(element.expression[0]); 
            } else { 
               def.expression = CamelDefinitionYamlStep.readServiceCallExpressionConfiguration(element.expression); 
            } 
        } 
        if (element?.kubernetesServiceDiscovery !== undefined) { 
            if (Array.isArray(element.kubernetesServiceDiscovery)) { 
               def.kubernetesServiceDiscovery = CamelDefinitionYamlStep.readKubernetesServiceCallServiceDiscoveryConfiguration(element.kubernetesServiceDiscovery[0]); 
            } else { 
               def.kubernetesServiceDiscovery = CamelDefinitionYamlStep.readKubernetesServiceCallServiceDiscoveryConfiguration(element.kubernetesServiceDiscovery); 
            } 
        } 
        if (element?.customServiceFilter !== undefined) { 
            if (Array.isArray(element.customServiceFilter)) { 
               def.customServiceFilter = CamelDefinitionYamlStep.readCustomServiceCallServiceFilterConfiguration(element.customServiceFilter[0]); 
            } else { 
               def.customServiceFilter = CamelDefinitionYamlStep.readCustomServiceCallServiceFilterConfiguration(element.customServiceFilter); 
            } 
        } 
        if (element?.zookeeperServiceDiscovery !== undefined) { 
            if (Array.isArray(element.zookeeperServiceDiscovery)) { 
               def.zookeeperServiceDiscovery = CamelDefinitionYamlStep.readZooKeeperServiceCallServiceDiscoveryConfiguration(element.zookeeperServiceDiscovery[0]); 
            } else { 
               def.zookeeperServiceDiscovery = CamelDefinitionYamlStep.readZooKeeperServiceCallServiceDiscoveryConfiguration(element.zookeeperServiceDiscovery); 
            } 
        } 
        if (element?.blacklistServiceFilter !== undefined) { 
            if (Array.isArray(element.blacklistServiceFilter)) { 
               def.blacklistServiceFilter = CamelDefinitionYamlStep.readBlacklistServiceCallServiceFilterConfiguration(element.blacklistServiceFilter[0]); 
            } else { 
               def.blacklistServiceFilter = CamelDefinitionYamlStep.readBlacklistServiceCallServiceFilterConfiguration(element.blacklistServiceFilter); 
            } 
        } 
        if (element?.passThroughServiceFilter !== undefined) { 
            if (Array.isArray(element.passThroughServiceFilter)) { 
               def.passThroughServiceFilter = CamelDefinitionYamlStep.readPassThroughServiceCallServiceFilterConfiguration(element.passThroughServiceFilter[0]); 
            } else { 
               def.passThroughServiceFilter = CamelDefinitionYamlStep.readPassThroughServiceCallServiceFilterConfiguration(element.passThroughServiceFilter); 
            } 
        } 
        if (element?.cachingServiceDiscovery !== undefined) { 
            if (Array.isArray(element.cachingServiceDiscovery)) { 
               def.cachingServiceDiscovery = CamelDefinitionYamlStep.readCachingServiceCallServiceDiscoveryConfiguration(element.cachingServiceDiscovery[0]); 
            } else { 
               def.cachingServiceDiscovery = CamelDefinitionYamlStep.readCachingServiceCallServiceDiscoveryConfiguration(element.cachingServiceDiscovery); 
            } 
        } 
        if (element?.dnsServiceDiscovery !== undefined) { 
            if (Array.isArray(element.dnsServiceDiscovery)) { 
               def.dnsServiceDiscovery = CamelDefinitionYamlStep.readDnsServiceCallServiceDiscoveryConfiguration(element.dnsServiceDiscovery[0]); 
            } else { 
               def.dnsServiceDiscovery = CamelDefinitionYamlStep.readDnsServiceCallServiceDiscoveryConfiguration(element.dnsServiceDiscovery); 
            } 
        } 
        if (element?.healthyServiceFilter !== undefined) { 
            if (Array.isArray(element.healthyServiceFilter)) { 
               def.healthyServiceFilter = CamelDefinitionYamlStep.readHealthyServiceCallServiceFilterConfiguration(element.healthyServiceFilter[0]); 
            } else { 
               def.healthyServiceFilter = CamelDefinitionYamlStep.readHealthyServiceCallServiceFilterConfiguration(element.healthyServiceFilter); 
            } 
        } 
        if (element?.combinedServiceFilter !== undefined) { 
            if (Array.isArray(element.combinedServiceFilter)) { 
               def.combinedServiceFilter = CamelDefinitionYamlStep.readCombinedServiceCallServiceFilterConfiguration(element.combinedServiceFilter[0]); 
            } else { 
               def.combinedServiceFilter = CamelDefinitionYamlStep.readCombinedServiceCallServiceFilterConfiguration(element.combinedServiceFilter); 
            } 
        } 
        if (element?.consulServiceDiscovery !== undefined) { 
            if (Array.isArray(element.consulServiceDiscovery)) { 
               def.consulServiceDiscovery = CamelDefinitionYamlStep.readConsulServiceCallServiceDiscoveryConfiguration(element.consulServiceDiscovery[0]); 
            } else { 
               def.consulServiceDiscovery = CamelDefinitionYamlStep.readConsulServiceCallServiceDiscoveryConfiguration(element.consulServiceDiscovery); 
            } 
        } 
        if (element?.staticServiceDiscovery !== undefined) { 
            if (Array.isArray(element.staticServiceDiscovery)) { 
               def.staticServiceDiscovery = CamelDefinitionYamlStep.readStaticServiceCallServiceDiscoveryConfiguration(element.staticServiceDiscovery[0]); 
            } else { 
               def.staticServiceDiscovery = CamelDefinitionYamlStep.readStaticServiceCallServiceDiscoveryConfiguration(element.staticServiceDiscovery); 
            } 
        } 
        if (element?.combinedServiceDiscovery !== undefined) { 
            if (Array.isArray(element.combinedServiceDiscovery)) { 
               def.combinedServiceDiscovery = CamelDefinitionYamlStep.readCombinedServiceCallServiceDiscoveryConfiguration(element.combinedServiceDiscovery[0]); 
            } else { 
               def.combinedServiceDiscovery = CamelDefinitionYamlStep.readCombinedServiceCallServiceDiscoveryConfiguration(element.combinedServiceDiscovery); 
            } 
        } 

        return def;
    }

    static readServiceCallDefinition = (element: any): ServiceCallDefinition => {
        if (element && typeof element === 'string') element = {name: element};
        const def = element ? new ServiceCallDefinition({...element}) : new ServiceCallDefinition();
        if (element?.defaultLoadBalancer !== undefined) { 
            if (Array.isArray(element.defaultLoadBalancer)) { 
               def.defaultLoadBalancer = CamelDefinitionYamlStep.readDefaultServiceCallServiceLoadBalancerConfiguration(element.defaultLoadBalancer[0]); 
            } else { 
               def.defaultLoadBalancer = CamelDefinitionYamlStep.readDefaultServiceCallServiceLoadBalancerConfiguration(element.defaultLoadBalancer); 
            } 
        } 
        if (element?.expression !== undefined) { 
            if (Array.isArray(element.expression)) { 
               def.expression = CamelDefinitionYamlStep.readServiceCallExpressionConfiguration(element.expression[0]); 
            } else { 
               def.expression = CamelDefinitionYamlStep.readServiceCallExpressionConfiguration(element.expression); 
            } 
        } 
        if (element?.kubernetesServiceDiscovery !== undefined) { 
            if (Array.isArray(element.kubernetesServiceDiscovery)) { 
               def.kubernetesServiceDiscovery = CamelDefinitionYamlStep.readKubernetesServiceCallServiceDiscoveryConfiguration(element.kubernetesServiceDiscovery[0]); 
            } else { 
               def.kubernetesServiceDiscovery = CamelDefinitionYamlStep.readKubernetesServiceCallServiceDiscoveryConfiguration(element.kubernetesServiceDiscovery); 
            } 
        } 
        if (element?.customServiceFilter !== undefined) { 
            if (Array.isArray(element.customServiceFilter)) { 
               def.customServiceFilter = CamelDefinitionYamlStep.readCustomServiceCallServiceFilterConfiguration(element.customServiceFilter[0]); 
            } else { 
               def.customServiceFilter = CamelDefinitionYamlStep.readCustomServiceCallServiceFilterConfiguration(element.customServiceFilter); 
            } 
        } 
        if (element?.zookeeperServiceDiscovery !== undefined) { 
            if (Array.isArray(element.zookeeperServiceDiscovery)) { 
               def.zookeeperServiceDiscovery = CamelDefinitionYamlStep.readZooKeeperServiceCallServiceDiscoveryConfiguration(element.zookeeperServiceDiscovery[0]); 
            } else { 
               def.zookeeperServiceDiscovery = CamelDefinitionYamlStep.readZooKeeperServiceCallServiceDiscoveryConfiguration(element.zookeeperServiceDiscovery); 
            } 
        } 
        if (element?.blacklistServiceFilter !== undefined) { 
            if (Array.isArray(element.blacklistServiceFilter)) { 
               def.blacklistServiceFilter = CamelDefinitionYamlStep.readBlacklistServiceCallServiceFilterConfiguration(element.blacklistServiceFilter[0]); 
            } else { 
               def.blacklistServiceFilter = CamelDefinitionYamlStep.readBlacklistServiceCallServiceFilterConfiguration(element.blacklistServiceFilter); 
            } 
        } 
        if (element?.passThroughServiceFilter !== undefined) { 
            if (Array.isArray(element.passThroughServiceFilter)) { 
               def.passThroughServiceFilter = CamelDefinitionYamlStep.readPassThroughServiceCallServiceFilterConfiguration(element.passThroughServiceFilter[0]); 
            } else { 
               def.passThroughServiceFilter = CamelDefinitionYamlStep.readPassThroughServiceCallServiceFilterConfiguration(element.passThroughServiceFilter); 
            } 
        } 
        if (element?.cachingServiceDiscovery !== undefined) { 
            if (Array.isArray(element.cachingServiceDiscovery)) { 
               def.cachingServiceDiscovery = CamelDefinitionYamlStep.readCachingServiceCallServiceDiscoveryConfiguration(element.cachingServiceDiscovery[0]); 
            } else { 
               def.cachingServiceDiscovery = CamelDefinitionYamlStep.readCachingServiceCallServiceDiscoveryConfiguration(element.cachingServiceDiscovery); 
            } 
        } 
        if (element?.dnsServiceDiscovery !== undefined) { 
            if (Array.isArray(element.dnsServiceDiscovery)) { 
               def.dnsServiceDiscovery = CamelDefinitionYamlStep.readDnsServiceCallServiceDiscoveryConfiguration(element.dnsServiceDiscovery[0]); 
            } else { 
               def.dnsServiceDiscovery = CamelDefinitionYamlStep.readDnsServiceCallServiceDiscoveryConfiguration(element.dnsServiceDiscovery); 
            } 
        } 
        if (element?.healthyServiceFilter !== undefined) { 
            if (Array.isArray(element.healthyServiceFilter)) { 
               def.healthyServiceFilter = CamelDefinitionYamlStep.readHealthyServiceCallServiceFilterConfiguration(element.healthyServiceFilter[0]); 
            } else { 
               def.healthyServiceFilter = CamelDefinitionYamlStep.readHealthyServiceCallServiceFilterConfiguration(element.healthyServiceFilter); 
            } 
        } 
        if (element?.combinedServiceFilter !== undefined) { 
            if (Array.isArray(element.combinedServiceFilter)) { 
               def.combinedServiceFilter = CamelDefinitionYamlStep.readCombinedServiceCallServiceFilterConfiguration(element.combinedServiceFilter[0]); 
            } else { 
               def.combinedServiceFilter = CamelDefinitionYamlStep.readCombinedServiceCallServiceFilterConfiguration(element.combinedServiceFilter); 
            } 
        } 
        if (element?.consulServiceDiscovery !== undefined) { 
            if (Array.isArray(element.consulServiceDiscovery)) { 
               def.consulServiceDiscovery = CamelDefinitionYamlStep.readConsulServiceCallServiceDiscoveryConfiguration(element.consulServiceDiscovery[0]); 
            } else { 
               def.consulServiceDiscovery = CamelDefinitionYamlStep.readConsulServiceCallServiceDiscoveryConfiguration(element.consulServiceDiscovery); 
            } 
        } 
        if (element?.staticServiceDiscovery !== undefined) { 
            if (Array.isArray(element.staticServiceDiscovery)) { 
               def.staticServiceDiscovery = CamelDefinitionYamlStep.readStaticServiceCallServiceDiscoveryConfiguration(element.staticServiceDiscovery[0]); 
            } else { 
               def.staticServiceDiscovery = CamelDefinitionYamlStep.readStaticServiceCallServiceDiscoveryConfiguration(element.staticServiceDiscovery); 
            } 
        } 
        if (element?.combinedServiceDiscovery !== undefined) { 
            if (Array.isArray(element.combinedServiceDiscovery)) { 
               def.combinedServiceDiscovery = CamelDefinitionYamlStep.readCombinedServiceCallServiceDiscoveryConfiguration(element.combinedServiceDiscovery[0]); 
            } else { 
               def.combinedServiceDiscovery = CamelDefinitionYamlStep.readCombinedServiceCallServiceDiscoveryConfiguration(element.combinedServiceDiscovery); 
            } 
        } 

        return def;
    }

    static readServiceCallExpressionConfiguration = (element: any): ServiceCallExpressionConfiguration => {
        
        const def = element ? new ServiceCallExpressionConfiguration({...element}) : new ServiceCallExpressionConfiguration();
        if (element?.expressionType !== undefined) { 
            def.expressionType = CamelDefinitionYamlStep.readExpressionDefinition(element.expressionType); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expressionType = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readServiceCallServiceChooserConfiguration = (element: any): ServiceCallServiceChooserConfiguration => {
        
        const def = element ? new ServiceCallServiceChooserConfiguration({...element}) : new ServiceCallServiceChooserConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readServiceCallServiceDiscoveryConfiguration = (element: any): ServiceCallServiceDiscoveryConfiguration => {
        
        const def = element ? new ServiceCallServiceDiscoveryConfiguration({...element}) : new ServiceCallServiceDiscoveryConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readServiceCallServiceFilterConfiguration = (element: any): ServiceCallServiceFilterConfiguration => {
        
        const def = element ? new ServiceCallServiceFilterConfiguration({...element}) : new ServiceCallServiceFilterConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readServiceCallServiceLoadBalancerConfiguration = (element: any): ServiceCallServiceLoadBalancerConfiguration => {
        
        const def = element ? new ServiceCallServiceLoadBalancerConfiguration({...element}) : new ServiceCallServiceLoadBalancerConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readStaticServiceCallServiceDiscoveryConfiguration = (element: any): StaticServiceCallServiceDiscoveryConfiguration => {
        
        const def = element ? new StaticServiceCallServiceDiscoveryConfiguration({...element}) : new StaticServiceCallServiceDiscoveryConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readZooKeeperServiceCallServiceDiscoveryConfiguration = (element: any): ZooKeeperServiceCallServiceDiscoveryConfiguration => {
        
        const def = element ? new ZooKeeperServiceCallServiceDiscoveryConfiguration({...element}) : new ZooKeeperServiceCallServiceDiscoveryConfiguration();
        def.properties = element && element?.properties ? element?.properties.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readBatchResequencerConfig = (element: any): BatchResequencerConfig => {
        
        const def = element ? new BatchResequencerConfig({...element}) : new BatchResequencerConfig();

        return def;
    }

    static readStreamResequencerConfig = (element: any): StreamResequencerConfig => {
        
        const def = element ? new StreamResequencerConfig({...element}) : new StreamResequencerConfig();

        return def;
    }

    static readASN1DataFormat = (element: any): ASN1DataFormat => {
        
        const def = element ? new ASN1DataFormat({...element}) : new ASN1DataFormat();

        return def;
    }

    static readAny23DataFormat = (element: any): Any23DataFormat => {
        
        const def = element ? new Any23DataFormat({...element}) : new Any23DataFormat();
        def.configuration = element && element?.configuration ? element?.configuration.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readAvroDataFormat = (element: any): AvroDataFormat => {
        
        const def = element ? new AvroDataFormat({...element}) : new AvroDataFormat();

        return def;
    }

    static readBarcodeDataFormat = (element: any): BarcodeDataFormat => {
        
        const def = element ? new BarcodeDataFormat({...element}) : new BarcodeDataFormat();

        return def;
    }

    static readBase64DataFormat = (element: any): Base64DataFormat => {
        
        const def = element ? new Base64DataFormat({...element}) : new Base64DataFormat();

        return def;
    }

    static readBindyDataFormat = (element: any): BindyDataFormat => {
        
        const def = element ? new BindyDataFormat({...element}) : new BindyDataFormat();

        return def;
    }

    static readCBORDataFormat = (element: any): CBORDataFormat => {
        
        const def = element ? new CBORDataFormat({...element}) : new CBORDataFormat();

        return def;
    }

    static readCryptoDataFormat = (element: any): CryptoDataFormat => {
        
        const def = element ? new CryptoDataFormat({...element}) : new CryptoDataFormat();

        return def;
    }

    static readCsvDataFormat = (element: any): CsvDataFormat => {
        
        const def = element ? new CsvDataFormat({...element}) : new CsvDataFormat();

        return def;
    }

    static readCustomDataFormat = (element: any): CustomDataFormat => {
        if (element && typeof element === 'string') element = {ref: element};
        const def = element ? new CustomDataFormat({...element}) : new CustomDataFormat();

        return def;
    }

    static readDataFormatsDefinition = (element: any): DataFormatsDefinition => {
        
        const def = element ? new DataFormatsDefinition({...element}) : new DataFormatsDefinition();
        if (element?.univocityCsv !== undefined) { 
            if (Array.isArray(element.univocityCsv)) { 
               def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv[0]); 
            } else { 
               def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv); 
            } 
        } 
        if (element?.protobuf !== undefined) { 
            if (Array.isArray(element.protobuf)) { 
               def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf[0]); 
            } else { 
               def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf); 
            } 
        } 
        if (element?.tarFile !== undefined) { 
            if (Array.isArray(element.tarFile)) { 
               def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile[0]); 
            } else { 
               def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile); 
            } 
        } 
        if (element?.tidyMarkup !== undefined) { 
            if (Array.isArray(element.tidyMarkup)) { 
               def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup[0]); 
            } else { 
               def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup); 
            } 
        } 
        if (element?.csv !== undefined) { 
            if (Array.isArray(element.csv)) { 
               def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv[0]); 
            } else { 
               def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv); 
            } 
        } 
        if (element?.base64 !== undefined) { 
            if (Array.isArray(element.base64)) { 
               def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64[0]); 
            } else { 
               def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64); 
            } 
        } 
        if (element?.zipDeflater !== undefined) { 
            if (Array.isArray(element.zipDeflater)) { 
               def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater[0]); 
            } else { 
               def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater); 
            } 
        } 
        if (element?.bindy !== undefined) { 
            if (Array.isArray(element.bindy)) { 
               def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy[0]); 
            } else { 
               def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy); 
            } 
        } 
        if (element?.syslog !== undefined) { 
            if (Array.isArray(element.syslog)) { 
               def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog[0]); 
            } else { 
               def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog); 
            } 
        } 
        if (element?.zipFile !== undefined) { 
            if (Array.isArray(element.zipFile)) { 
               def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile[0]); 
            } else { 
               def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile); 
            } 
        } 
        if (element?.jaxb !== undefined) { 
            if (Array.isArray(element.jaxb)) { 
               def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb[0]); 
            } else { 
               def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb); 
            } 
        } 
        if (element?.rss !== undefined) { 
            if (Array.isArray(element.rss)) { 
               def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss[0]); 
            } else { 
               def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss); 
            } 
        } 
        if (element?.mimeMultipart !== undefined) { 
            if (Array.isArray(element.mimeMultipart)) { 
               def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart[0]); 
            } else { 
               def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart); 
            } 
        } 
        if (element?.asn1 !== undefined) { 
            if (Array.isArray(element.asn1)) { 
               def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1[0]); 
            } else { 
               def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1); 
            } 
        } 
        if (element?.pgp !== undefined) { 
            if (Array.isArray(element.pgp)) { 
               def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp[0]); 
            } else { 
               def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp); 
            } 
        } 
        if (element?.thrift !== undefined) { 
            if (Array.isArray(element.thrift)) { 
               def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift[0]); 
            } else { 
               def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift); 
            } 
        } 
        if (element?.json !== undefined) { 
            if (Array.isArray(element.json)) { 
               def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json[0]); 
            } else { 
               def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json); 
            } 
        } 
        if (element?.lzf !== undefined) { 
            if (Array.isArray(element.lzf)) { 
               def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf[0]); 
            } else { 
               def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf); 
            } 
        } 
        if (element?.fhirXml !== undefined) { 
            if (Array.isArray(element.fhirXml)) { 
               def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml[0]); 
            } else { 
               def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml); 
            } 
        } 
        if (element?.barcode !== undefined) { 
            if (Array.isArray(element.barcode)) { 
               def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode[0]); 
            } else { 
               def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode); 
            } 
        } 
        if (element?.avro !== undefined) { 
            if (Array.isArray(element.avro)) { 
               def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro[0]); 
            } else { 
               def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro); 
            } 
        } 
        if (element?.yaml !== undefined) { 
            if (Array.isArray(element.yaml)) { 
               def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml[0]); 
            } else { 
               def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml); 
            } 
        } 
        if (element?.fhirJson !== undefined) { 
            if (Array.isArray(element.fhirJson)) { 
               def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson[0]); 
            } else { 
               def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson); 
            } 
        } 
        if (element?.any23 !== undefined) { 
            if (Array.isArray(element.any23)) { 
               def.any23 = CamelDefinitionYamlStep.readAny23DataFormat(element.any23[0]); 
            } else { 
               def.any23 = CamelDefinitionYamlStep.readAny23DataFormat(element.any23); 
            } 
        } 
        if (element?.custom !== undefined) { 
            if (Array.isArray(element.custom)) { 
               def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom[0]); 
            } else { 
               def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom); 
            } 
        } 
        if (element?.flatpack !== undefined) { 
            if (Array.isArray(element.flatpack)) { 
               def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack[0]); 
            } else { 
               def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack); 
            } 
        } 
        if (element?.swiftMx !== undefined) { 
            if (Array.isArray(element.swiftMx)) { 
               def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx[0]); 
            } else { 
               def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx); 
            } 
        } 
        if (element?.cbor !== undefined) { 
            if (Array.isArray(element.cbor)) { 
               def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor[0]); 
            } else { 
               def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor); 
            } 
        } 
        if (element?.crypto !== undefined) { 
            if (Array.isArray(element.crypto)) { 
               def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto[0]); 
            } else { 
               def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto); 
            } 
        } 
        if (element?.swiftMt !== undefined) { 
            if (Array.isArray(element.swiftMt)) { 
               def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt[0]); 
            } else { 
               def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt); 
            } 
        } 
        if (element?.univocityTsv !== undefined) { 
            if (Array.isArray(element.univocityTsv)) { 
               def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv[0]); 
            } else { 
               def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv); 
            } 
        } 
        if (element?.hl7 !== undefined) { 
            if (Array.isArray(element.hl7)) { 
               def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7[0]); 
            } else { 
               def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7); 
            } 
        } 
        if (element?.jsonApi !== undefined) { 
            if (Array.isArray(element.jsonApi)) { 
               def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi[0]); 
            } else { 
               def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi); 
            } 
        } 
        if (element?.xmlSecurity !== undefined) { 
            if (Array.isArray(element.xmlSecurity)) { 
               def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity[0]); 
            } else { 
               def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity); 
            } 
        } 
        if (element?.ical !== undefined) { 
            if (Array.isArray(element.ical)) { 
               def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical[0]); 
            } else { 
               def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical); 
            } 
        } 
        if (element?.univocityFixed !== undefined) { 
            if (Array.isArray(element.univocityFixed)) { 
               def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed[0]); 
            } else { 
               def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed); 
            } 
        } 
        if (element?.jacksonXml !== undefined) { 
            if (Array.isArray(element.jacksonXml)) { 
               def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml[0]); 
            } else { 
               def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml); 
            } 
        } 
        if (element?.grok !== undefined) { 
            if (Array.isArray(element.grok)) { 
               def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok[0]); 
            } else { 
               def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok); 
            } 
        } 
        if (element?.xstream !== undefined) { 
            if (Array.isArray(element.xstream)) { 
               def.xstream = CamelDefinitionYamlStep.readXStreamDataFormat(element.xstream[0]); 
            } else { 
               def.xstream = CamelDefinitionYamlStep.readXStreamDataFormat(element.xstream); 
            } 
        } 
        if (element?.gzipDeflater !== undefined) { 
            if (Array.isArray(element.gzipDeflater)) { 
               def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater[0]); 
            } else { 
               def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater); 
            } 
        } 
        if (element?.soap !== undefined) { 
            if (Array.isArray(element.soap)) { 
               def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap[0]); 
            } else { 
               def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap); 
            } 
        } 

        return def;
    }

    static readFhirJsonDataFormat = (element: any): FhirJsonDataFormat => {
        
        const def = element ? new FhirJsonDataFormat({...element}) : new FhirJsonDataFormat();

        return def;
    }

    static readFhirXmlDataFormat = (element: any): FhirXmlDataFormat => {
        
        const def = element ? new FhirXmlDataFormat({...element}) : new FhirXmlDataFormat();

        return def;
    }

    static readFlatpackDataFormat = (element: any): FlatpackDataFormat => {
        
        const def = element ? new FlatpackDataFormat({...element}) : new FlatpackDataFormat();

        return def;
    }

    static readGrokDataFormat = (element: any): GrokDataFormat => {
        
        const def = element ? new GrokDataFormat({...element}) : new GrokDataFormat();

        return def;
    }

    static readGzipDeflaterDataFormat = (element: any): GzipDeflaterDataFormat => {
        
        const def = element ? new GzipDeflaterDataFormat({...element}) : new GzipDeflaterDataFormat();

        return def;
    }

    static readHL7DataFormat = (element: any): HL7DataFormat => {
        
        const def = element ? new HL7DataFormat({...element}) : new HL7DataFormat();

        return def;
    }

    static readIcalDataFormat = (element: any): IcalDataFormat => {
        
        const def = element ? new IcalDataFormat({...element}) : new IcalDataFormat();

        return def;
    }

    static readJacksonXMLDataFormat = (element: any): JacksonXMLDataFormat => {
        
        const def = element ? new JacksonXMLDataFormat({...element}) : new JacksonXMLDataFormat();

        return def;
    }

    static readJaxbDataFormat = (element: any): JaxbDataFormat => {
        
        const def = element ? new JaxbDataFormat({...element}) : new JaxbDataFormat();

        return def;
    }

    static readJsonApiDataFormat = (element: any): JsonApiDataFormat => {
        
        const def = element ? new JsonApiDataFormat({...element}) : new JsonApiDataFormat();

        return def;
    }

    static readJsonDataFormat = (element: any): JsonDataFormat => {
        
        const def = element ? new JsonDataFormat({...element}) : new JsonDataFormat();

        return def;
    }

    static readLZFDataFormat = (element: any): LZFDataFormat => {
        
        const def = element ? new LZFDataFormat({...element}) : new LZFDataFormat();

        return def;
    }

    static readMimeMultipartDataFormat = (element: any): MimeMultipartDataFormat => {
        
        const def = element ? new MimeMultipartDataFormat({...element}) : new MimeMultipartDataFormat();

        return def;
    }

    static readPGPDataFormat = (element: any): PGPDataFormat => {
        
        const def = element ? new PGPDataFormat({...element}) : new PGPDataFormat();

        return def;
    }

    static readProtobufDataFormat = (element: any): ProtobufDataFormat => {
        
        const def = element ? new ProtobufDataFormat({...element}) : new ProtobufDataFormat();

        return def;
    }

    static readRssDataFormat = (element: any): RssDataFormat => {
        
        const def = element ? new RssDataFormat({...element}) : new RssDataFormat();

        return def;
    }

    static readSoapDataFormat = (element: any): SoapDataFormat => {
        if (element && typeof element === 'string') element = {contextPath: element};
        const def = element ? new SoapDataFormat({...element}) : new SoapDataFormat();

        return def;
    }

    static readSwiftMtDataFormat = (element: any): SwiftMtDataFormat => {
        
        const def = element ? new SwiftMtDataFormat({...element}) : new SwiftMtDataFormat();

        return def;
    }

    static readSwiftMxDataFormat = (element: any): SwiftMxDataFormat => {
        
        const def = element ? new SwiftMxDataFormat({...element}) : new SwiftMxDataFormat();

        return def;
    }

    static readSyslogDataFormat = (element: any): SyslogDataFormat => {
        
        const def = element ? new SyslogDataFormat({...element}) : new SyslogDataFormat();

        return def;
    }

    static readTarFileDataFormat = (element: any): TarFileDataFormat => {
        
        const def = element ? new TarFileDataFormat({...element}) : new TarFileDataFormat();

        return def;
    }

    static readThriftDataFormat = (element: any): ThriftDataFormat => {
        
        const def = element ? new ThriftDataFormat({...element}) : new ThriftDataFormat();

        return def;
    }

    static readTidyMarkupDataFormat = (element: any): TidyMarkupDataFormat => {
        
        const def = element ? new TidyMarkupDataFormat({...element}) : new TidyMarkupDataFormat();

        return def;
    }

    static readUniVocityCsvDataFormat = (element: any): UniVocityCsvDataFormat => {
        
        const def = element ? new UniVocityCsvDataFormat({...element}) : new UniVocityCsvDataFormat();
        def.univocityHeader = element && element?.univocityHeader ? element?.univocityHeader.map((x:any) => CamelDefinitionYamlStep.readUniVocityHeader(x)) :[]; 

        return def;
    }

    static readUniVocityFixedDataFormat = (element: any): UniVocityFixedDataFormat => {
        
        const def = element ? new UniVocityFixedDataFormat({...element}) : new UniVocityFixedDataFormat();
        def.univocityHeader = element && element?.univocityHeader ? element?.univocityHeader.map((x:any) => CamelDefinitionYamlStep.readUniVocityHeader(x)) :[]; 

        return def;
    }

    static readUniVocityHeader = (element: any): UniVocityHeader => {
        
        const def = element ? new UniVocityHeader({...element}) : new UniVocityHeader();

        return def;
    }

    static readUniVocityTsvDataFormat = (element: any): UniVocityTsvDataFormat => {
        
        const def = element ? new UniVocityTsvDataFormat({...element}) : new UniVocityTsvDataFormat();
        def.univocityHeader = element && element?.univocityHeader ? element?.univocityHeader.map((x:any) => CamelDefinitionYamlStep.readUniVocityHeader(x)) :[]; 

        return def;
    }

    static readXMLSecurityDataFormat = (element: any): XMLSecurityDataFormat => {
        
        const def = element ? new XMLSecurityDataFormat({...element}) : new XMLSecurityDataFormat();

        return def;
    }

    static readXStreamDataFormat = (element: any): XStreamDataFormat => {
        
        const def = element ? new XStreamDataFormat({...element}) : new XStreamDataFormat();
        def.omitFields = element && element?.omitFields ? element?.omitFields.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 
        def.aliases = element && element?.aliases ? element?.aliases.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 
        def.implicitCollections = element && element?.implicitCollections ? element?.implicitCollections.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 
        def.converters = element && element?.converters ? element?.converters.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readYAMLDataFormat = (element: any): YAMLDataFormat => {
        
        const def = element ? new YAMLDataFormat({...element}) : new YAMLDataFormat();
        def.typeFilter = element && element?.typeFilter ? element?.typeFilter.map((x:any) => CamelDefinitionYamlStep.readYAMLTypeFilterDefinition(x)) :[]; 

        return def;
    }

    static readYAMLTypeFilterDefinition = (element: any): YAMLTypeFilterDefinition => {
        
        const def = element ? new YAMLTypeFilterDefinition({...element}) : new YAMLTypeFilterDefinition();

        return def;
    }

    static readZipDeflaterDataFormat = (element: any): ZipDeflaterDataFormat => {
        
        const def = element ? new ZipDeflaterDataFormat({...element}) : new ZipDeflaterDataFormat();

        return def;
    }

    static readZipFileDataFormat = (element: any): ZipFileDataFormat => {
        
        const def = element ? new ZipFileDataFormat({...element}) : new ZipFileDataFormat();

        return def;
    }

    static readDeadLetterChannelDefinition = (element: any): DeadLetterChannelDefinition => {
        
        const def = element ? new DeadLetterChannelDefinition({...element}) : new DeadLetterChannelDefinition();
        if (element?.redeliveryPolicy !== undefined) { 
            if (Array.isArray(element.redeliveryPolicy)) { 
               def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy[0]); 
            } else { 
               def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy); 
            } 
        } 

        return def;
    }

    static readDefaultErrorHandlerDefinition = (element: any): DefaultErrorHandlerDefinition => {
        
        const def = element ? new DefaultErrorHandlerDefinition({...element}) : new DefaultErrorHandlerDefinition();
        if (element?.redeliveryPolicy !== undefined) { 
            if (Array.isArray(element.redeliveryPolicy)) { 
               def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy[0]); 
            } else { 
               def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy); 
            } 
        } 

        return def;
    }

    static readJtaTransactionErrorHandlerDefinition = (element: any): JtaTransactionErrorHandlerDefinition => {
        
        const def = element ? new JtaTransactionErrorHandlerDefinition({...element}) : new JtaTransactionErrorHandlerDefinition();
        if (element?.redeliveryPolicy !== undefined) { 
            if (Array.isArray(element.redeliveryPolicy)) { 
               def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy[0]); 
            } else { 
               def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy); 
            } 
        } 

        return def;
    }

    static readNoErrorHandlerDefinition = (element: any): NoErrorHandlerDefinition => {
        
        const def = element ? new NoErrorHandlerDefinition({...element}) : new NoErrorHandlerDefinition();

        return def;
    }

    static readRefErrorHandlerDefinition = (element: any): RefErrorHandlerDefinition => {
        if (element && typeof element === 'string') element = {ref: element};
        const def = element ? new RefErrorHandlerDefinition({...element}) : new RefErrorHandlerDefinition();

        return def;
    }

    static readSpringTransactionErrorHandlerDefinition = (element: any): SpringTransactionErrorHandlerDefinition => {
        
        const def = element ? new SpringTransactionErrorHandlerDefinition({...element}) : new SpringTransactionErrorHandlerDefinition();
        if (element?.redeliveryPolicy !== undefined) { 
            if (Array.isArray(element.redeliveryPolicy)) { 
               def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy[0]); 
            } else { 
               def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy); 
            } 
        } 

        return def;
    }

    static readCSimpleExpression = (element: any): CSimpleExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new CSimpleExpression({...element}) : new CSimpleExpression();

        return def;
    }

    static readConstantExpression = (element: any): ConstantExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new ConstantExpression({...element}) : new ConstantExpression();

        return def;
    }

    static readDatasonnetExpression = (element: any): DatasonnetExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new DatasonnetExpression({...element}) : new DatasonnetExpression();

        return def;
    }

    static readExchangePropertyExpression = (element: any): ExchangePropertyExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new ExchangePropertyExpression({...element}) : new ExchangePropertyExpression();

        return def;
    }

    static readExpressionDefinition = (element: any): ExpressionDefinition => {
        
        const def = element ? new ExpressionDefinition({...element}) : new ExpressionDefinition();
        if (element?.ognl !== undefined) { 
            if (Array.isArray(element.ognl)) { 
               def.ognl = CamelDefinitionYamlStep.readOgnlExpression(element.ognl[0]); 
            } else { 
               def.ognl = CamelDefinitionYamlStep.readOgnlExpression(element.ognl); 
            } 
        } 
        if (element?.python !== undefined) { 
            if (Array.isArray(element.python)) { 
               def.python = CamelDefinitionYamlStep.readPythonExpression(element.python[0]); 
            } else { 
               def.python = CamelDefinitionYamlStep.readPythonExpression(element.python); 
            } 
        } 
        if (element?.constant !== undefined) { 
            if (Array.isArray(element.constant)) { 
               def.constant = CamelDefinitionYamlStep.readConstantExpression(element.constant[0]); 
            } else { 
               def.constant = CamelDefinitionYamlStep.readConstantExpression(element.constant); 
            } 
        } 
        if (element?.mvel !== undefined) { 
            if (Array.isArray(element.mvel)) { 
               def.mvel = CamelDefinitionYamlStep.readMvelExpression(element.mvel[0]); 
            } else { 
               def.mvel = CamelDefinitionYamlStep.readMvelExpression(element.mvel); 
            } 
        } 
        if (element?.method !== undefined) { 
            if (Array.isArray(element.method)) { 
               def.method = CamelDefinitionYamlStep.readMethodCallExpression(element.method[0]); 
            } else { 
               def.method = CamelDefinitionYamlStep.readMethodCallExpression(element.method); 
            } 
        } 
        if (element?.xquery !== undefined) { 
            if (Array.isArray(element.xquery)) { 
               def.xquery = CamelDefinitionYamlStep.readXQueryExpression(element.xquery[0]); 
            } else { 
               def.xquery = CamelDefinitionYamlStep.readXQueryExpression(element.xquery); 
            } 
        } 
        if (element?.datasonnet !== undefined) { 
            if (Array.isArray(element.datasonnet)) { 
               def.datasonnet = CamelDefinitionYamlStep.readDatasonnetExpression(element.datasonnet[0]); 
            } else { 
               def.datasonnet = CamelDefinitionYamlStep.readDatasonnetExpression(element.datasonnet); 
            } 
        } 
        if (element?.jq !== undefined) { 
            if (Array.isArray(element.jq)) { 
               def.jq = CamelDefinitionYamlStep.readJqExpression(element.jq[0]); 
            } else { 
               def.jq = CamelDefinitionYamlStep.readJqExpression(element.jq); 
            } 
        } 
        if (element?.js !== undefined) { 
            if (Array.isArray(element.js)) { 
               def.js = CamelDefinitionYamlStep.readJavaScriptExpression(element.js[0]); 
            } else { 
               def.js = CamelDefinitionYamlStep.readJavaScriptExpression(element.js); 
            } 
        } 
        if (element?.language !== undefined) { 
            if (Array.isArray(element.language)) { 
               def.language = CamelDefinitionYamlStep.readLanguageExpression(element.language[0]); 
            } else { 
               def.language = CamelDefinitionYamlStep.readLanguageExpression(element.language); 
            } 
        } 
        if (element?.simple !== undefined) { 
            if (Array.isArray(element.simple)) { 
               def.simple = CamelDefinitionYamlStep.readSimpleExpression(element.simple[0]); 
            } else { 
               def.simple = CamelDefinitionYamlStep.readSimpleExpression(element.simple); 
            } 
        } 
        if (element?.hl7terser !== undefined) { 
            if (Array.isArray(element.hl7terser)) { 
               def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser[0]); 
            } else { 
               def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser); 
            } 
        } 
        if (element?.tokenize !== undefined) { 
            if (Array.isArray(element.tokenize)) { 
               def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize[0]); 
            } else { 
               def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize); 
            } 
        } 
        if (element?.spel !== undefined) { 
            if (Array.isArray(element.spel)) { 
               def.spel = CamelDefinitionYamlStep.readSpELExpression(element.spel[0]); 
            } else { 
               def.spel = CamelDefinitionYamlStep.readSpELExpression(element.spel); 
            } 
        } 
        if (element?.ref !== undefined) { 
            if (Array.isArray(element.ref)) { 
               def.ref = CamelDefinitionYamlStep.readRefExpression(element.ref[0]); 
            } else { 
               def.ref = CamelDefinitionYamlStep.readRefExpression(element.ref); 
            } 
        } 
        if (element?.xpath !== undefined) { 
            if (Array.isArray(element.xpath)) { 
               def.xpath = CamelDefinitionYamlStep.readXPathExpression(element.xpath[0]); 
            } else { 
               def.xpath = CamelDefinitionYamlStep.readXPathExpression(element.xpath); 
            } 
        } 
        if (element?.groovy !== undefined) { 
            if (Array.isArray(element.groovy)) { 
               def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy[0]); 
            } else { 
               def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy); 
            } 
        } 
        if (element?.csimple !== undefined) { 
            if (Array.isArray(element.csimple)) { 
               def.csimple = CamelDefinitionYamlStep.readCSimpleExpression(element.csimple[0]); 
            } else { 
               def.csimple = CamelDefinitionYamlStep.readCSimpleExpression(element.csimple); 
            } 
        } 
        if (element?.exchangeProperty !== undefined) { 
            if (Array.isArray(element.exchangeProperty)) { 
               def.exchangeProperty = CamelDefinitionYamlStep.readExchangePropertyExpression(element.exchangeProperty[0]); 
            } else { 
               def.exchangeProperty = CamelDefinitionYamlStep.readExchangePropertyExpression(element.exchangeProperty); 
            } 
        } 
        if (element?.jsonpath !== undefined) { 
            if (Array.isArray(element.jsonpath)) { 
               def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath[0]); 
            } else { 
               def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath); 
            } 
        } 
        if (element?.header !== undefined) { 
            if (Array.isArray(element.header)) { 
               def.header = CamelDefinitionYamlStep.readHeaderExpression(element.header[0]); 
            } else { 
               def.header = CamelDefinitionYamlStep.readHeaderExpression(element.header); 
            } 
        } 
        if (element?.joor !== undefined) { 
            if (Array.isArray(element.joor)) { 
               def.joor = CamelDefinitionYamlStep.readJoorExpression(element.joor[0]); 
            } else { 
               def.joor = CamelDefinitionYamlStep.readJoorExpression(element.joor); 
            } 
        } 
        if (element?.xtokenize !== undefined) { 
            if (Array.isArray(element.xtokenize)) { 
               def.xtokenize = CamelDefinitionYamlStep.readXMLTokenizerExpression(element.xtokenize[0]); 
            } else { 
               def.xtokenize = CamelDefinitionYamlStep.readXMLTokenizerExpression(element.xtokenize); 
            } 
        } 

        return def;
    }

    static readGroovyExpression = (element: any): GroovyExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new GroovyExpression({...element}) : new GroovyExpression();

        return def;
    }

    static readHeaderExpression = (element: any): HeaderExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new HeaderExpression({...element}) : new HeaderExpression();

        return def;
    }

    static readHl7TerserExpression = (element: any): Hl7TerserExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new Hl7TerserExpression({...element}) : new Hl7TerserExpression();

        return def;
    }

    static readJavaScriptExpression = (element: any): JavaScriptExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new JavaScriptExpression({...element}) : new JavaScriptExpression();

        return def;
    }

    static readJoorExpression = (element: any): JoorExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new JoorExpression({...element}) : new JoorExpression();

        return def;
    }

    static readJqExpression = (element: any): JqExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new JqExpression({...element}) : new JqExpression();

        return def;
    }

    static readJsonPathExpression = (element: any): JsonPathExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new JsonPathExpression({...element}) : new JsonPathExpression();

        return def;
    }

    static readLanguageExpression = (element: any): LanguageExpression => {
        
        const def = element ? new LanguageExpression({...element}) : new LanguageExpression();

        return def;
    }

    static readMethodCallExpression = (element: any): MethodCallExpression => {
        
        const def = element ? new MethodCallExpression({...element}) : new MethodCallExpression();

        return def;
    }

    static readMvelExpression = (element: any): MvelExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new MvelExpression({...element}) : new MvelExpression();

        return def;
    }

    static readOgnlExpression = (element: any): OgnlExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new OgnlExpression({...element}) : new OgnlExpression();

        return def;
    }

    static readPythonExpression = (element: any): PythonExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new PythonExpression({...element}) : new PythonExpression();

        return def;
    }

    static readRefExpression = (element: any): RefExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new RefExpression({...element}) : new RefExpression();

        return def;
    }

    static readSimpleExpression = (element: any): SimpleExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new SimpleExpression({...element}) : new SimpleExpression();

        return def;
    }

    static readSpELExpression = (element: any): SpELExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new SpELExpression({...element}) : new SpELExpression();

        return def;
    }

    static readTokenizerExpression = (element: any): TokenizerExpression => {
        if (element && typeof element === 'string') element = {token: element};
        const def = element ? new TokenizerExpression({...element}) : new TokenizerExpression();

        return def;
    }

    static readXMLTokenizerExpression = (element: any): XMLTokenizerExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new XMLTokenizerExpression({...element}) : new XMLTokenizerExpression();
        def.namespace = element && element?.namespace ? element?.namespace.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readXPathExpression = (element: any): XPathExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new XPathExpression({...element}) : new XPathExpression();
        def.namespace = element && element?.namespace ? element?.namespace.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readXQueryExpression = (element: any): XQueryExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        const def = element ? new XQueryExpression({...element}) : new XQueryExpression();
        def.namespace = element && element?.namespace ? element?.namespace.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[]; 

        return def;
    }

    static readCustomLoadBalancerDefinition = (element: any): CustomLoadBalancerDefinition => {
        if (element && typeof element === 'string') element = {ref: element};
        const def = element ? new CustomLoadBalancerDefinition({...element}) : new CustomLoadBalancerDefinition();

        return def;
    }

    static readFailoverLoadBalancerDefinition = (element: any): FailoverLoadBalancerDefinition => {
        
        const def = element ? new FailoverLoadBalancerDefinition({...element}) : new FailoverLoadBalancerDefinition();

        return def;
    }

    static readRandomLoadBalancerDefinition = (element: any): RandomLoadBalancerDefinition => {
        
        const def = element ? new RandomLoadBalancerDefinition({...element}) : new RandomLoadBalancerDefinition();

        return def;
    }

    static readRoundRobinLoadBalancerDefinition = (element: any): RoundRobinLoadBalancerDefinition => {
        
        const def = element ? new RoundRobinLoadBalancerDefinition({...element}) : new RoundRobinLoadBalancerDefinition();

        return def;
    }

    static readStickyLoadBalancerDefinition = (element: any): StickyLoadBalancerDefinition => {
        
        const def = element ? new StickyLoadBalancerDefinition({...element}) : new StickyLoadBalancerDefinition();
        if (element?.correlationExpression !== undefined) { 
            if (Array.isArray(element.correlationExpression)) { 
               def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression[0]); 
            } else { 
               def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression); 
            } 
        } 

        return def;
    }

    static readTopicLoadBalancerDefinition = (element: any): TopicLoadBalancerDefinition => {
        
        const def = element ? new TopicLoadBalancerDefinition({...element}) : new TopicLoadBalancerDefinition();

        return def;
    }

    static readWeightedLoadBalancerDefinition = (element: any): WeightedLoadBalancerDefinition => {
        
        const def = element ? new WeightedLoadBalancerDefinition({...element}) : new WeightedLoadBalancerDefinition();

        return def;
    }

    static readApiKeyDefinition = (element: any): ApiKeyDefinition => {
        
        const def = element ? new ApiKeyDefinition({...element}) : new ApiKeyDefinition();

        return def;
    }

    static readBasicAuthDefinition = (element: any): BasicAuthDefinition => {
        
        const def = element ? new BasicAuthDefinition({...element}) : new BasicAuthDefinition();

        return def;
    }

    static readBearerTokenDefinition = (element: any): BearerTokenDefinition => {
        
        const def = element ? new BearerTokenDefinition({...element}) : new BearerTokenDefinition();

        return def;
    }

    static readDeleteDefinition = (element: any): DeleteDefinition => {
        
        const def = element ? new DeleteDefinition({...element}) : new DeleteDefinition();
        def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[]; 
        def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[]; 
        def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[]; 

        return def;
    }

    static readGetDefinition = (element: any): GetDefinition => {
        
        const def = element ? new GetDefinition({...element}) : new GetDefinition();
        def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[]; 
        def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[]; 
        def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[]; 

        return def;
    }

    static readHeadDefinition = (element: any): HeadDefinition => {
        
        const def = element ? new HeadDefinition({...element}) : new HeadDefinition();
        def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[]; 
        def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[]; 
        def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[]; 

        return def;
    }

    static readMutualTLSDefinition = (element: any): MutualTLSDefinition => {
        
        const def = element ? new MutualTLSDefinition({...element}) : new MutualTLSDefinition();

        return def;
    }

    static readOAuth2Definition = (element: any): OAuth2Definition => {
        
        const def = element ? new OAuth2Definition({...element}) : new OAuth2Definition();
        def.scopes = element && element?.scopes ? element?.scopes.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[]; 

        return def;
    }

    static readOpenIdConnectDefinition = (element: any): OpenIdConnectDefinition => {
        
        const def = element ? new OpenIdConnectDefinition({...element}) : new OpenIdConnectDefinition();

        return def;
    }

    static readParamDefinition = (element: any): ParamDefinition => {
        
        const def = element ? new ParamDefinition({...element}) : new ParamDefinition();
        def.allowableValues = element && element?.allowableValues ? element?.allowableValues.map((x:any) => CamelDefinitionYamlStep.readValueDefinition(x)) :[]; 
        def.examples = element && element?.examples ? element?.examples.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[]; 

        return def;
    }

    static readPatchDefinition = (element: any): PatchDefinition => {
        
        const def = element ? new PatchDefinition({...element}) : new PatchDefinition();
        def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[]; 
        def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[]; 
        def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[]; 

        return def;
    }

    static readPostDefinition = (element: any): PostDefinition => {
        
        const def = element ? new PostDefinition({...element}) : new PostDefinition();
        def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[]; 
        def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[]; 
        def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[]; 

        return def;
    }

    static readPutDefinition = (element: any): PutDefinition => {
        
        const def = element ? new PutDefinition({...element}) : new PutDefinition();
        def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[]; 
        def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[]; 
        def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[]; 

        return def;
    }

    static readResponseHeaderDefinition = (element: any): ResponseHeaderDefinition => {
        
        const def = element ? new ResponseHeaderDefinition({...element}) : new ResponseHeaderDefinition();
        def.allowableValues = element && element?.allowableValues ? element?.allowableValues.map((x:any) => CamelDefinitionYamlStep.readValueDefinition(x)) :[]; 

        return def;
    }

    static readResponseMessageDefinition = (element: any): ResponseMessageDefinition => {
        
        const def = element ? new ResponseMessageDefinition({...element}) : new ResponseMessageDefinition();
        def.examples = element && element?.examples ? element?.examples.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[]; 
        def.header = element && element?.header ? element?.header.map((x:any) => CamelDefinitionYamlStep.readResponseHeaderDefinition(x)) :[]; 

        return def;
    }

    static readRestBindingDefinition = (element: any): RestBindingDefinition => {
        
        const def = element ? new RestBindingDefinition({...element}) : new RestBindingDefinition();

        return def;
    }

    static readRestConfigurationDefinition = (element: any): RestConfigurationDefinition => {
        
        const def = element ? new RestConfigurationDefinition({...element}) : new RestConfigurationDefinition();
        def.corsHeaders = element && element?.corsHeaders ? element?.corsHeaders.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[]; 
        def.dataFormatProperty = element && element?.dataFormatProperty ? element?.dataFormatProperty.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[]; 
        def.consumerProperty = element && element?.consumerProperty ? element?.consumerProperty.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[]; 
        def.apiProperty = element && element?.apiProperty ? element?.apiProperty.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[]; 
        def.endpointProperty = element && element?.endpointProperty ? element?.endpointProperty.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[]; 
        def.componentProperty = element && element?.componentProperty ? element?.componentProperty.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[]; 

        return def;
    }

    static readRestDefinition = (element: any): RestDefinition => {
        
        const def = element ? new RestDefinition({...element}) : new RestDefinition();
        def.head = element && element?.head ? element?.head.map((x:any) => CamelDefinitionYamlStep.readHeadDefinition(x)) :[]; 
        def.patch = element && element?.patch ? element?.patch.map((x:any) => CamelDefinitionYamlStep.readPatchDefinition(x)) :[]; 
        def.post = element && element?.post ? element?.post.map((x:any) => CamelDefinitionYamlStep.readPostDefinition(x)) :[]; 
        def.get = element && element?.get ? element?.get.map((x:any) => CamelDefinitionYamlStep.readGetDefinition(x)) :[]; 
        def.securityRequirements = element && element?.securityRequirements ? element?.securityRequirements.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[]; 
        def.delete = element && element?.delete ? element?.delete.map((x:any) => CamelDefinitionYamlStep.readDeleteDefinition(x)) :[]; 
        if (element?.securityDefinitions !== undefined) { 
            if (Array.isArray(element.securityDefinitions)) { 
               def.securityDefinitions = CamelDefinitionYamlStep.readRestSecuritiesDefinition(element.securityDefinitions[0]); 
            } else { 
               def.securityDefinitions = CamelDefinitionYamlStep.readRestSecuritiesDefinition(element.securityDefinitions); 
            } 
        } 
        def.put = element && element?.put ? element?.put.map((x:any) => CamelDefinitionYamlStep.readPutDefinition(x)) :[]; 

        return def;
    }

    static readRestPropertyDefinition = (element: any): RestPropertyDefinition => {
        
        const def = element ? new RestPropertyDefinition({...element}) : new RestPropertyDefinition();

        return def;
    }

    static readRestSecuritiesDefinition = (element: any): RestSecuritiesDefinition => {
        
        const def = element ? new RestSecuritiesDefinition({...element}) : new RestSecuritiesDefinition();
        if (element?.openIdConnect !== undefined) { 
            if (Array.isArray(element.openIdConnect)) { 
               def.openIdConnect = CamelDefinitionYamlStep.readOpenIdConnectDefinition(element.openIdConnect[0]); 
            } else { 
               def.openIdConnect = CamelDefinitionYamlStep.readOpenIdConnectDefinition(element.openIdConnect); 
            } 
        } 
        if (element?.apiKey !== undefined) { 
            if (Array.isArray(element.apiKey)) { 
               def.apiKey = CamelDefinitionYamlStep.readApiKeyDefinition(element.apiKey[0]); 
            } else { 
               def.apiKey = CamelDefinitionYamlStep.readApiKeyDefinition(element.apiKey); 
            } 
        } 
        if (element?.basicAuth !== undefined) { 
            if (Array.isArray(element.basicAuth)) { 
               def.basicAuth = CamelDefinitionYamlStep.readBasicAuthDefinition(element.basicAuth[0]); 
            } else { 
               def.basicAuth = CamelDefinitionYamlStep.readBasicAuthDefinition(element.basicAuth); 
            } 
        } 
        if (element?.mutualTls !== undefined) { 
            if (Array.isArray(element.mutualTls)) { 
               def.mutualTls = CamelDefinitionYamlStep.readMutualTLSDefinition(element.mutualTls[0]); 
            } else { 
               def.mutualTls = CamelDefinitionYamlStep.readMutualTLSDefinition(element.mutualTls); 
            } 
        } 
        if (element?.bearer !== undefined) { 
            if (Array.isArray(element.bearer)) { 
               def.bearer = CamelDefinitionYamlStep.readBearerTokenDefinition(element.bearer[0]); 
            } else { 
               def.bearer = CamelDefinitionYamlStep.readBearerTokenDefinition(element.bearer); 
            } 
        } 
        if (element?.oauth2 !== undefined) { 
            if (Array.isArray(element.oauth2)) { 
               def.oauth2 = CamelDefinitionYamlStep.readOAuth2Definition(element.oauth2[0]); 
            } else { 
               def.oauth2 = CamelDefinitionYamlStep.readOAuth2Definition(element.oauth2); 
            } 
        } 

        return def;
    }

    static readRestsDefinition = (element: any): RestsDefinition => {
        
        const def = element ? new RestsDefinition({...element}) : new RestsDefinition();
        def.rest = element && element?.rest ? element?.rest.map((x:any) => CamelDefinitionYamlStep.readRestDefinition(x)) :[]; 

        return def;
    }

    static readSecurityDefinition = (element: any): SecurityDefinition => {
        
        const def = element ? new SecurityDefinition({...element}) : new SecurityDefinition();

        return def;
    }

    static readCustomTransformerDefinition = (element: any): CustomTransformerDefinition => {
        
        const def = element ? new CustomTransformerDefinition({...element}) : new CustomTransformerDefinition();

        return def;
    }

    static readDataFormatTransformerDefinition = (element: any): DataFormatTransformerDefinition => {
        
        const def = element ? new DataFormatTransformerDefinition({...element}) : new DataFormatTransformerDefinition();
        if (element?.univocityCsv !== undefined) { 
            if (Array.isArray(element.univocityCsv)) { 
               def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv[0]); 
            } else { 
               def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv); 
            } 
        } 
        if (element?.protobuf !== undefined) { 
            if (Array.isArray(element.protobuf)) { 
               def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf[0]); 
            } else { 
               def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf); 
            } 
        } 
        if (element?.tarFile !== undefined) { 
            if (Array.isArray(element.tarFile)) { 
               def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile[0]); 
            } else { 
               def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile); 
            } 
        } 
        if (element?.tidyMarkup !== undefined) { 
            if (Array.isArray(element.tidyMarkup)) { 
               def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup[0]); 
            } else { 
               def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup); 
            } 
        } 
        if (element?.csv !== undefined) { 
            if (Array.isArray(element.csv)) { 
               def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv[0]); 
            } else { 
               def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv); 
            } 
        } 
        if (element?.base64 !== undefined) { 
            if (Array.isArray(element.base64)) { 
               def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64[0]); 
            } else { 
               def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64); 
            } 
        } 
        if (element?.zipDeflater !== undefined) { 
            if (Array.isArray(element.zipDeflater)) { 
               def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater[0]); 
            } else { 
               def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater); 
            } 
        } 
        if (element?.bindy !== undefined) { 
            if (Array.isArray(element.bindy)) { 
               def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy[0]); 
            } else { 
               def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy); 
            } 
        } 
        if (element?.syslog !== undefined) { 
            if (Array.isArray(element.syslog)) { 
               def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog[0]); 
            } else { 
               def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog); 
            } 
        } 
        if (element?.zipFile !== undefined) { 
            if (Array.isArray(element.zipFile)) { 
               def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile[0]); 
            } else { 
               def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile); 
            } 
        } 
        if (element?.jaxb !== undefined) { 
            if (Array.isArray(element.jaxb)) { 
               def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb[0]); 
            } else { 
               def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb); 
            } 
        } 
        if (element?.rss !== undefined) { 
            if (Array.isArray(element.rss)) { 
               def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss[0]); 
            } else { 
               def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss); 
            } 
        } 
        if (element?.mimeMultipart !== undefined) { 
            if (Array.isArray(element.mimeMultipart)) { 
               def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart[0]); 
            } else { 
               def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart); 
            } 
        } 
        if (element?.asn1 !== undefined) { 
            if (Array.isArray(element.asn1)) { 
               def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1[0]); 
            } else { 
               def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1); 
            } 
        } 
        if (element?.pgp !== undefined) { 
            if (Array.isArray(element.pgp)) { 
               def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp[0]); 
            } else { 
               def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp); 
            } 
        } 
        if (element?.thrift !== undefined) { 
            if (Array.isArray(element.thrift)) { 
               def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift[0]); 
            } else { 
               def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift); 
            } 
        } 
        if (element?.json !== undefined) { 
            if (Array.isArray(element.json)) { 
               def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json[0]); 
            } else { 
               def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json); 
            } 
        } 
        if (element?.lzf !== undefined) { 
            if (Array.isArray(element.lzf)) { 
               def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf[0]); 
            } else { 
               def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf); 
            } 
        } 
        if (element?.fhirXml !== undefined) { 
            if (Array.isArray(element.fhirXml)) { 
               def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml[0]); 
            } else { 
               def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml); 
            } 
        } 
        if (element?.barcode !== undefined) { 
            if (Array.isArray(element.barcode)) { 
               def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode[0]); 
            } else { 
               def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode); 
            } 
        } 
        if (element?.avro !== undefined) { 
            if (Array.isArray(element.avro)) { 
               def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro[0]); 
            } else { 
               def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro); 
            } 
        } 
        if (element?.yaml !== undefined) { 
            if (Array.isArray(element.yaml)) { 
               def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml[0]); 
            } else { 
               def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml); 
            } 
        } 
        if (element?.fhirJson !== undefined) { 
            if (Array.isArray(element.fhirJson)) { 
               def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson[0]); 
            } else { 
               def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson); 
            } 
        } 
        if (element?.any23 !== undefined) { 
            if (Array.isArray(element.any23)) { 
               def.any23 = CamelDefinitionYamlStep.readAny23DataFormat(element.any23[0]); 
            } else { 
               def.any23 = CamelDefinitionYamlStep.readAny23DataFormat(element.any23); 
            } 
        } 
        if (element?.custom !== undefined) { 
            if (Array.isArray(element.custom)) { 
               def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom[0]); 
            } else { 
               def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom); 
            } 
        } 
        if (element?.flatpack !== undefined) { 
            if (Array.isArray(element.flatpack)) { 
               def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack[0]); 
            } else { 
               def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack); 
            } 
        } 
        if (element?.swiftMx !== undefined) { 
            if (Array.isArray(element.swiftMx)) { 
               def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx[0]); 
            } else { 
               def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx); 
            } 
        } 
        if (element?.cbor !== undefined) { 
            if (Array.isArray(element.cbor)) { 
               def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor[0]); 
            } else { 
               def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor); 
            } 
        } 
        if (element?.crypto !== undefined) { 
            if (Array.isArray(element.crypto)) { 
               def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto[0]); 
            } else { 
               def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto); 
            } 
        } 
        if (element?.swiftMt !== undefined) { 
            if (Array.isArray(element.swiftMt)) { 
               def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt[0]); 
            } else { 
               def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt); 
            } 
        } 
        if (element?.univocityTsv !== undefined) { 
            if (Array.isArray(element.univocityTsv)) { 
               def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv[0]); 
            } else { 
               def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv); 
            } 
        } 
        if (element?.hl7 !== undefined) { 
            if (Array.isArray(element.hl7)) { 
               def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7[0]); 
            } else { 
               def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7); 
            } 
        } 
        if (element?.jsonApi !== undefined) { 
            if (Array.isArray(element.jsonApi)) { 
               def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi[0]); 
            } else { 
               def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi); 
            } 
        } 
        if (element?.xmlSecurity !== undefined) { 
            if (Array.isArray(element.xmlSecurity)) { 
               def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity[0]); 
            } else { 
               def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity); 
            } 
        } 
        if (element?.ical !== undefined) { 
            if (Array.isArray(element.ical)) { 
               def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical[0]); 
            } else { 
               def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical); 
            } 
        } 
        if (element?.univocityFixed !== undefined) { 
            if (Array.isArray(element.univocityFixed)) { 
               def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed[0]); 
            } else { 
               def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed); 
            } 
        } 
        if (element?.jacksonXml !== undefined) { 
            if (Array.isArray(element.jacksonXml)) { 
               def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml[0]); 
            } else { 
               def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml); 
            } 
        } 
        if (element?.grok !== undefined) { 
            if (Array.isArray(element.grok)) { 
               def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok[0]); 
            } else { 
               def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok); 
            } 
        } 
        if (element?.xstream !== undefined) { 
            if (Array.isArray(element.xstream)) { 
               def.xstream = CamelDefinitionYamlStep.readXStreamDataFormat(element.xstream[0]); 
            } else { 
               def.xstream = CamelDefinitionYamlStep.readXStreamDataFormat(element.xstream); 
            } 
        } 
        if (element?.gzipDeflater !== undefined) { 
            if (Array.isArray(element.gzipDeflater)) { 
               def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater[0]); 
            } else { 
               def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater); 
            } 
        } 
        if (element?.soap !== undefined) { 
            if (Array.isArray(element.soap)) { 
               def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap[0]); 
            } else { 
               def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap); 
            } 
        } 

        return def;
    }

    static readEndpointTransformerDefinition = (element: any): EndpointTransformerDefinition => {
        
        const def = element ? new EndpointTransformerDefinition({...element}) : new EndpointTransformerDefinition();

        return def;
    }

    static readTransformersDefinition = (element: any): TransformersDefinition => {
        
        const def = element ? new TransformersDefinition({...element}) : new TransformersDefinition();
        if (element?.endpointTransformer !== undefined) { 
            if (Array.isArray(element.endpointTransformer)) { 
               def.endpointTransformer = CamelDefinitionYamlStep.readEndpointTransformerDefinition(element.endpointTransformer[0]); 
            } else { 
               def.endpointTransformer = CamelDefinitionYamlStep.readEndpointTransformerDefinition(element.endpointTransformer); 
            } 
        } 
        if (element?.customTransformer !== undefined) { 
            if (Array.isArray(element.customTransformer)) { 
               def.customTransformer = CamelDefinitionYamlStep.readCustomTransformerDefinition(element.customTransformer[0]); 
            } else { 
               def.customTransformer = CamelDefinitionYamlStep.readCustomTransformerDefinition(element.customTransformer); 
            } 
        } 
        if (element?.dataFormatTransformer !== undefined) { 
            if (Array.isArray(element.dataFormatTransformer)) { 
               def.dataFormatTransformer = CamelDefinitionYamlStep.readDataFormatTransformerDefinition(element.dataFormatTransformer[0]); 
            } else { 
               def.dataFormatTransformer = CamelDefinitionYamlStep.readDataFormatTransformerDefinition(element.dataFormatTransformer); 
            } 
        } 

        return def;
    }

    static readCustomValidatorDefinition = (element: any): CustomValidatorDefinition => {
        
        const def = element ? new CustomValidatorDefinition({...element}) : new CustomValidatorDefinition();

        return def;
    }

    static readEndpointValidatorDefinition = (element: any): EndpointValidatorDefinition => {
        
        const def = element ? new EndpointValidatorDefinition({...element}) : new EndpointValidatorDefinition();

        return def;
    }

    static readPredicateValidatorDefinition = (element: any): PredicateValidatorDefinition => {
        
        const def = element ? new PredicateValidatorDefinition({...element}) : new PredicateValidatorDefinition();
        if (element?.expression !== undefined) { 
            def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression); 
        } else {
            const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
            if (languageName){
                const exp:any = {};
                exp[languageName] = element[languageName]
                def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
                delete (def as any)[languageName];
            }
        }

        return def;
    }

    static readValidatorsDefinition = (element: any): ValidatorsDefinition => {
        
        const def = element ? new ValidatorsDefinition({...element}) : new ValidatorsDefinition();
        if (element?.predicateValidator !== undefined) { 
            if (Array.isArray(element.predicateValidator)) { 
               def.predicateValidator = CamelDefinitionYamlStep.readPredicateValidatorDefinition(element.predicateValidator[0]); 
            } else { 
               def.predicateValidator = CamelDefinitionYamlStep.readPredicateValidatorDefinition(element.predicateValidator); 
            } 
        } 
        if (element?.endpointValidator !== undefined) { 
            if (Array.isArray(element.endpointValidator)) { 
               def.endpointValidator = CamelDefinitionYamlStep.readEndpointValidatorDefinition(element.endpointValidator[0]); 
            } else { 
               def.endpointValidator = CamelDefinitionYamlStep.readEndpointValidatorDefinition(element.endpointValidator); 
            } 
        } 
        if (element?.customValidator !== undefined) { 
            if (Array.isArray(element.customValidator)) { 
               def.customValidator = CamelDefinitionYamlStep.readCustomValidatorDefinition(element.customValidator[0]); 
            } else { 
               def.customValidator = CamelDefinitionYamlStep.readCustomValidatorDefinition(element.customValidator); 
            } 
        } 

        return def;
    }

    static readStep = (body: any, clone: boolean = false): CamelElement => {
        const name = Object.getOwnPropertyNames(body)[0];
        const newBody = CamelUtil.camelizeBody(name, body[name], clone);
        switch (name) { 
            case 'setProperty': return CamelDefinitionYamlStep.readSetPropertyDefinition(newBody);
            case 'to': return CamelDefinitionYamlStep.readToDefinition(newBody);
            case 'doCatch': return CamelDefinitionYamlStep.readCatchDefinition(newBody);
            case 'inOut': return CamelDefinitionYamlStep.readInOutDefinition(newBody);
            case 'onFallback': return CamelDefinitionYamlStep.readOnFallbackDefinition(newBody);
            case 'loadBalance': return CamelDefinitionYamlStep.readLoadBalanceDefinition(newBody);
            case 'process': return CamelDefinitionYamlStep.readProcessDefinition(newBody);
            case 'bean': return CamelDefinitionYamlStep.readBeanDefinition(newBody);
            case 'transacted': return CamelDefinitionYamlStep.readTransactedDefinition(newBody);
            case 'pollEnrich': return CamelDefinitionYamlStep.readPollEnrichDefinition(newBody);
            case 'filter': return CamelDefinitionYamlStep.readFilterDefinition(newBody);
            case 'pausable': return CamelDefinitionYamlStep.readPausableDefinition(newBody);
            case 'setBody': return CamelDefinitionYamlStep.readSetBodyDefinition(newBody);
            case 'claimCheck': return CamelDefinitionYamlStep.readClaimCheckDefinition(newBody);
            case 'step': return CamelDefinitionYamlStep.readStepDefinition(newBody);
            case 'aggregate': return CamelDefinitionYamlStep.readAggregateDefinition(newBody);
            case 'when': return CamelDefinitionYamlStep.readWhenDefinition(newBody);
            case 'loop': return CamelDefinitionYamlStep.readLoopDefinition(newBody);
            case 'stop': return CamelDefinitionYamlStep.readStopDefinition(newBody);
            case 'resumable': return CamelDefinitionYamlStep.readResumableDefinition(newBody);
            case 'removeProperty': return CamelDefinitionYamlStep.readRemovePropertyDefinition(newBody);
            case 'split': return CamelDefinitionYamlStep.readSplitDefinition(newBody);
            case 'multicast': return CamelDefinitionYamlStep.readMulticastDefinition(newBody);
            case 'otherwise': return CamelDefinitionYamlStep.readOtherwiseDefinition(newBody);
            case 'removeProperties': return CamelDefinitionYamlStep.readRemovePropertiesDefinition(newBody);
            case 'saga': return CamelDefinitionYamlStep.readSagaDefinition(newBody);
            case 'removeHeaders': return CamelDefinitionYamlStep.readRemoveHeadersDefinition(newBody);
            case 'setExchangePattern': return CamelDefinitionYamlStep.readSetExchangePatternDefinition(newBody);
            case 'intercept': return CamelDefinitionYamlStep.readInterceptDefinition(newBody);
            case 'transform': return CamelDefinitionYamlStep.readTransformDefinition(newBody);
            case 'routingSlip': return CamelDefinitionYamlStep.readRoutingSlipDefinition(newBody);
            case 'doTry': return CamelDefinitionYamlStep.readTryDefinition(newBody);
            case 'delay': return CamelDefinitionYamlStep.readDelayDefinition(newBody);
            case 'script': return CamelDefinitionYamlStep.readScriptDefinition(newBody);
            case 'inOnly': return CamelDefinitionYamlStep.readInOnlyDefinition(newBody);
            case 'enrich': return CamelDefinitionYamlStep.readEnrichDefinition(newBody);
            case 'onCompletion': return CamelDefinitionYamlStep.readOnCompletionDefinition(newBody);
            case 'wireTap': return CamelDefinitionYamlStep.readWireTapDefinition(newBody);
            case 'kamelet': return CamelDefinitionYamlStep.readKameletDefinition(newBody);
            case 'interceptFrom': return CamelDefinitionYamlStep.readInterceptFromDefinition(newBody);
            case 'doFinally': return CamelDefinitionYamlStep.readFinallyDefinition(newBody);
            case 'idempotentConsumer': return CamelDefinitionYamlStep.readIdempotentConsumerDefinition(newBody);
            case 'removeHeader': return CamelDefinitionYamlStep.readRemoveHeaderDefinition(newBody);
            case 'circuitBreaker': return CamelDefinitionYamlStep.readCircuitBreakerDefinition(newBody);
            case 'rollback': return CamelDefinitionYamlStep.readRollbackDefinition(newBody);
            case 'dynamicRouter': return CamelDefinitionYamlStep.readDynamicRouterDefinition(newBody);
            case 'resequence': return CamelDefinitionYamlStep.readResequenceDefinition(newBody);
            case 'log': return CamelDefinitionYamlStep.readLogDefinition(newBody);
            case 'throttle': return CamelDefinitionYamlStep.readThrottleDefinition(newBody);
            case 'recipientList': return CamelDefinitionYamlStep.readRecipientListDefinition(newBody);
            case 'marshal': return CamelDefinitionYamlStep.readMarshalDefinition(newBody);
            case 'policy': return CamelDefinitionYamlStep.readPolicyDefinition(newBody);
            case 'serviceCall': return CamelDefinitionYamlStep.readServiceCallDefinition(newBody);
            case 'unmarshal': return CamelDefinitionYamlStep.readUnmarshalDefinition(newBody);
            case 'threads': return CamelDefinitionYamlStep.readThreadsDefinition(newBody);
            case 'toD': return CamelDefinitionYamlStep.readToDynamicDefinition(newBody);
            case 'convertBodyTo': return CamelDefinitionYamlStep.readConvertBodyDefinition(newBody);
            case 'pipeline': return CamelDefinitionYamlStep.readPipelineDefinition(newBody);
            case 'throwException': return CamelDefinitionYamlStep.readThrowExceptionDefinition(newBody);
            case 'validate': return CamelDefinitionYamlStep.readValidateDefinition(newBody);
            case 'interceptSendToEndpoint': return CamelDefinitionYamlStep.readInterceptSendToEndpointDefinition(newBody);
            case 'choice': return CamelDefinitionYamlStep.readChoiceDefinition(newBody);
            case 'whenSkipSendToEndpoint': return CamelDefinitionYamlStep.readWhenSkipSendToEndpointDefinition(newBody);
            case 'sample': return CamelDefinitionYamlStep.readSamplingDefinition(newBody);
            case 'setHeader': return CamelDefinitionYamlStep.readSetHeaderDefinition(newBody);
            case 'sort': return CamelDefinitionYamlStep.readSortDefinition(newBody);
            case 'toD': return CamelDefinitionYamlStep.readToDynamicDefinition(newBody);
            default: return new CamelElement('');
        }
    }

    static readSteps = (elements: any[] | undefined): CamelElement[] => {
        const result: CamelElement[] = []
        if (elements !== undefined){
            elements.forEach(e => {
                result.push(CamelDefinitionYamlStep.readStep(e));
            })
        }
        return result
    }
}
