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

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

/**
 * Static IP configuration for WiFi
 */
public class StaticIpConfig implements Parcelable {
    public static final Creator<StaticIpConfig> CREATOR = new Creator<>() {
        @Override
        public StaticIpConfig createFromParcel(Parcel in) {
            return new StaticIpConfig(in);
        }

        @Override
        public StaticIpConfig[] newArray(int size) {
            return new StaticIpConfig[size];
        }
    };
    public String ipAddress;
    public String gateway;
    public String dns1;
    public String dns2;
    public String subnetMask;

    public StaticIpConfig() {
    }

    protected StaticIpConfig(Parcel in) {
        ipAddress = in.readString();
        gateway = in.readString();
        dns1 = in.readString();
        dns2 = in.readString();
        subnetMask = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(ipAddress);
        dest.writeString(gateway);
        dest.writeString(dns1);
        dest.writeString(dns2);
        dest.writeString(subnetMask);
    }

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