package com.qsoft.rs.sincoar.dominio.mapper;

import com.qsoft.rs.sincoar.dto.TgenemessagestructureDTO;
import com.qsoft.rs.sincoar.model.Tgenemessagestructure;
import java.math.BigInteger;
import javax.annotation.processing.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2022-09-02T16:14:49-0500",
    comments = "version: 1.5.2.Final, compiler: javac, environment: Java 17.0.4 (Private Build)"
)
public class TgenemessagestructureMapperImpl implements TgenemessagestructureMapper {

    @Override
    public Tgenemessagestructure getEntidad(TgenemessagestructureDTO tgenemessagestructure) {
        if ( tgenemessagestructure == null ) {
            return null;
        }

        Tgenemessagestructure tgenemessagestructure1 = new Tgenemessagestructure();

        tgenemessagestructure1.setStructurecode( tgenemessagestructure.getStructurecode() );
        if ( tgenemessagestructure.getRecordversion() != null ) {
            tgenemessagestructure1.setRecordversion( BigInteger.valueOf( tgenemessagestructure.getRecordversion() ) );
        }
        tgenemessagestructure1.setDescription( tgenemessagestructure.getDescription() );
        tgenemessagestructure1.setHaveheader( tgenemessagestructure.getHaveheader() );
        tgenemessagestructure1.setHeaderlength( tgenemessagestructure.getHeaderlength() );
        tgenemessagestructure1.setHeaderseparator( tgenemessagestructure.getHeaderseparator() );
        tgenemessagestructure1.setEnddatacharacter( tgenemessagestructure.getEnddatacharacter() );
        tgenemessagestructure1.setRecordlength( tgenemessagestructure.getRecordlength() );
        tgenemessagestructure1.setRecordseparator( tgenemessagestructure.getRecordseparator() );
        tgenemessagestructure1.setFormatdate( tgenemessagestructure.getFormatdate() );
        tgenemessagestructure1.setFormattime( tgenemessagestructure.getFormattime() );
        tgenemessagestructure1.setHeaderclass( tgenemessagestructure.getHeaderclass() );
        tgenemessagestructure1.setDetailclass( tgenemessagestructure.getDetailclass() );

        return tgenemessagestructure1;
    }

    @Override
    public TgenemessagestructureDTO getDto(Tgenemessagestructure tgenemessagestructure) {
        if ( tgenemessagestructure == null ) {
            return null;
        }

        TgenemessagestructureDTO tgenemessagestructureDTO = new TgenemessagestructureDTO();

        tgenemessagestructureDTO.setStructurecode( tgenemessagestructure.getStructurecode() );
        if ( tgenemessagestructure.getRecordversion() != null ) {
            tgenemessagestructureDTO.setRecordversion( tgenemessagestructure.getRecordversion().intValue() );
        }
        tgenemessagestructureDTO.setDescription( tgenemessagestructure.getDescription() );
        tgenemessagestructureDTO.setHaveheader( tgenemessagestructure.getHaveheader() );
        tgenemessagestructureDTO.setHeaderlength( tgenemessagestructure.getHeaderlength() );
        tgenemessagestructureDTO.setHeaderseparator( tgenemessagestructure.getHeaderseparator() );
        tgenemessagestructureDTO.setEnddatacharacter( tgenemessagestructure.getEnddatacharacter() );
        tgenemessagestructureDTO.setRecordlength( tgenemessagestructure.getRecordlength() );
        tgenemessagestructureDTO.setRecordseparator( tgenemessagestructure.getRecordseparator() );
        tgenemessagestructureDTO.setFormatdate( tgenemessagestructure.getFormatdate() );
        tgenemessagestructureDTO.setFormattime( tgenemessagestructure.getFormattime() );
        tgenemessagestructureDTO.setHeaderclass( tgenemessagestructure.getHeaderclass() );
        tgenemessagestructureDTO.setDetailclass( tgenemessagestructure.getDetailclass() );

        return tgenemessagestructureDTO;
    }
}
