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 EmptyResult
     */
    @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 EmptyResult
     */
    @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) {
            return null;
        }
    }
    /** 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());
        EmptyResult 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) {
            return null;
        }
    }
    /** 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) {
            return null;
        }
    }
    /** 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) {
            return null;
        }
    }
    /**
     * 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) {
            return null;
        }
    }
    /** 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) {
            return null;
        }
    }
    /**
     * 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) {
            return null;
        }
    }
    /** 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) {
            return null;
        }
    }
    /** 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) {
            return null;
        }
    }
    /** 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) {
            return null;
        }
    }
    /** 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;
    }
    /**
     * 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) {
            return null;
        }
    }
    /**
     * 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) {
            return null;
        }
    }
    /**
     * 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) {
            return null;
        }
    }
    /** 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 task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/DeleteContent", 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;
    }
    /**
     * Removes a master player account entirely from all titles and deletes all associated data
     * @param request DeleteMasterPlayerAccountRequest
     * @return Async Task will return DeleteMasterPlayerAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> DeleteMasterPlayerAccountAsync(final DeleteMasterPlayerAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteMasterPlayerAccountAsync(request);
            }
        });
    }
    /**
     * Removes a master player account entirely from all titles and deletes all associated data
     * @param request DeleteMasterPlayerAccountRequest
     * @return DeleteMasterPlayerAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult DeleteMasterPlayerAccount(final DeleteMasterPlayerAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteMasterPlayerAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }
    /** Removes a master player account entirely from all titles and deletes all associated data */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateDeleteMasterPlayerAccountAsync(final DeleteMasterPlayerAccountRequest 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/DeleteMasterPlayerAccount", 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());
        DeleteMasterPlayerAccountResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Removes a user's player account from a title and deletes all associated data
     * @param request DeletePlayerRequest
     * @return Async Task will return DeletePlayerResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> DeletePlayerAsync(final DeletePlayerRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeletePlayerAsync(request);
            }
        });
    }
    /**
     * Removes a user's player account from a title and deletes all associated data
     * @param request DeletePlayerRequest
     * @return DeletePlayerResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult DeletePlayer(final DeletePlayerRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeletePlayerAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }
    /** Removes a user's player account from a title and deletes all associated data */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateDeletePlayerAsync(final DeletePlayerRequest 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/DeletePlayer", 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());
        DeletePlayerResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Deletes an existing Player Shared Secret Key. It may take up to 5 minutes for this delete to be reflected after this API
     * returns.
     * @param request DeletePlayerSharedSecretRequest
     * @return Async Task will return DeletePlayerSharedSecretResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> DeletePlayerSharedSecretAsync(final DeletePlayerSharedSecretRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeletePlayerSharedSecretAsync(request);
            }
        });
    }
    /**
     * Deletes an existing Player Shared Secret Key. It may take up to 5 minutes for this delete to be reflected after this API
     * returns.
     * @param request DeletePlayerSharedSecretRequest
     * @return DeletePlayerSharedSecretResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult DeletePlayerSharedSecret(final DeletePlayerSharedSecretRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeletePlayerSharedSecretAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }
    /**
     * Deletes an existing Player Shared Secret Key. It may take up to 5 minutes for this delete to be reflected after this API
     * returns.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateDeletePlayerSharedSecretAsync(final DeletePlayerSharedSecretRequest 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/DeletePlayerSharedSecret", 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());
        DeletePlayerSharedSecretResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Deletes an existing virtual item store
     * @param request DeleteStoreRequest
     * @return Async Task will return DeleteStoreResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> DeleteStoreAsync(final DeleteStoreRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteStoreAsync(request);
            }
        });
    }
    /**
     * Deletes an existing virtual item store
     * @param request DeleteStoreRequest
     * @return DeleteStoreResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult DeleteStore(final DeleteStoreRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteStoreAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }
    /** Deletes an existing virtual item store */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateDeleteStoreAsync(final DeleteStoreRequest 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/DeleteStore", 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());
        DeleteStoreResult result = resultData.data;
        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }
    /**
     * Delete a task.
     * @param request DeleteTaskRequest
     * @return Async Task will return EmptyResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> DeleteTaskAsync(final DeleteTaskRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteTaskAsync(request);
            }
        });
    }
    /**
     * Delete a task.
     * @param request DeleteTaskRequest
     * @return EmptyResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult DeleteTask(final DeleteTaskRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteTaskAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }
    /** Delete a task. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateDeleteTaskAsync(final DeleteTaskRequest 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/DeleteTask", 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());
        EmptyResult result = resultData.data;
        PlayFabResult