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 = "Stream") 008public class Stream extends PlivoXml implements ResponseNestable { 009 010 @XmlValue 011 private String content; 012 013 @XmlAttribute 014 private Boolean bidirectional; 015 016 @XmlAttribute 017 private String audioTrack; 018 019 @XmlAttribute 020 private Integer streamTimeout; 021 022 @XmlAttribute 023 private String statusCallbackUrl; 024 025 @XmlAttribute 026 private String statusCallbackMethod; 027 028 @XmlAttribute 029 private String contentType; 030 031 @XmlAttribute 032 private String extraHeaders; 033 034 private Stream() { 035 036 } 037 038 public Stream(String content) { 039 this.content = content; 040 } 041 042 public Boolean bidirectional() { 043 return this.bidirectional; 044 } 045 046 public String audioTrack() { 047 return this.audioTrack; 048 } 049 050 public Integer streamTimeout() { 051 return this.streamTimeout; 052 } 053 054 public String statusCallbackUrl() { 055 return this.statusCallbackUrl; 056 } 057 058 public String statusCallbackMethod() { 059 return this.statusCallbackMethod; 060 } 061 062 public String extraHeaders() { 063 return this.extraHeaders; 064 } 065 066 public String contentType() { 067 return this.contentType; 068 } 069 070 public Stream bidirectional(final Boolean bidirectional) { 071 this.bidirectional = bidirectional; 072 return this; 073 } 074 075 public Stream audioTrack(final String audioTrack) { 076 this.audioTrack = audioTrack; 077 return this; 078 } 079 080 public Stream streamTimeout(final Integer streamTimeout) { 081 this.streamTimeout = streamTimeout; 082 return this; 083 } 084 085 public Stream statusCallbackUrl(final String statusCallbackUrl) { 086 this.statusCallbackUrl = statusCallbackUrl; 087 return this; 088 } 089 090 public Stream statusCallbackMethod(final String statusCallbackMethod) { 091 this.statusCallbackMethod = statusCallbackMethod; 092 return this; 093 } 094 095 public Stream contentType(final String contentType) { 096 this.contentType = contentType; 097 return this; 098 } 099 100 public Stream extraHeaders(final String extraHeaders) { 101 this.extraHeaders = extraHeaders; 102 return this; 103 } 104 105}