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

import com.sonymusic.delphi.etl.apps.proto.Apple.AppleMusicAggregation.AppleGenders;
import com.sonymusic.delphi.etl.apps.proto.Spotify.SpotifyGender;
import com.sonymusic.delphi.etl.apps.proto.Youtube.YoutubeGenders;

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.Gender;
import io.delphiplatform.api.v3.model.video.YouTubeGenders;

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

    @Maps(withCustomFields = {
        @Field({"other", "unknown"})
    })
    Gender toGender(SpotifyGender spotifyGender);

    @Maps(withIgnoreMissing = IgnoreMissing.ALL)
    Gender toGender(AppleGenders appleGenders);

    @Maps(withCustomFields = {
        @Field({"other", "unknown"})
    })
    YouTubeGenders toGender(YoutubeGenders genders);

}
