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

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

import org.openapitools.jackson.nullable.JsonNullable;

import fr.xebia.extras.selma.Selma;
import io.delphiplatform.api.v3.model.spotify.SpotifyDeviceType;
import io.delphiplatform.api.v3.model.spotify.SpotifyEngagement;
import io.delphiplatform.api.v3.model.spotify.SpotifyOperatingSystem;
import io.delphiplatform.api.v3.model.spotify.SpotifySaves;
import io.delphiplatform.api.v3.model.spotify.SpotifySource;

public class SpotifyMappings {

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

    public JsonNullable<SpotifySource> toDto(Spotify.SpotifySource o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

    public JsonNullable<SpotifyDeviceType> toDto(Spotify.SpotifyDeviceType o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

    public JsonNullable<SpotifyOperatingSystem> toDto(Spotify.SpotifyOperatingSystem o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

    public JsonNullable<SpotifyEngagement> toDto(Spotify.SpotifyEngagement o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

    public JsonNullable<SpotifySaves> toDto(Spotify.SpotifySaves o) {
        return JsonNullable.of(infoMapper.toDto(o));
    }

}
