package com.amazon.ads.ema.api.model;

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

/**
 * Display information parsed from EDID
 */
public class DisplayInfo implements Parcelable {
    public static final Creator<DisplayInfo> CREATOR = new Creator<>() {
        @Override
        public DisplayInfo createFromParcel(Parcel in) {
            return new DisplayInfo(in);
        }

        @Override
        public DisplayInfo[] newArray(int size) {
            return new DisplayInfo[size];
        }
    };
    public String manufacturer;         // Display manufacturer (from EDID)
    public String model;                // Display model (from EDID)
    public String resolution;           // e.g., "1920x1080"
    public int refreshRate;             // e.g., 60 (Hz)

    public DisplayInfo() {
    }

    protected DisplayInfo(Parcel in) {
        manufacturer = in.readString();
        model = in.readString();
        resolution = in.readString();
        refreshRate = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(manufacturer);
        dest.writeString(model);
        dest.writeString(resolution);
        dest.writeInt(refreshRate);
    }

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