ch.loway.oss.ari4java.generated.ari_7_0_0.actions.requests.RecordingsCopyStoredPostRequest_impl_ari_7_0_0 Maven / Gradle / Ivy
package ch.loway.oss.ari4java.generated.ari_7_0_0.actions.requests;
// ----------------------------------------------------
// THIS CLASS WAS GENERATED AUTOMATICALLY
// PLEASE DO NOT EDIT
// Generated on: Sat Aug 14 16:51:46 SAST 2021
// ----------------------------------------------------
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.ArrayList;
import java.net.URLEncoder;
import com.fasterxml.jackson.core.type.TypeReference;
import ch.loway.oss.ari4java.ARI;
import ch.loway.oss.ari4java.tools.*;
import ch.loway.oss.ari4java.generated.*;
import ch.loway.oss.ari4java.generated.actions.*;
import ch.loway.oss.ari4java.generated.actions.requests.*;
import ch.loway.oss.ari4java.generated.models.Module;
import ch.loway.oss.ari4java.generated.models.*;
import ch.loway.oss.ari4java.generated.ari_7_0_0.actions.*;
import ch.loway.oss.ari4java.generated.ari_7_0_0.actions.requests.*;
import ch.loway.oss.ari4java.generated.ari_7_0_0.models.*;
public class RecordingsCopyStoredPostRequest_impl_ari_7_0_0 extends BaseAriAction
implements RecordingsCopyStoredPostRequest {
private String recordingName;
private String destinationRecordingName;
public RecordingsCopyStoredPostRequest_impl_ari_7_0_0(
String recordingName, String destinationRecordingName) {
this.recordingName = recordingName;
this.destinationRecordingName = destinationRecordingName;
}
public RecordingsCopyStoredPostRequest setRecordingName(String recordingName) {
this.recordingName = recordingName;
return this;
}
public RecordingsCopyStoredPostRequest setDestinationRecordingName(
String destinationRecordingName) {
this.destinationRecordingName = destinationRecordingName;
return this;
}
private AriRequest build() {
AriRequest ariRequest =
new AriRequest("/recordings/stored/" + encodeUrlPart(recordingName) + "/copy", "POST");
ariRequest.addParamQuery(HttpParam.build("destinationRecordingName", destinationRecordingName));
ariRequest.addErrorResponse(HttpResponse.build(404, "Recording not found"));
ariRequest.addErrorResponse(
HttpResponse.build(409, "A recording with the same name already exists on the system"));
return ariRequest;
}
public StoredRecording execute() throws RestException {
String json = httpActionSync(build());
return deserializeJson(json, StoredRecording_impl_ari_7_0_0.class);
}
public void execute(AriCallback callback) {
httpActionAsync(build(), callback, StoredRecording_impl_ari_7_0_0.class);
}
/* No missing signatures from interface */
}