package com.example.sleep;

import java.util.List;

public class DreamBean //定义一个JavaBean类DreamBean，用于存储梦境解析API返回的JSON数据。
{
    private int code;
    private String msg;
    private Result result;//私有变量Result，用于存储具体的梦境解析结果

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Result getResult()//返回梦境结果，我们可以通过调用DreamBean对象的getResult()方法获取到Result对象
    {
        return result;
    }

    public void setResult(Result result) {
        this.result = result;
    }

    public static class Result {
        private List<Dream> list;//定义梦境列表

        public List<Dream> getList() {
            return list;
        }//获取梦境列表

        public void setList(List<Dream> list) {
            this.list = list;
        }//设置List属性的值
    }

    public static class Dream {
        private int id;
        private String type;
        private String title;
        private String result;

        public int getId() {
            return id;
        }//获取id的值
        public void setId(int id) {
            this.id = id;
        }//设置id的值

        public String getType() {
            return type;
        }//获取type

        public void setType(String type) {
            this.type = type;
        }//设置type

        public String getTitle() {
            return title;
        }//获取title

        public void setTitle(String title) {
            this.title = title;
        }//设置title

        public String getResult() {
            return result;
        }//获取result

        public void setResult(String result) {
            this.result = result;
        }
    }
}