All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yoti.api.client.docs.session.retrieve.ResourceResponse Maven / Gradle / Ivy

The newest version!
package com.yoti.api.client.docs.session.retrieve;

import java.util.ArrayList;
import java.util.List;

import com.yoti.api.client.docs.session.retrieve.configuration.capture.source.AllowedSourceResponse;

import com.fasterxml.jackson.annotation.JsonProperty;

public abstract class ResourceResponse {

    @JsonProperty("id")
    private String id;

    @JsonProperty("tasks")
    private List tasks;

    @JsonProperty("source")
    private AllowedSourceResponse source;

    public String getId() {
        return id;
    }

    public List getTasks() {
        return tasks;
    }

    public AllowedSourceResponse getSource() {
        return source;
    }

    protected  List filterTasksByType(Class clazz) {
        List filteredList = new ArrayList<>();
        for (TaskResponse taskResponse : tasks) {
            if (clazz.isInstance(taskResponse)) {
                filteredList.add(clazz.cast(taskResponse));
            }
        }
        return filteredList;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy