package com.plivo.helper.xml.elements;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;

@XmlAccessorType(XmlAccessType.FIELD)
public class Record implements Serializable {

    private static final long serialVersionUID = 158509162906138363L;

    @XmlAttribute
    private Integer maxLength;

    @XmlAttribute
    private String action;

    @XmlAttribute
    private Integer timeout;

    @XmlAttribute
    private String method;

    @XmlAttribute
    private String finishOnKey;

    @XmlAttribute
    private Boolean playBeep;

    @XmlAttribute
    private Boolean bothLegs;

    @XmlAttribute
    private Boolean redirect;

    @XmlAttribute
    private Boolean startOnDialAnswer;

    @XmlAttribute
    private Boolean recordSession;

    @XmlAttribute
    private String callbackUrl;

    @XmlAttribute
    private String callbackMethod;

    public Record() {

    }

    /**
     * Maximum number of seconds to record (default 60)
     * @param maxLength
     */
    public void setMaxLength(Integer maxLength) {
        this.maxLength = maxLength;
    }

    public Integer getMaxLength() {
        return maxLength;
    }

    /**
     * Submit the result of the record to this URL
     * @param action
     */
    public void setAction(String action) {
        this.action = action;
    }

    public String getAction() {
        return action;
    }

    /**
     * Seconds of silence before considering the recording complete (default 500) 
     * @param timeout
     */
    public void setTimeout(Integer timeout) {
        this.timeout = timeout;
    }

    public Integer getTimeout() {
        return timeout;
    }

    /**
     * Submit to 'action' URL using GET or POST
     * @param method
     */
    public void setMethod(String method) {
        this.method = method;
    }

    public String getMethod() {
        return method;
    }

    /**
     * Stop recording on this key
     * @param finishOnKey
     */
    public void setFinishOnKey(String finishOnKey) {
        this.finishOnKey = finishOnKey;
    }

    public String getFinishOnKey() {
        return finishOnKey;
    }

    /**
     * Play a beep before recording (true/false, default true)
     * @param playBeep
     */
    public void setPlayBeep(Boolean playBeep) {
        this.playBeep = playBeep;
    }

    public Boolean isPlayBeep() {
        return playBeep;
    }

    /**
     * Redirect to action url or not (true/false, default false)
     * @param redirect
     */
    public void setRedirect(Boolean redirect) {
        this.redirect = redirect;
    }

    public Boolean getRedirect() {
        return redirect;
    }

    /**
     * Record call when called party answers in a Dial 
	 * (true/false, default false). No beep will be played.
     * @param startOnDialAnswer
     */
    public void setStartOnDialAnswer(Boolean startOnDialAnswer) {
        this.startOnDialAnswer = startOnDialAnswer;
    }

    public Boolean getStartOnDialAnswer() {
        return startOnDialAnswer;
    }

	/**
	 * Record current call session in background 
	 * (true/false, default false). No beep will be played.
	 * @param recordSession
	 */
    public void setRecordSession(Boolean recordSession) {
        this.recordSession = recordSession;
    }

    public Boolean getRecordSession() {
        return recordSession;
    }

    public void setCallbackUrl(String callbackUrl){
        this.callbackUrl = callbackUrl;
    }

    public String getCallbackUrl(){
        return callbackUrl;
    }

    public void setCallbackMethod(String callbackMethod){
        this.callbackMethod = callbackMethod;
    }

    public String getCallbackMethod(){
        return callbackMethod;
    }
}

@@ -861,24 +861,196 @@
 rdSession;%0A%0A
+    @XmlAttribute%0A    private String transcriptionType;%0A%0A    @XmlAttribute%0A    private String transcriptionUrl;%0A%0A    @XmlAttribute%0A    private String transcriptionMethod;%0A%0A
     @XmlAttr
@@ -2987,17 +2987,20 @@
 a Dial %0A
-%09
+    
  * (true
@@ -3301,14 +3301,20 @@
  %7D%0A%0A
-%09/**%0A%09
+    /**%0A    
  * R
@@ -3357,11 +3357,13 @@
 ound
- %0A%09
+%0A    
  * (
@@ -3414,17 +3414,20 @@
 played.%0A
-%09
+    
  * @para
@@ -3446,9 +3446,12 @@
 ion%0A
-%09
+    
  */%0A
@@ -3628,32 +3628,656 @@
 Session;%0A    %7D%0A%0A
+    public String getTranscriptionType()%7B%0A        return transcriptionType;%0A    %7D%0A%0A    public void setTranscriptionType(String transcriptionType)%7B%0A        this.transcriptionType = transcriptionType;%0A    %7D%0A%0A    public String getTranscriptionUrl()%7B%0A        return transcriptionUrl;%0A    %7D%0A%0A    public void setTranscriptionUrl(String transcriptionUrl)%7B%0A        this.transcriptionUrl = transcriptionUrl;%0A    %7D%0A%0A    public String getTranscriptionMethod()%7B%0A        return transcriptionMethod;%0A    %7D%0A%0A    public void setTranscriptionMethod(String transcriptionMethod)%7B%0A        this.transcriptionMethod = transcriptionMethod;%0A    %7D%0A%0A
     public void 

Update Record.java (transcription)