package com.phlx.wool.params;

import android.os.Parcel;
import android.os.Parcelable;


import com.phlx.wool.entity.TreatmentMethod;
import com.phlx.wool.entity.Variety;

import java.util.List;

/**
 * <pre>
 *     author : lei
 *     e-mail : 18600395998@163.com
 *     time   : 2020/04/13
 *     desc   : 基础信息解析数据bean
 *     version: 1.0
 * </pre>
 */
public class BasicParams implements Parcelable {

    //无害化处理方式
    private List<TreatmentMethod> innocuitymanagewayinfoList;
    //品种
    private List<Variety> ancestryinfoList;

    public List<TreatmentMethod> getInnocuitymanagewayinfoList() {
        return innocuitymanagewayinfoList;
    }

    public void setInnocuitymanagewayinfoList(List<TreatmentMethod> innocuitymanagewayinfoList) {
        this.innocuitymanagewayinfoList = innocuitymanagewayinfoList;
    }

    public List<Variety> getAncestryinfoList() {
        return ancestryinfoList;
    }

    public void setAncestryinfoList(List<Variety> ancestryinfoList) {
        this.ancestryinfoList = ancestryinfoList;
    }

    public static Creator<BasicParams> getCREATOR() {
        return CREATOR;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(this.innocuitymanagewayinfoList);
        dest.writeTypedList(this.ancestryinfoList);
    }

    public BasicParams() {
    }

    protected BasicParams(Parcel in) {
        this.innocuitymanagewayinfoList = in.createTypedArrayList(TreatmentMethod.CREATOR);
        this.ancestryinfoList = in.createTypedArrayList(Variety.CREATOR);
    }

    public static final Creator<BasicParams> CREATOR = new Creator<BasicParams>() {
        @Override
        public BasicParams createFromParcel(Parcel source) {
            return new BasicParams(source);
        }

        @Override
        public BasicParams[] newArray(int size) {
            return new BasicParams[size];
        }
    };

    @Override
    public String toString() {
        return "BasicEntity{" +
                "innocuitymanagewayinfoList=" + innocuitymanagewayinfoList +
                ", ancestryinfoList=" + ancestryinfoList +
                '}';
    }
}
