package io.delphiplatform.api.v3.model.mapper.streamsinfo;

import com.sonymusic.delphi.etl.apps.proto.Apple;

import org.openapitools.jackson.nullable.JsonNullable;

import fr.xebia.extras.selma.Selma;
import io.delphiplatform.api.v3.model.apple.AppleContainerSubType;
import io.delphiplatform.api.v3.model.apple.AppleContainerType;
import io.delphiplatform.api.v3.model.apple.AppleDeviceType;
import io.delphiplatform.api.v3.model.apple.AppleListenerEngagement;
import io.delphiplatform.api.v3.model.apple.AppleOs;
import io.delphiplatform.api.v3.model.apple.AppleSource;
import io.delphiplatform.api.v3.model.apple.AppleUserType;

public class AppleMappings {

    private final AppleStreamsInfoMapper infoMapper = Selma.builder(AppleStreamsInfoMapper.class).build();

    public JsonNullable<AppleSource> toDto(Apple.AppleMusicAggregation.Source o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

    public JsonNullable<AppleContainerType> toDto(Apple.AppleMusicAggregation.ContainerType o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

    public JsonNullable<AppleContainerSubType> toDto(Apple.AppleMusicAggregation.ContainerSubType o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

    public JsonNullable<AppleDeviceType> toDto(Apple.AppleMusicAggregation.DeviceType o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

    public JsonNullable<AppleOs> toDto(Apple.AppleMusicAggregation.Os o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

    public JsonNullable<AppleUserType> toDto(Apple.AppleMusicAggregation.UserType o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

    public JsonNullable<AppleListenerEngagement> toDto(Apple.AppleMusicAggregation.ListenerEngagement o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

}
