001package com.plivo.api.xml; 002 003import java.util.ArrayList; 004import java.util.Arrays; 005import java.util.List; 006import javax.xml.bind.annotation.XmlElements; 007import javax.xml.bind.annotation.XmlRootElement; 008 009@XmlRootElement(name = "PreAnswer") 010public class PreAnswer extends PlivoXml implements ResponseNestable { 011 012 @XmlElements({ 013 @javax.xml.bind.annotation.XmlElement(name = "Speak", type = Speak.class), 014 @javax.xml.bind.annotation.XmlElement(name = "Wait", type = Wait.class), 015 @javax.xml.bind.annotation.XmlElement(name = "Play", type = Play.class) 016 }) 017 private List<PreAnswerNestable> children = new ArrayList<>(); 018 019 020 public PreAnswer children(PreAnswerNestable... children) { 021 this.children.addAll(Arrays.asList(children)); 022 return this; 023 } 024}