ch.loway.oss.ari4java.generated.ari_5_0_0.actions.requests.AsteriskGetObjectGetRequest_impl_ari_5_0_0 Maven / Gradle / Ivy
package ch.loway.oss.ari4java.generated.ari_5_0_0.actions.requests;
// ----------------------------------------------------
// THIS CLASS WAS GENERATED AUTOMATICALLY
// PLEASE DO NOT EDIT
// Generated on: Sat Aug 14 16:51:45 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_5_0_0.actions.*;
import ch.loway.oss.ari4java.generated.ari_5_0_0.actions.requests.*;
import ch.loway.oss.ari4java.generated.ari_5_0_0.models.*;
public class AsteriskGetObjectGetRequest_impl_ari_5_0_0 extends BaseAriAction
implements AsteriskGetObjectGetRequest {
private String configClass;
private String objectType;
private String id;
public AsteriskGetObjectGetRequest_impl_ari_5_0_0(
String configClass, String objectType, String id) {
this.configClass = configClass;
this.objectType = objectType;
this.id = id;
}
public AsteriskGetObjectGetRequest setConfigClass(String configClass) {
this.configClass = configClass;
return this;
}
public AsteriskGetObjectGetRequest setObjectType(String objectType) {
this.objectType = objectType;
return this;
}
public AsteriskGetObjectGetRequest setId(String id) {
this.id = id;
return this;
}
private AriRequest build() {
AriRequest ariRequest =
new AriRequest(
"/asterisk/config/dynamic/"
+ encodeUrlPart(configClass)
+ "/"
+ encodeUrlPart(objectType)
+ "/"
+ encodeUrlPart(id)
+ "",
"GET");
ariRequest.addErrorResponse(HttpResponse.build(404, "{configClass|objectType|id} not found"));
return ariRequest;
}
public List execute() throws RestException {
String json = httpActionSync(build());
return deserializeJsonAsAbstractList(
json, new TypeReference>() {});
}
public void execute(AriCallback> callback) {
httpActionAsync(build(), callback, new TypeReference>() {});
}
/* No missing signatures from interface */
}