/*
 * ICESOFT COMMERCIAL SOURCE CODE LICENSE V 1.1
 *
 * The contents of this file are subject to the ICEsoft Commercial Source
 * Code License Agreement V1.1 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of the
 * License at
 * http://www.icesoft.com/license/commercial-source-v1.1.html
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations under
 * the License.
 *
 * Copyright 2009-2015 ICEsoft Technologies Canada, Corp. All Rights Reserved.
 */

package com.icesoft.push.messaging;

import com.icesoft.push.PushID;

import java.io.Serializable;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;

import org.icepush.PushConfiguration;

public class MessagePayload
implements Serializable {
    private final static Logger LOGGER = Logger.getLogger(MessagePayload.class.getName());

    private String browserID;
    private long delay;
    private String groupName;
    private String notifyBackURI;
    private PushConfiguration pushConfiguration;
    private PushID pushID;
    private String pushIDString;
    private Set<String> pushIDSet;
    private String[] pushIDs;
    private Map<String, PushID.Status> pushIDStatusMap;
    private long timestamp;
    private UUID uuid;

    public String getBrowserID() {
        return browserID;
    }

    public long getDelay() {
        return delay;
    }

    public String getGroupName() {
        return groupName;
    }

    public String getNotifyBackURI() {
        return notifyBackURI;
    }

    public PushConfiguration getPushConfiguration() {
        return pushConfiguration;
    }

    public PushID getPushID() {
        return pushID;
    }

    public String getPushIDString() {
        return pushIDString;
    }

    public Set<String> getPushIDSet() {
        return pushIDSet;
    }

    public String[] getPushIDs() {
        return pushIDs;
    }

    public Map<String, PushID.Status> getPushIDStatusMap() {
        return pushIDStatusMap;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public UUID getUUID() {
        return uuid;
    }

    public void setBrowserID(final String browserID) {
        this.browserID = browserID;
    }

    public void setDelay(final long delay) {
        this.delay = delay;
    }

    public void setGroupName(final String groupName) {
        this.groupName = groupName;
    }

    public void setNotifyBackURI(final String notifyBackURI) {
        this.notifyBackURI = notifyBackURI;
    }

    public void setPushConfiguration(final PushConfiguration pushConfiguration) {
        this.pushConfiguration = pushConfiguration;
    }

    public void setPushID(final PushID pushID) {
        this.pushID = pushID;
    }

    public void setPushIDSet(final Set<String> pushIDSet) {
        this.pushIDSet = pushIDSet;
    }

    public void setPushIDs(final String[] pushIDs) {
        this.pushIDs = pushIDs;
    }

    public void setPushIDString(final String pushIDString) {
        this.pushIDString = pushIDString;
    }

    public void setPushIDStatusMap(final Map<String, PushID.Status> pushIDStatusMap) {
        this.pushIDStatusMap = pushIDStatusMap;
    }

    public void setTimestamp(final long timestamp) {
        this.timestamp = timestamp;
    }

    public void setUUID(final UUID uuid) {
        this.uuid = uuid;
    }

    @Override
    public String toString() {
        return
            new StringBuilder().
                append("MessagePayload[").
                    append("browserID: '").append(browserID).append("', ").
                    append("delay: '").append(delay).append("', ").
                    append("groupName: '").append(groupName).append("', ").
                    append("notifyBackURI: '").append(notifyBackURI).append("', ").
                    append("pushConfiguration: '").append(pushConfiguration).append("', ").
                    append("pushID: '" + pushID + "', ").
                    append("pushIDSet: '").append(pushIDSet).append("', ").
                    append("pushIDs: '").append(pushIDs).append("', ").
                    append("pushIDString: '").append(pushIDString).append("', ").
                    append("pushIDStatusMap: '").append(pushIDStatusMap).append("', ").
                    append("timestamp: '").append(timestamp).append("', ").
                    append("uuid: '").append(uuid).append("'").
                append("]").toString();
    }
}
