package com.orchard.models;

import java.util.List;
import org.apache.kafka.connect.data.Schema;
import org.apache.kafka.connect.data.SchemaBuilder;
import org.apache.kafka.connect.data.Struct;

public class GSSocialAccountIds implements OrchardModel {

    public List<String> spotify;

    public List<String> appleMusic;

    public static final Schema KafkaSchema = SchemaBuilder.struct().optional()
            .field("spotify",
                SchemaBuilder.array(Schema.OPTIONAL_STRING_SCHEMA).optional().build())
            .field("appleMusic",
                SchemaBuilder.array(Schema.OPTIONAL_STRING_SCHEMA).optional().build())
            .build();

    public Struct ToKafkaStruct() {
        return new Struct(KafkaSchema)
                .put("spotify", spotify)
                .put("appleMusic", appleMusic);
    }
}

