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.request; 017 018 019import java.util.Map; 020 021 022public class SnsPublishRequest extends SnsRequest { 023 private String from; 024 private String message; 025 026 public SnsPublishRequest(final String to, 027 final String topicArn, 028 final String from, 029 final String message) throws Exception { 030 super("publish", to, topicArn); 031 this.from = from; 032 this.message = message; 033 } 034 035 @Override 036 public Map<String, String> getQueryParameters() { 037 Map<String, String> params = super.getQueryParameters(); 038 params.put("from", from); 039 params.put("message", message); 040 return params; 041 } 042}