gt: lParamQuery.add( HttpParam.build( "skipms", skipms) );
context: package ch.loway.oss.ari4java.generated.ari_0_0_1.actions;
  
  // ----------------------------------------------------
  //      THIS CLASS WAS GENERATED AUTOMATICALLY         
  //               PLEASE DO NOT EDIT                    
  //    Generated on: Sat Feb 04 15:23:09 CET 2017
  // ----------------------------------------------------
  
  import ch.loway.oss.ari4java.generated.*;
  import java.util.Date;
  import java.util.List;
  import java.util.Map;
  import java.util.ArrayList;
  import ch.loway.oss.ari4java.tools.BaseAriAction;
  import ch.loway.oss.ari4java.tools.RestException;
  import ch.loway.oss.ari4java.tools.AriCallback;
  import ch.loway.oss.ari4java.tools.HttpParam;
  import ch.loway.oss.ari4java.tools.HttpResponse;
  import com.fasterxml.jackson.core.type.TypeReference;
  import ch.loway.oss.ari4java.generated.ari_0_0_1.models.*;
  
  /**********************************************************
   * 
   * Generated by: Apis
   *********************************************************/
  
  
  public class ActionBridges_impl_ari_0_0_1 extends BaseAriAction  implements ActionBridges {
  /**********************************************************
   * Active bridges
   * 
   * List all active bridges in Asterisk.
   *********************************************************/
  private void buildList() {
  reset();
  url = "/bridges";
  method = "GET";
  }
  
  @Override
  public List<Bridge> list() throws RestException {
  buildList();
  String json = httpActionSync();
  return deserializeJsonAsAbstractList( json,
     new TypeReference<List<Bridge_impl_ari_0_0_1>>() {} ); 
  }
  
  @Override
  public void list(AriCallback<List<Bridge>> callback) {
  buildList();
  httpActionAsync(callback, new TypeReference<List<Bridge_impl_ari_0_0_1>>() {});
  }
  
  /**********************************************************
   * Active bridges
   * 
   * Create a new bridge.
   * This bridge persists until it has been shut down, or Asterisk has been shut down.
   *********************************************************/
  private void buildCreate(String type) {
  reset();
  url = "/bridges";
  method = "POST";
  lParamQuery.add( HttpParam.build( "type", type) );
  }
  
  @Override
  public Bridge create(String type) throws RestException {
  buildCreate(type);
  String json = httpActionSync();
  return deserializeJson( json, Bridge_impl_ari_0_0_1.class ); 
  }
  
  @Override
  public void create(String type, AriCallback<Bridge> callback) {
  buildCreate(type);
  httpActionAsync(callback, Bridge_impl_ari_0_0_1.class);
  }
  
  /**********************************************************
   * Individual bridge
   * 
   * Get bridge details.
   *********************************************************/
  private void buildGet(String bridgeId) {
  reset();
  url = "/bridges/" + bridgeId + "";
  method = "GET";
  lE.add( HttpResponse.build( 404, "Bridge not found") );
  }
  
  @Override
  public Bridge get(String bridgeId) throws RestException {
  buildGet(bridgeId);
  String json = httpActionSync();
  return deserializeJson( json, Bridge_impl_ari_0_0_1.class ); 
  }
  
  @Override
  public void get(String bridgeId, AriCallback<Bridge> callback) {
  buildGet(bridgeId);
  httpActionAsync(callback, Bridge_impl_ari_0_0_1.class);
  }
  
  /**********************************************************
   * Individual bridge
   * 
   * Shut down a bridge.
   * If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.
   *********************************************************/
  private void buildDestroy(String bridgeId) {
  reset();
  url = "/bridges/" + bridgeId + "";
  method = "DELETE";
  lE.add( HttpResponse.build( 404, "Bridge not found") );
  }
  
  @Override
  public void destroy(String bridgeId) throws RestException {
  buildDestroy(bridgeId);
  String json = httpActionSync();
  }
  
  @Override
  public void destroy(String bridgeId, AriCallback<Void> callback) {
  buildDestroy(bridgeId);
  httpActionAsync(callback);
  }
  
  /**********************************************************
   * Add a channel to a bridge
   * 
   * Add a channel to a bridge.
   *********************************************************/
  private void buildAddChannel(String bridgeId, String channel, String role) {
  reset();
  url = "/bridges/" + bridgeId + "/addChannel";
  method = "POST";
  lParamQuery.add( HttpParam.build( "channel", channel) );
  lParamQuery.add( HttpParam.build( "role", role) );
  lE.add( HttpResponse.build( 400, "Channel not found") );
  lE.add( HttpResponse.build( 404, "Bridge not found") );
  lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") );
  lE.add( HttpResponse.build( 422, "Channel not in Stasis application") );
  }
  
  @Override
  public void addChannel(String bridgeId, String channel, String role) throws RestException {
  buildAddChannel(bridgeId, channel, role);
  String json = httpActionSync();
  }
  
  @Override
  public void addChannel(String bridgeId, String channel, String role, AriCallback<Void> callback) {
  buildAddChannel(bridgeId, channel, role);
  httpActionAsync(callback);
  }
  
  /**********************************************************
   * Play music on hold to a bridge
   * 
   * Play music on hold to a bridge or change the MOH class that is playing.
   *********************************************************/
  private void buildStartMoh(String bridgeId, String mohClass) {
  reset();
  url = "/bridges/" + bridgeId + "/moh";
  method = "POST";
  lParamQuery.add( HttpParam.build( "mohClass", mohClass) );
  lE.add( HttpResponse.build( 404, "Bridge not found") );
  lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") );
  }
  
  @Override
  public void startMoh(String bridgeId, String mohClass) throws RestException {
  buildStartMoh(bridgeId, mohClass);
  String json = httpActionSync();
  }
  
  @Override
  public void startMoh(String bridgeId, String mohClass, AriCallback<Void> callback) {
  buildStartMoh(bridgeId, mohClass);
  httpActionAsync(callback);
  }
  
  /**********************************************************
   * Play music on hold to a bridge
   * 
   * Stop playing music on hold to a bridge.
   * This will only stop music on hold being played via POST bridges/{bridgeId}/moh.
   *********************************************************/
  private void buildStopMoh(String bridgeId) {
  reset();
  url = "/bridges/" + bridgeId + "/moh";
  method = "DELETE";
  lE.add( HttpResponse.build( 404, "Bridge not found") );
  lE.add( HttpResponse.build( 409, "Bridge not in Stasis application") );
  }
  
  @Override
  public void stopMoh(String bridgeId) throws RestException {
  buildStopMoh(bridgeId);
  String json = httpActionSync();
  }
  
  @Override
  public void stopMoh(String bridgeId, AriCallback<Void> callback) {
  buildStopMoh(bridgeId);
  httpActionAsync(callback);
  }
  
  /**********************************************************
   * Play media to the participants of a bridge
   * 
   * Start playback of media on a bridge.
   * The media URI may be any of a number of URI's. Currently sound: and recording: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)
   *********************************************************/
  private void buildPlay(String bridgeId, String media, String lang, int offsetms, int skipms) {
  reset();
  url = "/bridges/" + bridgeId + "/play";
  method = "POST";
  lParamQuery.add( HttpParam.build( "media", media) );
  lParamQuery.add( HttpParam.build( "lang", lang) );
  lParamQuery.add( HttpParam.build( "offsetms", offsetms) );
  