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

com.twilio.twiml.voice.Autopilot 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 Autopilot extends TwiML {
    private final String name;

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

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

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

    /**
     * Autopilot assistant sid or unique name
     *
     * @return Autopilot assistant sid or unique name
     */
    public String getName() {
        return name;
    }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy