package org.texttechnologylab.project.gruppe_05_1.domain.speech;

import java.util.List;
import java.util.Objects;
import java.util.StringJoiner;

public abstract class Speech {
    String      id;
    String      text;
    String      speakerId;
    Protocol    protocol;
    List<TextContent> textContents;
    Agenda      agenda;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getSpeakerId() {
        return speakerId;
    }

    public void setSpeakerId(String speakerId) {
        this.speakerId = speakerId;
    }

    public Protocol getProtocol() {
        return protocol;
    }

    public void setProtocol(Protocol protocol) {
        this.protocol = protocol;
    }

    public List<TextContent> getTextContents() {
        return textContents;
    }

    public void setTextContents(List<TextContent> textContents) {
        this.textContents = textContents;
    }

    public Agenda getAgenda() {
        return agenda;
    }

    public void setAgenda(Agenda agenda) {
        this.agenda = agenda;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Speech speech)) return false;
        return Objects.equals(id, speech.id) && Objects.equals(text, speech.text) && Objects.equals(speakerId, speech.speakerId) && Objects.equals(protocol, speech.protocol) && Objects.equals(textContents, speech.textContents) && Objects.equals(agenda, speech.agenda);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, text, speakerId, protocol, textContents, agenda);
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Speech.class.getSimpleName() + "[", "]")
                .add("id='" + id + "'")
                .add("text='" + text + "'")
                .add("speakerId='" + speakerId + "'")
                .add("protocol=" + protocol)
                .add("textContent=" + textContents)
                .add("agenda=" + agenda)
                .toString();
    }
}
