/*
* Copyright (C) 2008-2020, Juick
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package com.juick.www.api.activity.model;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.juick.www.api.activity.helpers.LinkValueDeserializer;
import com.juick.www.api.activity.model.activities.*;
import com.juick.www.api.activity.model.objects.*;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property="type")
@JsonSubTypes({
@JsonSubTypes.Type(value = Create.class, name = "Create"),
@JsonSubTypes.Type(value = Update.class, name = "Update"),
@JsonSubTypes.Type(value = Delete.class, name = "Delete"),
@JsonSubTypes.Type(value = Flag.class, name = "Flag"),
@JsonSubTypes.Type(value = Follow.class, name = "Follow"),
@JsonSubTypes.Type(value = Accept.class, name = "Accept"),
@JsonSubTypes.Type(value = Undo.class, name = "Undo"),
@JsonSubTypes.Type(value = Like.class, name = "Like"),
@JsonSubTypes.Type(value = Block.class, name = "Block"),
@JsonSubTypes.Type(value = Announce.class, name = "Announce"),
@JsonSubTypes.Type(value = Activity.class, name = "Activity"),
@JsonSubTypes.Type(value = Image.class, name = "Image"),
@JsonSubTypes.Type(value = Key.class, name = "Key"),
@JsonSubTypes.Type(value = Link.class, name = "Link"),
@JsonSubTypes.Type(value = Hashtag.class, name = "Hashtag"),
@JsonSubTypes.Type(value = Mention.class, name = "Mention"),
@JsonSubTypes.Type(value = Emoji.class, name = "Emoji"),
@JsonSubTypes.Type(value = Note.class, name = "Note"),
@JsonSubTypes.Type(value = OrderedCollection.class, name = "OrderedCollection"),
@JsonSubTypes.Type(value = OrderedCollectionPage.class, name = "OrderedCollectionPage"),
@JsonSubTypes.Type(value = Person.class, name = "Person"),
@JsonSubTypes.Type(value = Application.class, name = "Application")
})
public abstract class Context {
private List