
com.voxeo.tropo.actions.SayAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tropo-webapi-java Show documentation
Show all versions of tropo-webapi-java Show documentation
WebApi Java implementation for the Tropo Cloud platform
The newest version!
package com.voxeo.tropo.actions;
import static com.voxeo.tropo.Key.VALUE;
import com.google.gson.JsonObject;
import com.voxeo.tropo.Key;
import com.voxeo.tropo.annotations.RequiredKeys;
import com.voxeo.tropo.annotations.ValidKeys;
@ValidKeys(keys={"name","value","allowSignals","voice","as","required","promptLogSecurity","media"})
@RequiredKeys(keys={"value"})
public class SayAction extends ArrayAction {
public SayAction(String text) {
setName("say");
JsonObject item = new JsonObject();
item.addProperty("value", text);
add(item);
}
public SayAction(Key... keys) {
super(keys);
setName("say");
}
public SayAction say(String text) {
return say(VALUE(text));
}
public SayAction say(Key... keys) {
add(buildObjectFromKeys(keys));
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy