001/*
002 *   Copyright 2020 Vonage
003 *
004 *   Licensed under the Apache License, Version 2.0 (the "License");
005 *   you may not use this file except in compliance with the License.
006 *   You may obtain a copy of the License at
007 *
008 *        http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *   Unless required by applicable law or agreed to in writing, software
011 *   distributed under the License is distributed on an "AS IS" BASIS,
012 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *   See the License for the specific language governing permissions and
014 *   limitations under the License.
015 */
016package com.vonage.client.sns.response;
017
018
019public class SnsResponse {
020
021    public static final int STATUS_OK = 0;
022    public static final int STATUS_BAD_COMMAND = 1;
023    public static final int STATUS_INTERNAL_ERROR = 2;
024    public static final int STATUS_INVALID_ACCOUNT = 3;
025    public static final int STATUS_MISSING_TOPIC = 4;
026    public static final int STATUS_INVALID_OR_MISSING_MSISDN = 5;
027    public static final int STATUS_INVALID_OR_MISSING_FROM = 6;
028    public static final int STATUS_INVALID_OR_MISSING_MSG = 7;
029    public static final int STATUS_TOPIC_NOT_FOUND = 8;
030    public static final int STATUS_TOPIC_PERMISSION_FAILURE = 9;
031    public static final int STATUS_COMMS_FAILURE = 13;
032
033    private final String command;
034    private final int resultCode;
035    private final String resultMessage;
036
037    public SnsResponse(final String command,
038                       final int resultCode,
039                       final String resultMessage) {
040        this.command = command;
041        this.resultCode = resultCode;
042        this.resultMessage = resultMessage;
043    }
044
045    public String getCommand() {
046        return this.command;
047    }
048
049    public int getResultCode() {
050        return this.resultCode;
051    }
052
053    public String getResultMessage() {
054        return this.resultMessage;
055    }
056}