001/*
002 * Copyright (c) 2011-2017 Nexmo Inc
003 *
004 * Permission is hereby granted, free of charge, to any person obtaining a copy
005 * of this software and associated documentation files (the "Software"), to deal
006 * in the Software without restriction, including without limitation the rights
007 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008 * copies of the Software, and to permit persons to whom the Software is
009 * furnished to do so, subject to the following conditions:
010 *
011 * The above copyright notice and this permission notice shall be included in
012 * all copies or substantial portions of the Software.
013 *
014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
020 * THE SOFTWARE.
021 */
022package com.nexmo.client.sns.response;
023
024
025public class SnsResponse {
026
027    public static final int STATUS_OK = 0;
028    public static final int STATUS_BAD_COMMAND = 1;
029    public static final int STATUS_INTERNAL_ERROR = 2;
030    public static final int STATUS_INVALID_ACCOUNT = 3;
031    public static final int STATUS_MISSING_TOPIC = 4;
032    public static final int STATUS_INVALID_OR_MISSING_MSISDN = 5;
033    public static final int STATUS_INVALID_OR_MISSING_FROM = 6;
034    public static final int STATUS_INVALID_OR_MISSING_MSG = 7;
035    public static final int STATUS_TOPIC_NOT_FOUND = 8;
036    public static final int STATUS_TOPIC_PERMISSION_FAILURE = 9;
037    public static final int STATUS_COMMS_FAILURE = 13;
038
039    private final String command;
040    private final int resultCode;
041    private final String resultMessage;
042
043    public SnsResponse(final String command,
044                       final int resultCode,
045                       final String resultMessage) {
046        this.command = command;
047        this.resultCode = resultCode;
048        this.resultMessage = resultMessage;
049    }
050
051    public String getCommand() {
052        return this.command;
053    }
054
055    public int getResultCode() {
056        return this.resultCode;
057    }
058
059    public String getResultMessage() {
060        return this.resultMessage;
061    }
062}