net.accelbyte.sdk.api.challenge.wrappers.ChallengeConfiguration Maven / Gradle / Ivy
/*
* Copyright (c) 2024 AccelByte Inc. All Rights Reserved
* This is licensed software from AccelByte Inc, for limitations
* and restrictions contact your company contract manager.
*
* Code generated. DO NOT EDIT.
*/
package net.accelbyte.sdk.api.challenge.wrappers;
import java.util.*;
import net.accelbyte.sdk.api.challenge.models.*;
import net.accelbyte.sdk.api.challenge.operations.challenge_configuration.*;
import net.accelbyte.sdk.core.HttpResponse;
import net.accelbyte.sdk.core.RequestRunner;
public class ChallengeConfiguration {
private RequestRunner sdk;
private String customBasePath = "";
public ChallengeConfiguration(RequestRunner sdk) {
this.sdk = sdk;
String configCustomBasePath =
sdk.getSdkConfiguration().getConfigRepository().getCustomServiceBasePath("challenge");
if (!configCustomBasePath.equals("")) {
this.customBasePath = configCustomBasePath;
}
}
public ChallengeConfiguration(RequestRunner sdk, String customBasePath) {
this.sdk = sdk;
this.customBasePath = customBasePath;
}
/**
* @see AdminGetChallenges
*/
public ModelListChallengeResponse adminGetChallenges(AdminGetChallenges input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see AdminCreateChallenge
*/
public ModelChallengeResponse adminCreateChallenge(AdminCreateChallenge input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see AdminGetChallenge
*/
public ModelChallengeResponse adminGetChallenge(AdminGetChallenge input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see AdminUpdateChallenge
*/
public ModelChallengeResponse adminUpdateChallenge(AdminUpdateChallenge input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see AdminDeleteChallenge
*/
public void adminDeleteChallenge(AdminDeleteChallenge input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
input.handleEmptyResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see AdminGetPeriods
*/
public ModelListPeriodsResponse adminGetPeriods(AdminGetPeriods input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see AdminRandomizeChallenge
*/
public List adminRandomizeChallenge(AdminRandomizeChallenge input)
throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
return input.parseResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
/**
* @see AdminDeleteTiedChallenge
*/
public void adminDeleteTiedChallenge(AdminDeleteTiedChallenge input) throws Exception {
if (input.getCustomBasePath().equals("") && !customBasePath.equals("")) {
input.setCustomBasePath(customBasePath);
}
final HttpResponse httpResponse = sdk.runRequest(input);
input.handleEmptyResponse(
httpResponse.getCode(), httpResponse.getContentType(), httpResponse.getPayload());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy