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

import com.sonymusic.delphi.etl.apps.proto.Apple.AppleMusicAggregation.AppleAgeBands;
import com.sonymusic.delphi.etl.apps.proto.Spotify;
import com.sonymusic.delphi.etl.apps.proto.Youtube.YoutubeAgeBands;

import fr.xebia.extras.selma.Field;
import fr.xebia.extras.selma.IgnoreMissing;
import fr.xebia.extras.selma.Mapper;
import fr.xebia.extras.selma.Maps;
import io.delphiplatform.api.v3.model.AppleAgeBand;
import io.delphiplatform.api.v3.model.SpotifyAgeBand;
import io.delphiplatform.api.v3.model.video.YouTubeAgeBands;

@Mapper(withIgnoreMissing = IgnoreMissing.DESTINATION, withCustom = JsonNullableMappings.class)
public interface AgeBandsMapper {

    SpotifyAgeBand toStreamsAgeBands(Spotify.SpotifyAgeBand spotifyAgeBand);

    AppleAgeBand toStreamsAgeBands(AppleAgeBands appleAgeBands);

    @Maps(
        withCustomFields = {
            @Field({"other1317", "unknown1317"}),
            @Field({"other1824", "unknown1824"}),
            @Field({"other2534", "unknown2534"}),
            @Field({"other3544", "unknown3544"}),
            @Field({"other4554", "unknown4554"}),
            @Field({"other5564", "unknown5564"}),
            @Field({"other65Plus", "unknown65Plus"}),
        }
    )
    YouTubeAgeBands toAgeBands(YoutubeAgeBands source);

}
