All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.twilio.twiml.voice.SsmlS Maven / Gradle / Ivy

There is a newer version: 10.1.5
Show newest version
/**
 * This code was generated by
 * \ / _    _  _|   _  _
 *  | (_)\/(_)(_|\/| |(/_  v1.0.0
 *       /       /
 */

package com.twilio.twiml.voice;

import com.twilio.twiml.TwiML;

/**
 * TwiML wrapper for {@code }
 */
public class SsmlS extends TwiML {
    private final String words;

    /**
     * For XML Serialization/Deserialization
     */
    private SsmlS() {
        this(new Builder((String) null));
    }

    /**
     * Create a new {@code } element
     */
    private SsmlS(Builder b) {
        super("s", b);
        this.words = b.words;
    }

    /**
     * The body of the TwiML element
     *
     * @return Element body as a string if present else null
     */
    protected String getElementBody() {
        return this.getWords() == null ? null : this.getWords();
    }

    /**
     * Words to speak
     *
     * @return Words to speak
     */
    public String getWords() {
        return words;
    }

    /**
     * Create a new {@code } element
     */
    public static class Builder extends TwiML.Builder {
        private String words;

        /**
         * Create a {@code } with words
         */
        public Builder(String words) {
            this.words = words;
        }

        /**
         * Create and return resulting {@code } element
         */
        public SsmlS build() {
            return new SsmlS(this);
        }
    }
}