/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

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

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

export class CamelDefinitionYamlStep { 

    static readProcessorDefinition = (element: any): ProcessorDefinition => {
        
        let 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?.poll !== undefined) { 
            if (Array.isArray(element.poll)) { 
               def.poll = CamelDefinitionYamlStep.readPollDefinition(element.poll[0]); 
            } else { 
               def.poll = CamelDefinitionYamlStep.readPollDefinition(element.poll); 
            } 
        } 
        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?.split !== undefined) { 
            if (Array.isArray(element.split)) { 
               def.split = CamelDefinitionYamlStep.readSplitDefinition(element.split[0]); 
            } else { 
               def.split = CamelDefinitionYamlStep.readSplitDefinition(element.split); 
            } 
        } 
        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?.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?.convertHeaderTo !== undefined) { 
            if (Array.isArray(element.convertHeaderTo)) { 
               def.convertHeaderTo = CamelDefinitionYamlStep.readConvertHeaderDefinition(element.convertHeaderTo[0]); 
            } else { 
               def.convertHeaderTo = CamelDefinitionYamlStep.readConvertHeaderDefinition(element.convertHeaderTo); 
            } 
        } 
        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?.removeVariable !== undefined) { 
            if (Array.isArray(element.removeVariable)) { 
               def.removeVariable = CamelDefinitionYamlStep.readRemoveVariableDefinition(element.removeVariable[0]); 
            } else { 
               def.removeVariable = CamelDefinitionYamlStep.readRemoveVariableDefinition(element.removeVariable); 
            } 
        } 
        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?.setHeaders !== undefined) { 
            if (Array.isArray(element.setHeaders)) { 
               def.setHeaders = CamelDefinitionYamlStep.readSetHeadersDefinition(element.setHeaders[0]); 
            } else { 
               def.setHeaders = CamelDefinitionYamlStep.readSetHeadersDefinition(element.setHeaders); 
            } 
        } 
        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?.setVariables !== undefined) { 
            if (Array.isArray(element.setVariables)) { 
               def.setVariables = CamelDefinitionYamlStep.readSetVariablesDefinition(element.setVariables[0]); 
            } else { 
               def.setVariables = CamelDefinitionYamlStep.readSetVariablesDefinition(element.setVariables); 
            } 
        } 
        if (element?.convertVariableTo !== undefined) { 
            if (Array.isArray(element.convertVariableTo)) { 
               def.convertVariableTo = CamelDefinitionYamlStep.readConvertVariableDefinition(element.convertVariableTo[0]); 
            } else { 
               def.convertVariableTo = CamelDefinitionYamlStep.readConvertVariableDefinition(element.convertVariableTo); 
            } 
        } 
        if (element?.setVariable !== undefined) { 
            if (Array.isArray(element.setVariable)) { 
               def.setVariable = CamelDefinitionYamlStep.readSetVariableDefinition(element.setVariable[0]); 
            } else { 
               def.setVariable = CamelDefinitionYamlStep.readSetVariableDefinition(element.setVariable); 
            } 
        } 
        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?.langChain4j !== undefined) { 
            if (Array.isArray(element.langChain4j)) { 
               def.langChain4j = CamelDefinitionYamlStep.readLangChain4jTokenizerDefinition(element.langChain4j[0]); 
            } else { 
               def.langChain4j = CamelDefinitionYamlStep.readLangChain4jTokenizerDefinition(element.langChain4j); 
            } 
        } 
        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 => {
        
        let def = element ? new BeansDeserializer({...element}) : new BeansDeserializer();

        return def;
    }

    static readErrorHandlerDeserializer = (element: any): ErrorHandlerDeserializer => {
        
        let def = element ? new ErrorHandlerDeserializer({...element}) : new ErrorHandlerDeserializer();
        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 readOutputAwareFromDefinition = (element: any): OutputAwareFromDefinition => {
        
        let def = element ? new OutputAwareFromDefinition({...element}) : new OutputAwareFromDefinition();
        def = ComponentApi.parseElementUri(def);
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readAggregateDefinition = (element: any): AggregateDefinition => {
        
        let 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 => {
        
        let def = element ? new BeanDefinition({...element}) : new BeanDefinition();

        return def;
    }

    static readBeanFactoryDefinition = (element: any): BeanFactoryDefinition => {
        
        let def = element ? new BeanFactoryDefinition({...element}) : new BeanFactoryDefinition();

        return def;
    }

    static readCatchDefinition = (element: any): CatchDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let 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 => {
        
        let def = element ? new ClaimCheckDefinition({...element}) : new ClaimCheckDefinition();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readConvertHeaderDefinition = (element: any): ConvertHeaderDefinition => {
        
        let def = element ? new ConvertHeaderDefinition({...element}) : new ConvertHeaderDefinition();

        return def;
    }

    static readConvertVariableDefinition = (element: any): ConvertVariableDefinition => {
        
        let def = element ? new ConvertVariableDefinition({...element}) : new ConvertVariableDefinition();

        return def;
    }

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

        return def;
    }

    static readDelayDefinition = (element: any): DelayDefinition => {
        
        let 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 readDynamicRouterDefinition = (element: any): DynamicRouterDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let 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); 
            } 
        } 
        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 readExpressionSubElementDefinition = (element: any): ExpressionSubElementDefinition => {
        
        let def = element ? new ExpressionSubElementDefinition({...element}) : new ExpressionSubElementDefinition();
        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?.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?.tokenize !== undefined) { 
            if (Array.isArray(element.tokenize)) { 
               def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize[0]); 
            } else { 
               def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize); 
            } 
        } 
        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?.java !== undefined) { 
            if (Array.isArray(element.java)) { 
               def.java = CamelDefinitionYamlStep.readJavaExpression(element.java[0]); 
            } else { 
               def.java = CamelDefinitionYamlStep.readJavaExpression(element.java); 
            } 
        } 
        if (element?.wasm !== undefined) { 
            if (Array.isArray(element.wasm)) { 
               def.wasm = CamelDefinitionYamlStep.readWasmExpression(element.wasm[0]); 
            } else { 
               def.wasm = CamelDefinitionYamlStep.readWasmExpression(element.wasm); 
            } 
        } 
        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?.jsonpath !== undefined) { 
            if (Array.isArray(element.jsonpath)) { 
               def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath[0]); 
            } else { 
               def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath); 
            } 
        } 
        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?.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?.hl7terser !== undefined) { 
            if (Array.isArray(element.hl7terser)) { 
               def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser[0]); 
            } else { 
               def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser); 
            } 
        } 
        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?.groovy !== undefined) { 
            if (Array.isArray(element.groovy)) { 
               def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy[0]); 
            } else { 
               def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy); 
            } 
        } 
        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?.variable !== undefined) { 
            if (Array.isArray(element.variable)) { 
               def.variable = CamelDefinitionYamlStep.readVariableExpression(element.variable[0]); 
            } else { 
               def.variable = CamelDefinitionYamlStep.readVariableExpression(element.variable); 
            } 
        } 
        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?.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 => {
        
        let def = element ? new FaultToleranceConfigurationDefinition({...element}) : new FaultToleranceConfigurationDefinition();

        return def;
    }

    static readFilterDefinition = (element: any): FilterDefinition => {
        
        let 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 => {
        
        let 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};
        let def = element ? new FromDefinition({...element}) : new FromDefinition();
        def = ComponentApi.parseElementUri(def);
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

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

        return def;
    }

    static readGlobalOptionsDefinition = (element: any): GlobalOptionsDefinition => {
        
        let 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 => {
        
        let 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 readInputTypeDefinition = (element: any): InputTypeDefinition => {
        
        let def = element ? new InputTypeDefinition({...element}) : new InputTypeDefinition();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readLoadBalanceDefinition = (element: any): LoadBalanceDefinition => {
        
        let def = element ? new LoadBalanceDefinition({...element}) : new LoadBalanceDefinition();
        if (element?.roundRobinLoadBalancer !== undefined) { 
            if (Array.isArray(element.roundRobinLoadBalancer)) { 
               def.roundRobinLoadBalancer = CamelDefinitionYamlStep.readRoundRobinLoadBalancerDefinition(element.roundRobinLoadBalancer[0]); 
            } else { 
               def.roundRobinLoadBalancer = CamelDefinitionYamlStep.readRoundRobinLoadBalancerDefinition(element.roundRobinLoadBalancer); 
            } 
        } 
        if (element?.stickyLoadBalancer !== undefined) { 
            if (Array.isArray(element.stickyLoadBalancer)) { 
               def.stickyLoadBalancer = CamelDefinitionYamlStep.readStickyLoadBalancerDefinition(element.stickyLoadBalancer[0]); 
            } else { 
               def.stickyLoadBalancer = CamelDefinitionYamlStep.readStickyLoadBalancerDefinition(element.stickyLoadBalancer); 
            } 
        } 
        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?.topicLoadBalancer !== undefined) { 
            if (Array.isArray(element.topicLoadBalancer)) { 
               def.topicLoadBalancer = CamelDefinitionYamlStep.readTopicLoadBalancerDefinition(element.topicLoadBalancer[0]); 
            } else { 
               def.topicLoadBalancer = CamelDefinitionYamlStep.readTopicLoadBalancerDefinition(element.topicLoadBalancer); 
            } 
        } 
        if (element?.failoverLoadBalancer !== undefined) { 
            if (Array.isArray(element.failoverLoadBalancer)) { 
               def.failoverLoadBalancer = CamelDefinitionYamlStep.readFailoverLoadBalancerDefinition(element.failoverLoadBalancer[0]); 
            } else { 
               def.failoverLoadBalancer = CamelDefinitionYamlStep.readFailoverLoadBalancerDefinition(element.failoverLoadBalancer); 
            } 
        } 
        if (element?.weightedLoadBalancer !== undefined) { 
            if (Array.isArray(element.weightedLoadBalancer)) { 
               def.weightedLoadBalancer = CamelDefinitionYamlStep.readWeightedLoadBalancerDefinition(element.weightedLoadBalancer[0]); 
            } else { 
               def.weightedLoadBalancer = CamelDefinitionYamlStep.readWeightedLoadBalancerDefinition(element.weightedLoadBalancer); 
            } 
        } 
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
        if (element?.randomLoadBalancer !== undefined) { 
            if (Array.isArray(element.randomLoadBalancer)) { 
               def.randomLoadBalancer = CamelDefinitionYamlStep.readRandomLoadBalancerDefinition(element.randomLoadBalancer[0]); 
            } else { 
               def.randomLoadBalancer = CamelDefinitionYamlStep.readRandomLoadBalancerDefinition(element.randomLoadBalancer); 
            } 
        } 

        return def;
    }

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

        return def;
    }

    static readLoopDefinition = (element: any): LoopDefinition => {
        
        let 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 => {
        
        let 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?.parquetAvro !== undefined) { 
            if (Array.isArray(element.parquetAvro)) { 
               def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro[0]); 
            } else { 
               def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro); 
            } 
        } 
        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?.beanio !== undefined) { 
            if (Array.isArray(element.beanio)) { 
               def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio[0]); 
            } else { 
               def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio); 
            } 
        } 
        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?.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?.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 => {
        
        let def = element ? new MulticastDefinition({...element}) : new MulticastDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

    static readOnCompletionDefinition = (element: any): OnCompletionDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let def = element ? new OnFallbackDefinition({...element}) : new OnFallbackDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readPollDefinition = (element: any): PollDefinition => {
        if (element && typeof element === 'string') element = {uri: element};
        let def = element ? new PollDefinition({...element}) : new PollDefinition();
        def = ComponentApi.parseElementUri(def);

        return def;
    }

    static readPollEnrichDefinition = (element: any): PollEnrichDefinition => {
        
        let 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 => {
        
        let def = element ? new ProcessDefinition({...element}) : new ProcessDefinition();

        return def;
    }

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

        return def;
    }

    static readPropertyExpressionDefinition = (element: any): PropertyExpressionDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let def = element ? new RedeliveryPolicyDefinition({...element}) : new RedeliveryPolicyDefinition();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readRemoveVariableDefinition = (element: any): RemoveVariableDefinition => {
        if (element && typeof element === 'string') element = {name: element};
        let def = element ? new RemoveVariableDefinition({...element}) : new RemoveVariableDefinition();

        return def;
    }

    static readResequenceDefinition = (element: any): ResequenceDefinition => {
        
        let 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 => {
        
        let def = element ? new Resilience4jConfigurationDefinition({...element}) : new Resilience4jConfigurationDefinition();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readRouteConfigurationDefinition = (element: any): RouteConfigurationDefinition => {
        
        let def = element ? new RouteConfigurationDefinition({...element}) : new RouteConfigurationDefinition();
        def.onCompletion = element && element?.onCompletion ? element?.onCompletion.map((x:any) => CamelDefinitionYamlStep.readOnCompletionDefinition(x.onCompletion)) :[]; 
        def.interceptSendToEndpoint = element && element?.interceptSendToEndpoint ? element?.interceptSendToEndpoint.map((x:any) => CamelDefinitionYamlStep.readInterceptSendToEndpointDefinition(x.interceptSendToEndpoint)) :[]; 
        def.intercept = element && element?.intercept ? element?.intercept.map((x:any) => CamelDefinitionYamlStep.readInterceptDefinition(x.intercept)) :[]; 
        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.onException)) :[]; 
        def.interceptFrom = element && element?.interceptFrom ? element?.interceptFrom.map((x:any) => CamelDefinitionYamlStep.readInterceptFromDefinition(x.interceptFrom)) :[]; 

        return def;
    }

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

        return def;
    }

    static readRouteDefinition = (element: any): RouteDefinition => {
        
        let def = element ? new RouteDefinition({...element}) : new RouteDefinition();
        if (element?.outputType !== undefined) { 
            if (Array.isArray(element.outputType)) { 
               def.outputType = CamelDefinitionYamlStep.readOutputTypeDefinition(element.outputType[0]); 
            } else { 
               def.outputType = CamelDefinitionYamlStep.readOutputTypeDefinition(element.outputType); 
            } 
        } 
        if (element?.errorHandler !== undefined) { 
            if (Array.isArray(element.errorHandler)) { 
               def.errorHandler = CamelDefinitionYamlStep.readErrorHandlerDefinition(element.errorHandler[0]); 
            } else { 
               def.errorHandler = CamelDefinitionYamlStep.readErrorHandlerDefinition(element.errorHandler); 
            } 
        } 
        if (element?.inputType !== undefined) { 
            if (Array.isArray(element.inputType)) { 
               def.inputType = CamelDefinitionYamlStep.readInputTypeDefinition(element.inputType[0]); 
            } else { 
               def.inputType = CamelDefinitionYamlStep.readInputTypeDefinition(element.inputType); 
            } 
        } 
        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 readRouteTemplateDefinition = (element: any): RouteTemplateDefinition => {
        
        let 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.readBeanFactoryDefinition(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 => {
        
        let def = element ? new RouteTemplateParameterDefinition({...element}) : new RouteTemplateParameterDefinition();

        return def;
    }

    static readRoutingSlipDefinition = (element: any): RoutingSlipDefinition => {
        
        let 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};
        let def = element ? new SagaActionUriDefinition({...element}) : new SagaActionUriDefinition();
        def = ComponentApi.parseElementUri(def);

        return def;
    }

    static readSagaDefinition = (element: any): SagaDefinition => {
        
        let 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 => {
        
        let def = element ? new SamplingDefinition({...element}) : new SamplingDefinition();

        return def;
    }

    static readScriptDefinition = (element: any): ScriptDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let def = element ? new SetExchangePatternDefinition({...element}) : new SetExchangePatternDefinition();

        return def;
    }

    static readSetHeaderDefinition = (element: any): SetHeaderDefinition => {
        
        let 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 readSetHeadersDefinition = (element: any): SetHeadersDefinition => {
        
        let def = element ? new SetHeadersDefinition({...element}) : new SetHeadersDefinition();
        def.headers = element && element?.headers ? element?.headers.map((x:any) => CamelDefinitionYamlStep.readSetHeaderDefinition(x)) :[]; 

        return def;
    }

    static readSetPropertyDefinition = (element: any): SetPropertyDefinition => {
        
        let 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 readSetVariableDefinition = (element: any): SetVariableDefinition => {
        
        let def = element ? new SetVariableDefinition({...element}) : new SetVariableDefinition();
        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 readSetVariablesDefinition = (element: any): SetVariablesDefinition => {
        
        let def = element ? new SetVariablesDefinition({...element}) : new SetVariablesDefinition();
        def.variables = element && element?.variables ? element?.variables.map((x:any) => CamelDefinitionYamlStep.readSetVariableDefinition(x)) :[]; 

        return def;
    }

    static readSortDefinition = (element: any): SortDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let def = element ? new StepDefinition({...element}) : new StepDefinition();
        def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readThrottleDefinition = (element: any): ThrottleDefinition => {
        
        let 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 => {
        
        let def = element ? new ThrowExceptionDefinition({...element}) : new ThrowExceptionDefinition();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readTransformDefinition = (element: any): TransformDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let 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?.parquetAvro !== undefined) { 
            if (Array.isArray(element.parquetAvro)) { 
               def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro[0]); 
            } else { 
               def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro); 
            } 
        } 
        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?.beanio !== undefined) { 
            if (Array.isArray(element.beanio)) { 
               def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio[0]); 
            } else { 
               def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio); 
            } 
        } 
        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?.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?.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 => {
        
        let 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 => {
        
        let def = element ? new ValueDefinition({...element}) : new ValueDefinition();

        return def;
    }

    static readWhenDefinition = (element: any): WhenDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let def = element ? new WireTapDefinition({...element}) : new WireTapDefinition();
        def = ComponentApi.parseElementUri(def);

        return def;
    }

    static readBeanConstructorDefinition = (element: any): BeanConstructorDefinition => {
        
        let def = element ? new BeanConstructorDefinition({...element}) : new BeanConstructorDefinition();

        return def;
    }

    static readBeanConstructorsDefinition = (element: any): BeanConstructorsDefinition => {
        
        let def = element ? new BeanConstructorsDefinition({...element}) : new BeanConstructorsDefinition();
        def.constructor = element && element?.constructor ? element?.constructor.map((x:any) => CamelDefinitionYamlStep.readBeanConstructorDefinition(x)) :[]; 

        return def;
    }

    static readBeanPropertiesDefinition = (element: any): BeanPropertiesDefinition => {
        
        let def = element ? new BeanPropertiesDefinition({...element}) : new BeanPropertiesDefinition();
        def.property = element && element?.property ? element?.property.map((x:any) => CamelDefinitionYamlStep.readBeanPropertyDefinition(x)) :[]; 

        return def;
    }

    static readBeanPropertyDefinition = (element: any): BeanPropertyDefinition => {
        
        let def = element ? new BeanPropertyDefinition({...element}) : new BeanPropertyDefinition();
        if (element?.properties !== undefined) { 
            if (Array.isArray(element.properties)) { 
               def.properties = CamelDefinitionYamlStep.readBeanPropertiesDefinition(element.properties[0]); 
            } else { 
               def.properties = CamelDefinitionYamlStep.readBeanPropertiesDefinition(element.properties); 
            } 
        } 

        return def;
    }

    static readComponentScanDefinition = (element: any): ComponentScanDefinition => {
        
        let def = element ? new ComponentScanDefinition({...element}) : new ComponentScanDefinition();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readBeanioDataFormat = (element: any): BeanioDataFormat => {
        
        let def = element ? new BeanioDataFormat({...element}) : new BeanioDataFormat();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readDataFormatsDefinition = (element: any): DataFormatsDefinition => {
        
        let 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?.parquetAvro !== undefined) { 
            if (Array.isArray(element.parquetAvro)) { 
               def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro[0]); 
            } else { 
               def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro); 
            } 
        } 
        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?.beanio !== undefined) { 
            if (Array.isArray(element.beanio)) { 
               def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio[0]); 
            } else { 
               def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio); 
            } 
        } 
        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?.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?.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 => {
        
        let def = element ? new FhirJsonDataFormat({...element}) : new FhirJsonDataFormat();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readParquetAvroDataFormat = (element: any): ParquetAvroDataFormat => {
        
        let def = element ? new ParquetAvroDataFormat({...element}) : new ParquetAvroDataFormat();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readUniVocityCsvDataFormat = (element: any): UniVocityCsvDataFormat => {
        
        let 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 => {
        
        let 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 => {
        
        let def = element ? new UniVocityHeader({...element}) : new UniVocityHeader();

        return def;
    }

    static readUniVocityTsvDataFormat = (element: any): UniVocityTsvDataFormat => {
        
        let 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 => {
        
        let def = element ? new XMLSecurityDataFormat({...element}) : new XMLSecurityDataFormat();

        return def;
    }

    static readYAMLDataFormat = (element: any): YAMLDataFormat => {
        
        let 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 => {
        
        let def = element ? new YAMLTypeFilterDefinition({...element}) : new YAMLTypeFilterDefinition();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readDeadLetterChannelDefinition = (element: any): DeadLetterChannelDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let 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 => {
        
        let def = element ? new NoErrorHandlerDefinition({...element}) : new NoErrorHandlerDefinition();

        return def;
    }

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

        return def;
    }

    static readSpringTransactionErrorHandlerDefinition = (element: any): SpringTransactionErrorHandlerDefinition => {
        
        let 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};
        let def = element ? new CSimpleExpression({...element}) : new CSimpleExpression();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readExpressionDefinition = (element: any): ExpressionDefinition => {
        
        let def = element ? new ExpressionDefinition({...element}) : new ExpressionDefinition();
        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?.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?.tokenize !== undefined) { 
            if (Array.isArray(element.tokenize)) { 
               def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize[0]); 
            } else { 
               def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize); 
            } 
        } 
        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?.java !== undefined) { 
            if (Array.isArray(element.java)) { 
               def.java = CamelDefinitionYamlStep.readJavaExpression(element.java[0]); 
            } else { 
               def.java = CamelDefinitionYamlStep.readJavaExpression(element.java); 
            } 
        } 
        if (element?.wasm !== undefined) { 
            if (Array.isArray(element.wasm)) { 
               def.wasm = CamelDefinitionYamlStep.readWasmExpression(element.wasm[0]); 
            } else { 
               def.wasm = CamelDefinitionYamlStep.readWasmExpression(element.wasm); 
            } 
        } 
        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?.jsonpath !== undefined) { 
            if (Array.isArray(element.jsonpath)) { 
               def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath[0]); 
            } else { 
               def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath); 
            } 
        } 
        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?.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?.hl7terser !== undefined) { 
            if (Array.isArray(element.hl7terser)) { 
               def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser[0]); 
            } else { 
               def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser); 
            } 
        } 
        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?.groovy !== undefined) { 
            if (Array.isArray(element.groovy)) { 
               def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy[0]); 
            } else { 
               def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy); 
            } 
        } 
        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?.variable !== undefined) { 
            if (Array.isArray(element.variable)) { 
               def.variable = CamelDefinitionYamlStep.readVariableExpression(element.variable[0]); 
            } else { 
               def.variable = CamelDefinitionYamlStep.readVariableExpression(element.variable); 
            } 
        } 
        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?.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};
        let def = element ? new GroovyExpression({...element}) : new GroovyExpression();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readJavaExpression = (element: any): JavaExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        let def = element ? new JavaExpression({...element}) : new JavaExpression();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readVariableExpression = (element: any): VariableExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        let def = element ? new VariableExpression({...element}) : new VariableExpression();

        return def;
    }

    static readWasmExpression = (element: any): WasmExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        let def = element ? new WasmExpression({...element}) : new WasmExpression();

        return def;
    }

    static readXMLTokenizerExpression = (element: any): XMLTokenizerExpression => {
        if (element && typeof element === 'string') element = {expression: element};
        let 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};
        let 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};
        let 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};
        let def = element ? new CustomLoadBalancerDefinition({...element}) : new CustomLoadBalancerDefinition();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readStickyLoadBalancerDefinition = (element: any): StickyLoadBalancerDefinition => {
        
        let 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 => {
        
        let def = element ? new TopicLoadBalancerDefinition({...element}) : new TopicLoadBalancerDefinition();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readDeleteDefinition = (element: any): DeleteDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let 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 => {
        
        let def = element ? new MutualTLSDefinition({...element}) : new MutualTLSDefinition();

        return def;
    }

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

        return def;
    }

    static readOpenApiDefinition = (element: any): OpenApiDefinition => {
        
        let def = element ? new OpenApiDefinition({...element}) : new OpenApiDefinition();

        return def;
    }

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

        return def;
    }

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

        return def;
    }

    static readPatchDefinition = (element: any): PatchDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let 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 => {
        
        let def = element ? new ResponseHeaderDefinition({...element}) : new ResponseHeaderDefinition();

        return def;
    }

    static readResponseMessageDefinition = (element: any): ResponseMessageDefinition => {
        
        let 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 => {
        
        let def = element ? new RestBindingDefinition({...element}) : new RestBindingDefinition();

        return def;
    }

    static readRestConfigurationDefinition = (element: any): RestConfigurationDefinition => {
        
        let 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.endpointProperty = element && element?.endpointProperty ? element?.endpointProperty.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[]; 
        def.apiProperty = element && element?.apiProperty ? element?.apiProperty.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 => {
        
        let 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)) :[]; 
        if (element?.openApi !== undefined) { 
            if (Array.isArray(element.openApi)) { 
               def.openApi = CamelDefinitionYamlStep.readOpenApiDefinition(element.openApi[0]); 
            } else { 
               def.openApi = CamelDefinitionYamlStep.readOpenApiDefinition(element.openApi); 
            } 
        } 
        def.post = element && element?.post ? element?.post.map((x:any) => CamelDefinitionYamlStep.readPostDefinition(x)) :[]; 
        def.securityRequirements = element && element?.securityRequirements ? element?.securityRequirements.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[]; 
        def.get = element && element?.get ? element?.get.map((x:any) => CamelDefinitionYamlStep.readGetDefinition(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.delete = element && element?.delete ? element?.delete.map((x:any) => CamelDefinitionYamlStep.readDeleteDefinition(x)) :[]; 
        def.put = element && element?.put ? element?.put.map((x:any) => CamelDefinitionYamlStep.readPutDefinition(x)) :[]; 

        return def;
    }

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

        return def;
    }

    static readRestSecuritiesDefinition = (element: any): RestSecuritiesDefinition => {
        
        let 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 => {
        
        let 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 => {
        
        let def = element ? new SecurityDefinition({...element}) : new SecurityDefinition();

        return def;
    }

    static readLangChain4jTokenizerDefinition = (element: any): LangChain4jTokenizerDefinition => {
        
        let def = element ? new LangChain4jTokenizerDefinition({...element}) : new LangChain4jTokenizerDefinition();

        return def;
    }

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

        return def;
    }

    static readDataFormatTransformerDefinition = (element: any): DataFormatTransformerDefinition => {
        
        let 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?.parquetAvro !== undefined) { 
            if (Array.isArray(element.parquetAvro)) { 
               def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro[0]); 
            } else { 
               def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro); 
            } 
        } 
        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?.beanio !== undefined) { 
            if (Array.isArray(element.beanio)) { 
               def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio[0]); 
            } else { 
               def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio); 
            } 
        } 
        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?.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?.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 => {
        
        let def = element ? new EndpointTransformerDefinition({...element}) : new EndpointTransformerDefinition();
        def = ComponentApi.parseElementUri(def);

        return def;
    }

    static readLoadTransformerDefinition = (element: any): LoadTransformerDefinition => {
        
        let def = element ? new LoadTransformerDefinition({...element}) : new LoadTransformerDefinition();

        return def;
    }

    static readTransformersDefinition = (element: any): TransformersDefinition => {
        
        let 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?.loadTransformer !== undefined) { 
            if (Array.isArray(element.loadTransformer)) { 
               def.loadTransformer = CamelDefinitionYamlStep.readLoadTransformerDefinition(element.loadTransformer[0]); 
            } else { 
               def.loadTransformer = CamelDefinitionYamlStep.readLoadTransformerDefinition(element.loadTransformer); 
            } 
        } 
        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 => {
        
        let def = element ? new CustomValidatorDefinition({...element}) : new CustomValidatorDefinition();

        return def;
    }

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

        return def;
    }

    static readPredicateValidatorDefinition = (element: any): PredicateValidatorDefinition => {
        
        let 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 => {
        
        let 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 'aggregate': return CamelDefinitionYamlStep.readAggregateDefinition(newBody);
            case 'bean': return CamelDefinitionYamlStep.readBeanDefinition(newBody);
            case 'doCatch': return CamelDefinitionYamlStep.readCatchDefinition(newBody);
            case 'choice': return CamelDefinitionYamlStep.readChoiceDefinition(newBody);
            case 'circuitBreaker': return CamelDefinitionYamlStep.readCircuitBreakerDefinition(newBody);
            case 'claimCheck': return CamelDefinitionYamlStep.readClaimCheckDefinition(newBody);
            case 'convertBodyTo': return CamelDefinitionYamlStep.readConvertBodyDefinition(newBody);
            case 'convertHeaderTo': return CamelDefinitionYamlStep.readConvertHeaderDefinition(newBody);
            case 'convertVariableTo': return CamelDefinitionYamlStep.readConvertVariableDefinition(newBody);
            case 'delay': return CamelDefinitionYamlStep.readDelayDefinition(newBody);
            case 'dynamicRouter': return CamelDefinitionYamlStep.readDynamicRouterDefinition(newBody);
            case 'enrich': return CamelDefinitionYamlStep.readEnrichDefinition(newBody);
            case 'filter': return CamelDefinitionYamlStep.readFilterDefinition(newBody);
            case 'doFinally': return CamelDefinitionYamlStep.readFinallyDefinition(newBody);
            case 'idempotentConsumer': return CamelDefinitionYamlStep.readIdempotentConsumerDefinition(newBody);
            case 'kamelet': return CamelDefinitionYamlStep.readKameletDefinition(newBody);
            case 'loadBalance': return CamelDefinitionYamlStep.readLoadBalanceDefinition(newBody);
            case 'log': return CamelDefinitionYamlStep.readLogDefinition(newBody);
            case 'loop': return CamelDefinitionYamlStep.readLoopDefinition(newBody);
            case 'marshal': return CamelDefinitionYamlStep.readMarshalDefinition(newBody);
            case 'multicast': return CamelDefinitionYamlStep.readMulticastDefinition(newBody);
            case 'onFallback': return CamelDefinitionYamlStep.readOnFallbackDefinition(newBody);
            case 'otherwise': return CamelDefinitionYamlStep.readOtherwiseDefinition(newBody);
            case 'pausable': return CamelDefinitionYamlStep.readPausableDefinition(newBody);
            case 'pipeline': return CamelDefinitionYamlStep.readPipelineDefinition(newBody);
            case 'policy': return CamelDefinitionYamlStep.readPolicyDefinition(newBody);
            case 'poll': return CamelDefinitionYamlStep.readPollDefinition(newBody);
            case 'pollEnrich': return CamelDefinitionYamlStep.readPollEnrichDefinition(newBody);
            case 'process': return CamelDefinitionYamlStep.readProcessDefinition(newBody);
            case 'recipientList': return CamelDefinitionYamlStep.readRecipientListDefinition(newBody);
            case 'removeHeader': return CamelDefinitionYamlStep.readRemoveHeaderDefinition(newBody);
            case 'removeHeaders': return CamelDefinitionYamlStep.readRemoveHeadersDefinition(newBody);
            case 'removeProperties': return CamelDefinitionYamlStep.readRemovePropertiesDefinition(newBody);
            case 'removeProperty': return CamelDefinitionYamlStep.readRemovePropertyDefinition(newBody);
            case 'removeVariable': return CamelDefinitionYamlStep.readRemoveVariableDefinition(newBody);
            case 'resequence': return CamelDefinitionYamlStep.readResequenceDefinition(newBody);
            case 'resumable': return CamelDefinitionYamlStep.readResumableDefinition(newBody);
            case 'rollback': return CamelDefinitionYamlStep.readRollbackDefinition(newBody);
            case 'routingSlip': return CamelDefinitionYamlStep.readRoutingSlipDefinition(newBody);
            case 'saga': return CamelDefinitionYamlStep.readSagaDefinition(newBody);
            case 'sample': return CamelDefinitionYamlStep.readSamplingDefinition(newBody);
            case 'script': return CamelDefinitionYamlStep.readScriptDefinition(newBody);
            case 'setBody': return CamelDefinitionYamlStep.readSetBodyDefinition(newBody);
            case 'setExchangePattern': return CamelDefinitionYamlStep.readSetExchangePatternDefinition(newBody);
            case 'setHeader': return CamelDefinitionYamlStep.readSetHeaderDefinition(newBody);
            case 'setHeaders': return CamelDefinitionYamlStep.readSetHeadersDefinition(newBody);
            case 'setProperty': return CamelDefinitionYamlStep.readSetPropertyDefinition(newBody);
            case 'setVariable': return CamelDefinitionYamlStep.readSetVariableDefinition(newBody);
            case 'setVariables': return CamelDefinitionYamlStep.readSetVariablesDefinition(newBody);
            case 'sort': return CamelDefinitionYamlStep.readSortDefinition(newBody);
            case 'split': return CamelDefinitionYamlStep.readSplitDefinition(newBody);
            case 'step': return CamelDefinitionYamlStep.readStepDefinition(newBody);
            case 'stop': return CamelDefinitionYamlStep.readStopDefinition(newBody);
            case 'threads': return CamelDefinitionYamlStep.readThreadsDefinition(newBody);
            case 'throttle': return CamelDefinitionYamlStep.readThrottleDefinition(newBody);
            case 'throwException': return CamelDefinitionYamlStep.readThrowExceptionDefinition(newBody);
            case 'to': return CamelDefinitionYamlStep.readToDefinition(newBody);
            case 'toD': return CamelDefinitionYamlStep.readToDynamicDefinition(newBody);
            case 'transacted': return CamelDefinitionYamlStep.readTransactedDefinition(newBody);
            case 'transform': return CamelDefinitionYamlStep.readTransformDefinition(newBody);
            case 'doTry': return CamelDefinitionYamlStep.readTryDefinition(newBody);
            case 'unmarshal': return CamelDefinitionYamlStep.readUnmarshalDefinition(newBody);
            case 'validate': return CamelDefinitionYamlStep.readValidateDefinition(newBody);
            case 'when': return CamelDefinitionYamlStep.readWhenDefinition(newBody);
            case 'whenSkipSendToEndpoint': return CamelDefinitionYamlStep.readWhenSkipSendToEndpointDefinition(newBody);
            case 'wireTap': return CamelDefinitionYamlStep.readWireTapDefinition(newBody);
            case 'langChain4j': return CamelDefinitionYamlStep.readLangChain4jTokenizerDefinition(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
    }
}
