package com.hc.model.FJYD;

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

import java.util.List;

public class AuthResponse implements Parcelable {


    /**
     * urls : [{"mediacode":"661","bitrate":["2048"],"cp":"","playurl":"http://183.50.238.19/88888888/16/20171107/268435470/268435470.mp4?rrsip=112.50.238.19,rrsip=112.50.238.19,rrsip=112.50.238.19&zoneoffset=0&servicetype=0&icpid=&accounttype=1&limitflux=-1&limitdur=-1&accountinfo=w4X1PW1m05Im3ILhOaRth5hOM9tpf3BAkFnYnCBzZ%2Fzy93juh0Iots5z6UWE9VFx6XdqhiVnBzabe9uDvl8RGbou7hzP5QFu7%2F6NbolrXeQ%3D3bfab1f0bbefeb852bab846bf34a7b6a%3A20180124153303%2C7040027%2C10.72.48.187%2C20180124153303%2C00000062201705271002120028799574%2C1000131878%2C0.0%2C1%2CVOD%2C%2C1%2C1%2C20001%2C%2C659%2C1%2CEND&GuardEncType=2&it=H4sIAAAAAAAAADWOwQ6CMBBE_6bHhiLGU08YExNTTUCvZm2X2rBQbIHEv9ei3HYm72V2DKDxuJcs4kt5mTMNRK63yptU36ryLjJe7LjY5FwUW1Yn4UBgZbawauoeGKRYxQrD7DRKExs-Q-RgbUALo_M9vxC8r4H-CMN6HR_TUUNsU3hCLH03QEBz8nZhZAMUkQ2gW7CooEPZT0Q_7xzM94EPNMYnjMkAAAA"}]
     * returncode : 0
     * description : Successfully
     */

    private String returncode;
    private String description;
    private List<AuthResponseUrl> urls;

    public boolean success() {
        return "0".equals(returncode);
    }

    public String getReturncode() {
        return returncode;
    }

    public void setReturncode(String returncode) {
        this.returncode = returncode;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<AuthResponseUrl> getUrls() {
        return urls;
    }

    public void setUrls(List<AuthResponseUrl> urls) {
        this.urls = urls;
    }


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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.returncode);
        dest.writeString(this.description);
        dest.writeTypedList(this.urls);
    }

    public AuthResponse() {
    }

    protected AuthResponse(Parcel in) {
        this.returncode = in.readString();
        this.description = in.readString();
        this.urls = in.createTypedArrayList(AuthResponseUrl.CREATOR);
    }

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

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