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

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

/**
 * Network data containing WiFi and Ethernet information
 */
public class NetworkData implements Parcelable {
    public static final Creator<NetworkData> CREATOR = new Creator<>() {
        @Override
        public NetworkData createFromParcel(Parcel in) {
            return new NetworkData(in);
        }

        @Override
        public NetworkData[] newArray(int size) {
            return new NetworkData[size];
        }
    };
    public WifiInfo wifi;
    public EthernetInfo ethernet;

    public NetworkData() {
    }

    protected NetworkData(Parcel in) {
        wifi = in.readParcelable(WifiInfo.class.getClassLoader());
        ethernet = in.readParcelable(EthernetInfo.class.getClassLoader());
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(wifi, flags);
        dest.writeParcelable(ethernet, flags);
    }

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