All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arextest.web.model.mapper.YamlReplayConfigMapperImpl Maven / Gradle / Ivy

The newest version!
package com.arextest.web.model.mapper;

import com.arextest.web.model.contract.contracts.config.replay.ScheduleConfiguration;
import com.arextest.web.model.contract.contracts.config.yamlTemplate.entity.ReplayTemplateConfig;

/*
@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2024-12-23T06:09:22+0000",
    comments = "version: 1.5.5.Final, compiler: javac, environment: Java 21.0.5 (Eclipse Adoptium)"
)
*/
public class YamlReplayConfigMapperImpl implements YamlReplayConfigMapper {

    @Override
    public ReplayTemplateConfig toYaml(ScheduleConfiguration scheduleConfiguration) {
        if ( scheduleConfiguration == null ) {
            return null;
        }

        ReplayTemplateConfig replayTemplateConfig = new ReplayTemplateConfig();

        replayTemplateConfig.setExcludeOperationMap( toCollection( scheduleConfiguration.getExcludeOperationMap() ) );
        replayTemplateConfig.setOffsetDays( scheduleConfiguration.getOffsetDays() );
        replayTemplateConfig.setSendMaxQps( scheduleConfiguration.getSendMaxQps() );

        return replayTemplateConfig;
    }

    @Override
    public ScheduleConfiguration fromYaml(ReplayTemplateConfig replayTemplateConfig) {
        if ( replayTemplateConfig == null ) {
            return null;
        }

        ScheduleConfiguration scheduleConfiguration = new ScheduleConfiguration();

        scheduleConfiguration.setExcludeOperationMap( toSet( replayTemplateConfig.getExcludeOperationMap() ) );
        scheduleConfiguration.setOffsetDays( replayTemplateConfig.getOffsetDays() );
        scheduleConfiguration.setSendMaxQps( replayTemplateConfig.getSendMaxQps() );

        return scheduleConfiguration;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy