//import java.util.List;

import {DocumentReaderAuthenticityResult} from './DocumentReaderAuthenticityResult';

export class DocumentReaderAuthenticityCheckResult {
    constructor(){
        this.type = null;//int
        this.result = null;//int
        this.list = [];//List<DocumentReaderAuthenticityResult>
    }
/*
    getTypeName() {
        if (this.type == 1) {
            return "UV dull paper check";
        } else if (this.type == 4) {
            return "Image patterns";
        } else {
            return this.type == 128 ? "IPI (invisible personal information)" : String.valueOf(this.type);
        }
    }
*/
    static fromJson(jsonObject) {
        if (jsonObject != null) {
            var result = new DocumentReaderAuthenticityCheckResult();
            result.result = jsonObject["result"];
            result.type = jsonObject["type"];
            for(var i in jsonObject["list"]){
                list.push(DocumentReaderAuthenticityResult.fromJson(jsonObject["list"][i]));
            }
            return result;
        }

        return null;
    }
}
