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

io.imunity.rest.mappers.idp.statistic.SigInStatisticMapper Maven / Gradle / Ivy

There is a newer version: 4.0.4
Show newest version
/*
 * Copyright (c) 2021 Bixbit - Krzysztof Benedyczak. All rights reserved.
 * See LICENCE.txt file for licensing information.
 */

package io.imunity.rest.mappers.idp.statistic;

import io.imunity.rest.api.types.idp.statistic.RestSigInStatistic;
import pl.edu.icm.unity.engine.api.idp.statistic.GroupedIdpStatistic.SigInStatistic;

public class SigInStatisticMapper
{
	static RestSigInStatistic map(SigInStatistic sigInStatistic)
	{
		return RestSigInStatistic.builder()
				.withFailedCount(sigInStatistic.failedCount)
				.withSuccessfullCount(sigInStatistic.successfullCount)
				.withTotatCount(sigInStatistic.totatCount)
				.withPeriodStart(sigInStatistic.periodStart)
				.withPeriodEnd(sigInStatistic.periodEnd)
				.build();
	}

	static SigInStatistic map(RestSigInStatistic sigInStatistic)
	{
		return new SigInStatistic(sigInStatistic.periodStart, sigInStatistic.periodEnd, sigInStatistic.totatCount,
				sigInStatistic.successfullCount, sigInStatistic.failedCount);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy