001package com.plivo.api.xml; 002 003import javax.xml.bind.annotation.XmlAttribute; 004import javax.xml.bind.annotation.XmlRootElement; 005import javax.xml.bind.annotation.XmlValue; 006 007@XmlRootElement(name = "Message") 008public class Message extends PlivoXml implements ResponseNestable { 009 010 @XmlValue 011 private String content; 012 013 @XmlAttribute 014 private String src; 015 016 @XmlAttribute 017 private String dst; 018 019 @XmlAttribute 020 private String type; 021 022 public String content() { 023 return this.content; 024 } 025 026 public String src() { 027 return this.src; 028 } 029 030 public String dst() { 031 return this.dst; 032 } 033 034 public String type() { 035 return this.type; 036 } 037 038 public Message content(final String content) { 039 this.content = content; 040 return this; 041 } 042 043 public Message src(final String src) { 044 this.src = src; 045 return this; 046 } 047 048 public Message dst(final String dst) { 049 this.dst = dst; 050 return this; 051 } 052 053 public Message type(final String type) { 054 this.type = type; 055 return this; 056 } 057 058 059 @XmlAttribute 060 private String callbackUrl; 061 062 @XmlAttribute 063 private String callbackMethod; 064 065 public Message(String src, String dst, String content) { 066 this.src = src; 067 this.dst = dst; 068 this.content = content; 069 } 070 071 private Message() { 072 } 073 074 public String callbackUrl() { 075 return this.callbackUrl; 076 } 077 078 public String callbackMethod() { 079 return this.callbackMethod; 080 } 081 082 public Message callbackUrl(final String callbackUrl) { 083 this.callbackUrl = callbackUrl; 084 return this; 085 } 086 087 public Message callbackMethod(final String callbackMethod) { 088 this.callbackMethod = callbackMethod; 089 return this; 090 } 091}