package zeenea.connector.bluetelligence.client.mapper;

import java.util.List;
import javax.annotation.processing.Generated;
import zeenea.connector.bluetelligence.client.BuildupNode;
import zeenea.connector.bluetelligence.client.Description;
import zeenea.connector.bluetelligence.client.xml.BuildupNodeXmlFile;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2025-10-02T11:42:42+0000",
    comments = "version: 1.6.3, compiler: IncrementalProcessingEnvironment from gradle-language-java-8.13.jar, environment: Java 11.0.28 (Eclipse Adoptium)"
)
public class BuildupMapperImpl implements BuildupMapper {

    @Override
    public BuildupNode mapToBuildupNode(BuildupNodeXmlFile buildupNodeXmlFile) {
        if ( buildupNodeXmlFile == null ) {
            return null;
        }

        String associatedObject = null;
        String dataType = null;
        String id = null;
        Long length = null;
        String sapRuleID = null;
        String semantics = null;
        String technicalName = null;
        String type = null;
        String uid = null;
        BuildupNode.Variable variable = null;

        associatedObject = buildupNodeXmlFile.getAssociatedObject();
        dataType = buildupNodeXmlFile.getDataType();
        id = buildupNodeXmlFile.getId();
        length = buildupNodeXmlFile.getLength();
        sapRuleID = buildupNodeXmlFile.getSapRuleID();
        semantics = buildupNodeXmlFile.getSemantics();
        technicalName = buildupNodeXmlFile.getTechnicalName();
        type = buildupNodeXmlFile.getType();
        uid = buildupNodeXmlFile.getUid();
        variable = variableToVariable( buildupNodeXmlFile.getVariable() );

        List<String> sourceFieldIds = null;
        List<String> targetFieldIds = null;
        List<Description> descriptions = null;

        BuildupNode buildupNode = new BuildupNode( associatedObject, dataType, id, length, sapRuleID, semantics, technicalName, type, uid, variable, sourceFieldIds, targetFieldIds, descriptions );

        return buildupNode;
    }

    protected BuildupNode.Variable variableToVariable(BuildupNodeXmlFile.Variable variable) {
        if ( variable == null ) {
            return null;
        }

        String variableId = null;
        String variableName = null;

        variableId = variable.getVariableId();
        variableName = variable.getVariableName();

        BuildupNode.Variable variable1 = new BuildupNode.Variable( variableId, variableName );

        return variable1;
    }
}
