All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.urbanairship.connect.client.model.responses.AssociatedPush Maven / Gradle / Ivy

There is a newer version: 5.4.2
Show newest version
/*
Copyright 2015 Urban Airship and Contributors
*/

package com.urbanairship.connect.client.model.responses;

import com.google.common.base.Optional;
import com.google.gson.annotations.SerializedName;
import org.joda.time.DateTime;

public class AssociatedPush {

    @SerializedName("push_id")
    private Optional pushId;
    @SerializedName("group_id")
    private Optional groupId;
    @SerializedName("variant_id")
    private final Optional variantId;
    private final Optional time;

    private AssociatedPush() {
        this(null, Optional.absent(), Optional.absent(), Optional.absent());
    }

    public AssociatedPush(Optional pushId, Optional groupId, Optional variantId, Optional time) {
        this.pushId = pushId;
        this.groupId = groupId;
        this.variantId = variantId;
        this.time = time;
    }


    public Optional getPushId() {
        return pushId;
    }

    public Optional getGroupId() {
        return groupId;
    }

    public Optional getVariantId() {
        return variantId;
    }

    public Optional getTime() {
        return time;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof AssociatedPush)) return false;

        AssociatedPush that = (AssociatedPush) o;

        if (!groupId.equals(that.groupId)) return false;
        if (!pushId.equals(that.pushId)) return false;
        if (!time.equals(that.time)) return false;
        if (!variantId.equals(that.variantId)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = pushId.hashCode();
        result = 31 * result + groupId.hashCode();
        result = 31 * result + variantId.hashCode();
        result = 31 * result + time.hashCode();
        return result;
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy