Please wait. This can take some minutes ...
                    
                 
             
         
        
            
                
                    
                    
                        Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. 
                        
                        Project price only 1 $ 
                        
                            You can buy this project and download/modify it how often you want.
                        
                        
                        
                     
                 
             
         
                    
                 
    
    
    com.playfab.PlayFabAdminAPI Maven / Gradle / Ivy 
    
package com.playfab;
import com.playfab.internal.*;
import com.playfab.PlayFabAdminModels.*;
import com.playfab.PlayFabErrors.*;
import com.playfab.PlayFabSettings;
import java.util.concurrent.*;
import java.util.*;
import com.google.gson.*;
import com.google.gson.reflect.*;
    /** APIs for managing title configurations, uploaded Game Server code executables, and user data */
public class PlayFabAdminAPI {
    private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();
    /**
     * Abort an ongoing task instance.
     * @param request AbortTaskInstanceRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AbortTaskInstanceAsync(final AbortTaskInstanceRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAbortTaskInstanceAsync(request);
            }
        });
    }
    /**
     * Abort an ongoing task instance.
     * @param request AbortTaskInstanceRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AbortTaskInstance(final AbortTaskInstanceRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAbortTaskInstanceAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Abort an ongoing task instance. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAbortTaskInstanceAsync(final AbortTaskInstanceRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/AbortTaskInstance"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        EmptyResponse result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Update news item to include localized version
     * @param request AddLocalizedNewsRequest
     * @return Async Task will return AddLocalizedNewsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AddLocalizedNewsAsync(final AddLocalizedNewsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddLocalizedNewsAsync(request);
            }
        });
    }
    /**
     * Update news item to include localized version
     * @param request AddLocalizedNewsRequest
     * @return AddLocalizedNewsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AddLocalizedNews(final AddLocalizedNewsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddLocalizedNewsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Update news item to include localized version */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddLocalizedNewsAsync(final AddLocalizedNewsRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/AddLocalizedNews"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        AddLocalizedNewsResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Adds a new news item to the title's news feed
     * @param request AddNewsRequest
     * @return Async Task will return AddNewsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AddNewsAsync(final AddNewsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddNewsAsync(request);
            }
        });
    }
    /**
     * Adds a new news item to the title's news feed
     * @param request AddNewsRequest
     * @return AddNewsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AddNews(final AddNewsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddNewsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Adds a new news item to the title's news feed */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddNewsAsync(final AddNewsRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/AddNews"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        AddNewsResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Adds a given tag to a player profile. The tag's namespace is automatically generated based on the source of the tag.
     * @param request AddPlayerTagRequest
     * @return Async Task will return AddPlayerTagResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AddPlayerTagAsync(final AddPlayerTagRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddPlayerTagAsync(request);
            }
        });
    }
    /**
     * Adds a given tag to a player profile. The tag's namespace is automatically generated based on the source of the tag.
     * @param request AddPlayerTagRequest
     * @return AddPlayerTagResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AddPlayerTag(final AddPlayerTagRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddPlayerTagAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Adds a given tag to a player profile. The tag's namespace is automatically generated based on the source of the tag. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddPlayerTagAsync(final AddPlayerTagRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/AddPlayerTag"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        AddPlayerTagResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Adds the game server executable specified (previously uploaded - see GetServerBuildUploadUrl) to the set of those a
     * client is permitted to request in a call to StartGame
     * @param request AddServerBuildRequest
     * @return Async Task will return AddServerBuildResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AddServerBuildAsync(final AddServerBuildRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddServerBuildAsync(request);
            }
        });
    }
    /**
     * Adds the game server executable specified (previously uploaded - see GetServerBuildUploadUrl) to the set of those a
     * client is permitted to request in a call to StartGame
     * @param request AddServerBuildRequest
     * @return AddServerBuildResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AddServerBuild(final AddServerBuildRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddServerBuildAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /**
     * Adds the game server executable specified (previously uploaded - see GetServerBuildUploadUrl) to the set of those a
     * client is permitted to request in a call to StartGame
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddServerBuildAsync(final AddServerBuildRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/AddServerBuild"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        AddServerBuildResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Increments the specified virtual currency by the stated amount
     * @param request AddUserVirtualCurrencyRequest
     * @return Async Task will return ModifyUserVirtualCurrencyResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AddUserVirtualCurrencyAsync(final AddUserVirtualCurrencyRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddUserVirtualCurrencyAsync(request);
            }
        });
    }
    /**
     * Increments the specified virtual currency by the stated amount
     * @param request AddUserVirtualCurrencyRequest
     * @return ModifyUserVirtualCurrencyResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AddUserVirtualCurrency(final AddUserVirtualCurrencyRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddUserVirtualCurrencyAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Increments the specified virtual currency by the stated amount */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddUserVirtualCurrencyAsync(final AddUserVirtualCurrencyRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/AddUserVirtualCurrency"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        ModifyUserVirtualCurrencyResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Adds one or more virtual currencies to the set defined for the title. Virtual Currencies have a maximum value of
     * 2,147,483,647 when granted to a player. Any value over that will be discarded.
     * @param request AddVirtualCurrencyTypesRequest
     * @return Async Task will return BlankResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AddVirtualCurrencyTypesAsync(final AddVirtualCurrencyTypesRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddVirtualCurrencyTypesAsync(request);
            }
        });
    }
    /**
     * Adds one or more virtual currencies to the set defined for the title. Virtual Currencies have a maximum value of
     * 2,147,483,647 when granted to a player. Any value over that will be discarded.
     * @param request AddVirtualCurrencyTypesRequest
     * @return BlankResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AddVirtualCurrencyTypes(final AddVirtualCurrencyTypesRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddVirtualCurrencyTypesAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /**
     * Adds one or more virtual currencies to the set defined for the title. Virtual Currencies have a maximum value of
     * 2,147,483,647 when granted to a player. Any value over that will be discarded.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddVirtualCurrencyTypesAsync(final AddVirtualCurrencyTypesRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/AddVirtualCurrencyTypes"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        BlankResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Bans users by PlayFab ID with optional IP address, or MAC address for the provided game.
     * @param request BanUsersRequest
     * @return Async Task will return BanUsersResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> BanUsersAsync(final BanUsersRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateBanUsersAsync(request);
            }
        });
    }
    /**
     * Bans users by PlayFab ID with optional IP address, or MAC address for the provided game.
     * @param request BanUsersRequest
     * @return BanUsersResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult BanUsers(final BanUsersRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateBanUsersAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Bans users by PlayFab ID with optional IP address, or MAC address for the provided game. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateBanUsersAsync(final BanUsersRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/BanUsers"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        BanUsersResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Checks the global count for the limited edition item.
     * @param request CheckLimitedEditionItemAvailabilityRequest
     * @return Async Task will return CheckLimitedEditionItemAvailabilityResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CheckLimitedEditionItemAvailabilityAsync(final CheckLimitedEditionItemAvailabilityRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCheckLimitedEditionItemAvailabilityAsync(request);
            }
        });
    }
    /**
     * Checks the global count for the limited edition item.
     * @param request CheckLimitedEditionItemAvailabilityRequest
     * @return CheckLimitedEditionItemAvailabilityResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CheckLimitedEditionItemAvailability(final CheckLimitedEditionItemAvailabilityRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCheckLimitedEditionItemAvailabilityAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Checks the global count for the limited edition item. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCheckLimitedEditionItemAvailabilityAsync(final CheckLimitedEditionItemAvailabilityRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/CheckLimitedEditionItemAvailability"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        CheckLimitedEditionItemAvailabilityResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Create an ActionsOnPlayersInSegment task, which iterates through all players in a segment to execute action.
     * @param request CreateActionsOnPlayerSegmentTaskRequest
     * @return Async Task will return CreateTaskResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CreateActionsOnPlayersInSegmentTaskAsync(final CreateActionsOnPlayerSegmentTaskRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateActionsOnPlayersInSegmentTaskAsync(request);
            }
        });
    }
    /**
     * Create an ActionsOnPlayersInSegment task, which iterates through all players in a segment to execute action.
     * @param request CreateActionsOnPlayerSegmentTaskRequest
     * @return CreateTaskResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CreateActionsOnPlayersInSegmentTask(final CreateActionsOnPlayerSegmentTaskRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateActionsOnPlayersInSegmentTaskAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Create an ActionsOnPlayersInSegment task, which iterates through all players in a segment to execute action. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCreateActionsOnPlayersInSegmentTaskAsync(final CreateActionsOnPlayerSegmentTaskRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/CreateActionsOnPlayersInSegmentTask"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        CreateTaskResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Create a CloudScript task, which can run a CloudScript on a schedule.
     * @param request CreateCloudScriptTaskRequest
     * @return Async Task will return CreateTaskResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CreateCloudScriptTaskAsync(final CreateCloudScriptTaskRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateCloudScriptTaskAsync(request);
            }
        });
    }
    /**
     * Create a CloudScript task, which can run a CloudScript on a schedule.
     * @param request CreateCloudScriptTaskRequest
     * @return CreateTaskResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CreateCloudScriptTask(final CreateCloudScriptTaskRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateCloudScriptTaskAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Create a CloudScript task, which can run a CloudScript on a schedule. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCreateCloudScriptTaskAsync(final CreateCloudScriptTaskRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/CreateCloudScriptTask"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        CreateTaskResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Create a Insights Scheduled Scaling task, which can scale Insights Performance Units on a schedule
     * @param request CreateInsightsScheduledScalingTaskRequest
     * @return Async Task will return CreateTaskResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CreateInsightsScheduledScalingTaskAsync(final CreateInsightsScheduledScalingTaskRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateInsightsScheduledScalingTaskAsync(request);
            }
        });
    }
    /**
     * Create a Insights Scheduled Scaling task, which can scale Insights Performance Units on a schedule
     * @param request CreateInsightsScheduledScalingTaskRequest
     * @return CreateTaskResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CreateInsightsScheduledScalingTask(final CreateInsightsScheduledScalingTaskRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateInsightsScheduledScalingTaskAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Create a Insights Scheduled Scaling task, which can scale Insights Performance Units on a schedule */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCreateInsightsScheduledScalingTaskAsync(final CreateInsightsScheduledScalingTaskRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/CreateInsightsScheduledScalingTask"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        CreateTaskResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Registers a relationship between a title and an Open ID Connect provider.
     * @param request CreateOpenIdConnectionRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CreateOpenIdConnectionAsync(final CreateOpenIdConnectionRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateOpenIdConnectionAsync(request);
            }
        });
    }
    /**
     * Registers a relationship between a title and an Open ID Connect provider.
     * @param request CreateOpenIdConnectionRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CreateOpenIdConnection(final CreateOpenIdConnectionRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateOpenIdConnectionAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Registers a relationship between a title and an Open ID Connect provider. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCreateOpenIdConnectionAsync(final CreateOpenIdConnectionRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/CreateOpenIdConnection"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        EmptyResponse result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Creates a new Player Shared Secret Key. It may take up to 5 minutes for this key to become generally available after
     * this API returns.
     * @param request CreatePlayerSharedSecretRequest
     * @return Async Task will return CreatePlayerSharedSecretResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CreatePlayerSharedSecretAsync(final CreatePlayerSharedSecretRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreatePlayerSharedSecretAsync(request);
            }
        });
    }
    /**
     * Creates a new Player Shared Secret Key. It may take up to 5 minutes for this key to become generally available after
     * this API returns.
     * @param request CreatePlayerSharedSecretRequest
     * @return CreatePlayerSharedSecretResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CreatePlayerSharedSecret(final CreatePlayerSharedSecretRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreatePlayerSharedSecretAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /**
     * Creates a new Player Shared Secret Key. It may take up to 5 minutes for this key to become generally available after
     * this API returns.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCreatePlayerSharedSecretAsync(final CreatePlayerSharedSecretRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/CreatePlayerSharedSecret"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        CreatePlayerSharedSecretResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval
     * and an aggregation method.
     * @param request CreatePlayerStatisticDefinitionRequest
     * @return Async Task will return CreatePlayerStatisticDefinitionResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CreatePlayerStatisticDefinitionAsync(final CreatePlayerStatisticDefinitionRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreatePlayerStatisticDefinitionAsync(request);
            }
        });
    }
    /**
     * Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval
     * and an aggregation method.
     * @param request CreatePlayerStatisticDefinitionRequest
     * @return CreatePlayerStatisticDefinitionResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CreatePlayerStatisticDefinition(final CreatePlayerStatisticDefinitionRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreatePlayerStatisticDefinitionAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /**
     * Adds a new player statistic configuration to the title, optionally allowing the developer to specify a reset interval
     * and an aggregation method.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCreatePlayerStatisticDefinitionAsync(final CreatePlayerStatisticDefinitionRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Admin/CreatePlayerStatisticDefinition"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
        task.run();
        Object httpResult = task.get();
        if (httpResult instanceof PlayFabError) {
            PlayFabError error = (PlayFabError)httpResult;
            if (PlayFabSettings.GlobalErrorHandler != null)
                PlayFabSettings.GlobalErrorHandler.callback(error);
            PlayFabResult result = new PlayFabResult();
            result.Error = error;
            return result;
        }
        String resultRawJson = (String) httpResult;
        PlayFabJsonSuccess resultData = gson.fromJson(resultRawJson, new TypeToken>(){}.getType());
        CreatePlayerStatisticDefinitionResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Delete a content file from the title. When deleting a file that does not exist, it returns success.
     * @param request DeleteContentRequest
     * @return Async Task will return BlankResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> DeleteContentAsync(final DeleteContentRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteContentAsync(request);
            }
        });
    }
    /**
     * Delete a content file from the title. When deleting a file that does not exist, it returns success.
     * @param request DeleteContentRequest
     * @return BlankResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult DeleteContent(final DeleteContentRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteContentAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            PlayFabResult exceptionResult = new PlayFabResult();
            exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
            return exceptionResult;
        }
    }
    /** Delete a content file from the title. When deleting a file that does not exist, it returns success. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateDeleteContentAsync(final DeleteContentRequest request) throws Exception {
        if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
        FutureTask