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

com.urbanairship.api.email.model.EmailAttachmentResponse Maven / Gradle / Ivy

There is a newer version: 9.4.2
Show newest version
/*
 * Copyright (c) 2013-2022. Airship and Contributors
 */

package com.urbanairship.api.email.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;


public class EmailAttachmentResponse {
    private final boolean ok;
    private final ImmutableList attachmentIds;

    public EmailAttachmentResponse(@JsonProperty("ok") boolean ok, @JsonProperty("attachment_ids") ImmutableList attachmentIds) {
        this.ok = ok;
        this.attachmentIds = attachmentIds;
    }

    /**
     * Get the OK status as a boolean
     *
     * @return boolean
     */
    public boolean getOk() {
        return ok;
    }

    /**
     * Get a list of Attachment IDs.
     *
     * @return An ImmutableList of String
     */
    public ImmutableList getAttachmentIds() {
        return attachmentIds;
    }

    @Override
    public String toString() {
        return "EmailAttachmentResponse{" +
                "ok=" + ok +
                ", attachmentIds=" + attachmentIds +
                '}';
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(ok, attachmentIds);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        final EmailAttachmentResponse other = (EmailAttachmentResponse) obj;
        return Objects.equal(this.ok, other.ok) &&
                Objects.equal(this.attachmentIds, other.attachmentIds);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy