001/*
002 * Syncany, www.syncany.org
003 * Copyright (C) 2011-2016 Philipp C. Heckel <philipp.heckel@gmail.com> 
004 *
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU General Public License as published by
007 * the Free Software Foundation, either version 3 of the License, or
008 * (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU General Public License for more details.
014 *
015 * You should have received a copy of the GNU General Public License
016 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
017 */
018package org.syncany.operations.update;
019
020import java.util.ArrayList;
021
022import org.simpleframework.xml.Element;
023import org.simpleframework.xml.ElementList;
024import org.simpleframework.xml.Root;
025
026/**
027 * This class represents the response from the Syncany API when checking 
028 * the newest application versions. The response object returns a list 
029 * of {@link AppInfo} objects, one for each distribution type and operating
030 * system.
031 * 
032 * <p>this class uses the Simple framework for XML serialization, and its corresponding
033 * annotation-based configuration.  
034 *  
035 * @see <a href="http://simple.sourceforge.net/">Simple framework</a>
036 * @see <a href="https://github.com/syncany/syncany-website">Syncany Website/API</a>
037 * @author Philipp C. Heckel (philipp.heckel@gmail.com)
038 */
039@Root(name = "appInfoResponse")
040public class AppInfoResponse {
041        @Element(name = "code", required = true)
042        private int code;
043
044        @Element(name = "message", required = true)
045        private String message;
046
047        @ElementList(name = "appInfoList", required = true)
048        private ArrayList<AppInfo> appInfoList;
049
050        public AppInfoResponse() {
051                // Required default constructor
052        }
053
054        public int getCode() {
055                return code;
056        }
057
058        public void setCode(int code) {
059                this.code = code;
060        }
061
062        public String getMessage() {
063                return message;
064        }
065
066        public void setMessage(String message) {
067                this.message = message;
068        }
069
070        public ArrayList<AppInfo> getAppInfoList() {
071                return appInfoList;
072        }
073
074        public void setAppInfoList(ArrayList<AppInfo> appInfoList) {
075                this.appInfoList = appInfoList;
076        }
077}