All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.playfab.PlayFabClientAPI Maven / Gradle / Ivy

Go to download

PlayFab is the unified backend platform for games — everything you need to build and operate your game, all in one place, so you can focus on creating and delivering a great player experience.

There is a newer version: 0.122.201027
Show newest version
package com.playfab;

import com.playfab.internal.*;
import com.playfab.PlayFabClientModels.*;
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 which provide the full range of PlayFab features available to the client - authentication, account and data
     * management, inventory, friends, matchmaking, reporting, and platform-specific functionality
     */
public class PlayFabClientAPI {
    private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();

    /**
     * Accepts an open trade (one that has not yet been accepted or cancelled), if the locally signed-in player is in the
     * allowed player list for the trade, or it is open to all players. If the call is successful, the offered and accepted
     * items will be swapped between the two players' inventories.
     * @param request AcceptTradeRequest
     * @return Async Task will return AcceptTradeResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AcceptTradeAsync(final AcceptTradeRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAcceptTradeAsync(request);
            }
        });
    }

    /**
     * Accepts an open trade (one that has not yet been accepted or cancelled), if the locally signed-in player is in the
     * allowed player list for the trade, or it is open to all players. If the call is successful, the offered and accepted
     * items will be swapped between the two players' inventories.
     * @param request AcceptTradeRequest
     * @return AcceptTradeResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AcceptTrade(final AcceptTradeRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAcceptTradeAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Accepts an open trade (one that has not yet been accepted or cancelled), if the locally signed-in player is in the
     * allowed player list for the trade, or it is open to all players. If the call is successful, the offered and accepted
     * items will be swapped between the two players' inventories.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAcceptTradeAsync(final AcceptTradeRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/AcceptTrade"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        AcceptTradeResponse result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Adds the PlayFab user, based upon a match against a supplied unique identifier, to the friend list of the local user. At
     * least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized.
     * @param request AddFriendRequest
     * @return Async Task will return AddFriendResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AddFriendAsync(final AddFriendRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddFriendAsync(request);
            }
        });
    }

    /**
     * Adds the PlayFab user, based upon a match against a supplied unique identifier, to the friend list of the local user. At
     * least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized.
     * @param request AddFriendRequest
     * @return AddFriendResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AddFriend(final AddFriendRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddFriendAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Adds the PlayFab user, based upon a match against a supplied unique identifier, to the friend list of the local user. At
     * least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddFriendAsync(final AddFriendRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/AddFriend"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        AddFriendResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab
     * ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as
     * authentication credentials, as the intent is that it is easily accessible by other players.
     * @param request AddGenericIDRequest
     * @return Async Task will return AddGenericIDResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AddGenericIDAsync(final AddGenericIDRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddGenericIDAsync(request);
            }
        });
    }

    /**
     * Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab
     * ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as
     * authentication credentials, as the intent is that it is easily accessible by other players.
     * @param request AddGenericIDRequest
     * @return AddGenericIDResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AddGenericID(final AddGenericIDRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddGenericIDAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab
     * ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as
     * authentication credentials, as the intent is that it is easily accessible by other players.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddGenericIDAsync(final AddGenericIDRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/AddGenericID"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        AddGenericIDResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Adds or updates a contact email to the player's profile.
     * @param request AddOrUpdateContactEmailRequest
     * @return Async Task will return AddOrUpdateContactEmailResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AddOrUpdateContactEmailAsync(final AddOrUpdateContactEmailRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddOrUpdateContactEmailAsync(request);
            }
        });
    }

    /**
     * Adds or updates a contact email to the player's profile.
     * @param request AddOrUpdateContactEmailRequest
     * @return AddOrUpdateContactEmailResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AddOrUpdateContactEmail(final AddOrUpdateContactEmailRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddOrUpdateContactEmailAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Adds or updates a contact email to the player's profile. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddOrUpdateContactEmailAsync(final AddOrUpdateContactEmailRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/AddOrUpdateContactEmail"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        AddOrUpdateContactEmailResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Adds users to the set of those able to update both the shared data, as well as the set of users in the group. Only users
     * in the group can add new members. Shared Groups are designed for sharing data between a very small number of players,
     * please see our guide: https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     * @param request AddSharedGroupMembersRequest
     * @return Async Task will return AddSharedGroupMembersResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AddSharedGroupMembersAsync(final AddSharedGroupMembersRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddSharedGroupMembersAsync(request);
            }
        });
    }

    /**
     * Adds users to the set of those able to update both the shared data, as well as the set of users in the group. Only users
     * in the group can add new members. Shared Groups are designed for sharing data between a very small number of players,
     * please see our guide: https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     * @param request AddSharedGroupMembersRequest
     * @return AddSharedGroupMembersResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AddSharedGroupMembers(final AddSharedGroupMembersRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddSharedGroupMembersAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Adds users to the set of those able to update both the shared data, as well as the set of users in the group. Only users
     * in the group can add new members. Shared Groups are designed for sharing data between a very small number of players,
     * please see our guide: https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddSharedGroupMembersAsync(final AddSharedGroupMembersRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/AddSharedGroupMembers"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        AddSharedGroupMembersResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Adds playfab username/password auth to an existing account created via an anonymous auth method, e.g. automatic device
     * ID login.
     * @param request AddUsernamePasswordRequest
     * @return Async Task will return AddUsernamePasswordResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AddUsernamePasswordAsync(final AddUsernamePasswordRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddUsernamePasswordAsync(request);
            }
        });
    }

    /**
     * Adds playfab username/password auth to an existing account created via an anonymous auth method, e.g. automatic device
     * ID login.
     * @param request AddUsernamePasswordRequest
     * @return AddUsernamePasswordResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AddUsernamePassword(final AddUsernamePasswordRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAddUsernamePasswordAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Adds playfab username/password auth to an existing account created via an anonymous auth method, e.g. automatic device
     * ID login.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddUsernamePasswordAsync(final AddUsernamePasswordRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/AddUsernamePassword"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        AddUsernamePasswordResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Increments the user's balance of 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 user's balance of 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 user's balance of the specified virtual currency by the stated amount */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAddUserVirtualCurrencyAsync(final AddUserVirtualCurrencyRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/AddUserVirtualCurrency"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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;
    }

    /**
     * Registers the Android device to receive push notifications
     * @param request AndroidDevicePushNotificationRegistrationRequest
     * @return Async Task will return AndroidDevicePushNotificationRegistrationResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AndroidDevicePushNotificationRegistrationAsync(final AndroidDevicePushNotificationRegistrationRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAndroidDevicePushNotificationRegistrationAsync(request);
            }
        });
    }

    /**
     * Registers the Android device to receive push notifications
     * @param request AndroidDevicePushNotificationRegistrationRequest
     * @return AndroidDevicePushNotificationRegistrationResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AndroidDevicePushNotificationRegistration(final AndroidDevicePushNotificationRegistrationRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAndroidDevicePushNotificationRegistrationAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Registers the Android device to receive push notifications */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAndroidDevicePushNotificationRegistrationAsync(final AndroidDevicePushNotificationRegistrationRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/AndroidDevicePushNotificationRegistration"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        AndroidDevicePushNotificationRegistrationResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Attributes an install for advertisment.
     * @param request AttributeInstallRequest
     * @return Async Task will return AttributeInstallResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> AttributeInstallAsync(final AttributeInstallRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAttributeInstallAsync(request);
            }
        });
    }

    /**
     * Attributes an install for advertisment.
     * @param request AttributeInstallRequest
     * @return AttributeInstallResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult AttributeInstall(final AttributeInstallRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateAttributeInstallAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Attributes an install for advertisment. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateAttributeInstallAsync(final AttributeInstallRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/AttributeInstall"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        AttributeInstallResult result = resultData.data;
        // Modify AdvertisingIdType:  Prevents us from sending the id multiple times, and allows automated tests to determine id was sent successfully
        PlayFabSettings.AdvertisingIdType += "_Successful";

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Cancels an open trade (one that has not yet been accepted or cancelled). Note that only the player who created the trade
     * can cancel it via this API call, to prevent griefing of the trade system (cancelling trades in order to prevent other
     * players from accepting them, for trades that can be claimed by more than one player).
     * @param request CancelTradeRequest
     * @return Async Task will return CancelTradeResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CancelTradeAsync(final CancelTradeRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCancelTradeAsync(request);
            }
        });
    }

    /**
     * Cancels an open trade (one that has not yet been accepted or cancelled). Note that only the player who created the trade
     * can cancel it via this API call, to prevent griefing of the trade system (cancelling trades in order to prevent other
     * players from accepting them, for trades that can be claimed by more than one player).
     * @param request CancelTradeRequest
     * @return CancelTradeResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CancelTrade(final CancelTradeRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCancelTradeAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Cancels an open trade (one that has not yet been accepted or cancelled). Note that only the player who created the trade
     * can cancel it via this API call, to prevent griefing of the trade system (cancelling trades in order to prevent other
     * players from accepting them, for trades that can be claimed by more than one player).
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCancelTradeAsync(final CancelTradeRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/CancelTrade"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        CancelTradeResponse result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and virtual
     * currency balances as appropriate
     * @param request ConfirmPurchaseRequest
     * @return Async Task will return ConfirmPurchaseResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ConfirmPurchaseAsync(final ConfirmPurchaseRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateConfirmPurchaseAsync(request);
            }
        });
    }

    /**
     * Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and virtual
     * currency balances as appropriate
     * @param request ConfirmPurchaseRequest
     * @return ConfirmPurchaseResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ConfirmPurchase(final ConfirmPurchaseRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateConfirmPurchaseAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and virtual
     * currency balances as appropriate
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateConfirmPurchaseAsync(final ConfirmPurchaseRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ConfirmPurchase"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        ConfirmPurchaseResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Consume uses of a consumable item. When all uses are consumed, it will be removed from the player's inventory.
     * @param request ConsumeItemRequest
     * @return Async Task will return ConsumeItemResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ConsumeItemAsync(final ConsumeItemRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateConsumeItemAsync(request);
            }
        });
    }

    /**
     * Consume uses of a consumable item. When all uses are consumed, it will be removed from the player's inventory.
     * @param request ConsumeItemRequest
     * @return ConsumeItemResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ConsumeItem(final ConsumeItemRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateConsumeItemAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Consume uses of a consumable item. When all uses are consumed, it will be removed from the player's inventory. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateConsumeItemAsync(final ConsumeItemRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ConsumeItem"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        ConsumeItemResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items
     * @param request ConsumePSNEntitlementsRequest
     * @return Async Task will return ConsumePSNEntitlementsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ConsumePSNEntitlementsAsync(final ConsumePSNEntitlementsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateConsumePSNEntitlementsAsync(request);
            }
        });
    }

    /**
     * Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items
     * @param request ConsumePSNEntitlementsRequest
     * @return ConsumePSNEntitlementsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ConsumePSNEntitlements(final ConsumePSNEntitlementsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateConsumePSNEntitlementsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateConsumePSNEntitlementsAsync(final ConsumePSNEntitlementsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ConsumePSNEntitlements"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        ConsumePSNEntitlementsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Grants the player's current entitlements from Xbox Live, consuming all availble items in Xbox and granting them to the
     * player's PlayFab inventory. This call is idempotent and will not grant previously granted items to the player.
     * @param request ConsumeXboxEntitlementsRequest
     * @return Async Task will return ConsumeXboxEntitlementsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ConsumeXboxEntitlementsAsync(final ConsumeXboxEntitlementsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateConsumeXboxEntitlementsAsync(request);
            }
        });
    }

    /**
     * Grants the player's current entitlements from Xbox Live, consuming all availble items in Xbox and granting them to the
     * player's PlayFab inventory. This call is idempotent and will not grant previously granted items to the player.
     * @param request ConsumeXboxEntitlementsRequest
     * @return ConsumeXboxEntitlementsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ConsumeXboxEntitlements(final ConsumeXboxEntitlementsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateConsumeXboxEntitlementsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Grants the player's current entitlements from Xbox Live, consuming all availble items in Xbox and granting them to the
     * player's PlayFab inventory. This call is idempotent and will not grant previously granted items to the player.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateConsumeXboxEntitlementsAsync(final ConsumeXboxEntitlementsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ConsumeXboxEntitlements"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        ConsumeXboxEntitlementsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Requests the creation of a shared group object, containing key/value pairs which may be updated by all members of the
     * group. Upon creation, the current user will be the only member of the group. Shared Groups are designed for sharing data
     * between a very small number of players, please see our guide:
     * https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     * @param request CreateSharedGroupRequest
     * @return Async Task will return CreateSharedGroupResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CreateSharedGroupAsync(final CreateSharedGroupRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateSharedGroupAsync(request);
            }
        });
    }

    /**
     * Requests the creation of a shared group object, containing key/value pairs which may be updated by all members of the
     * group. Upon creation, the current user will be the only member of the group. Shared Groups are designed for sharing data
     * between a very small number of players, please see our guide:
     * https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     * @param request CreateSharedGroupRequest
     * @return CreateSharedGroupResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CreateSharedGroup(final CreateSharedGroupRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateSharedGroupAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Requests the creation of a shared group object, containing key/value pairs which may be updated by all members of the
     * group. Upon creation, the current user will be the only member of the group. Shared Groups are designed for sharing data
     * between a very small number of players, please see our guide:
     * https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCreateSharedGroupAsync(final CreateSharedGroupRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/CreateSharedGroup"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        CreateSharedGroupResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Executes a CloudScript function, with the 'currentPlayerId' set to the PlayFab ID of the authenticated player.
     * @param request ExecuteCloudScriptRequest
     * @return Async Task will return ExecuteCloudScriptResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ExecuteCloudScriptAsync(final ExecuteCloudScriptRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateExecuteCloudScriptAsync(request);
            }
        });
    }

    /**
     * Executes a CloudScript function, with the 'currentPlayerId' set to the PlayFab ID of the authenticated player.
     * @param request ExecuteCloudScriptRequest
     * @return ExecuteCloudScriptResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ExecuteCloudScript(final ExecuteCloudScriptRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateExecuteCloudScriptAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Executes a CloudScript function, with the 'currentPlayerId' set to the PlayFab ID of the authenticated player. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateExecuteCloudScriptAsync(final ExecuteCloudScriptRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ExecuteCloudScript"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        ExecuteCloudScriptResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the user's PlayFab account details
     * @param request GetAccountInfoRequest
     * @return Async Task will return GetAccountInfoResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetAccountInfoAsync(final GetAccountInfoRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetAccountInfoAsync(request);
            }
        });
    }

    /**
     * Retrieves the user's PlayFab account details
     * @param request GetAccountInfoRequest
     * @return GetAccountInfoResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetAccountInfo(final GetAccountInfoRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetAccountInfoAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the user's PlayFab account details */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetAccountInfoAsync(final GetAccountInfoRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetAccountInfo"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetAccountInfoResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be
     * evaluated with the parent PlayFabId to guarantee uniqueness.
     * @param request ListUsersCharactersRequest
     * @return Async Task will return ListUsersCharactersResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetAllUsersCharactersAsync(final ListUsersCharactersRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetAllUsersCharactersAsync(request);
            }
        });
    }

    /**
     * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be
     * evaluated with the parent PlayFabId to guarantee uniqueness.
     * @param request ListUsersCharactersRequest
     * @return ListUsersCharactersResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetAllUsersCharacters(final ListUsersCharactersRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetAllUsersCharactersAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be
     * evaluated with the parent PlayFabId to guarantee uniqueness.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetAllUsersCharactersAsync(final ListUsersCharactersRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetAllUsersCharacters"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        ListUsersCharactersResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the specified version of the title's catalog of virtual goods, including all defined properties
     * @param request GetCatalogItemsRequest
     * @return Async Task will return GetCatalogItemsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetCatalogItemsAsync(final GetCatalogItemsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCatalogItemsAsync(request);
            }
        });
    }

    /**
     * Retrieves the specified version of the title's catalog of virtual goods, including all defined properties
     * @param request GetCatalogItemsRequest
     * @return GetCatalogItemsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetCatalogItems(final GetCatalogItemsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCatalogItemsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the specified version of the title's catalog of virtual goods, including all defined properties */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetCatalogItemsAsync(final GetCatalogItemsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetCatalogItems"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetCatalogItemsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the title-specific custom data for the character which is readable and writable by the client
     * @param request GetCharacterDataRequest
     * @return Async Task will return GetCharacterDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetCharacterDataAsync(final GetCharacterDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCharacterDataAsync(request);
            }
        });
    }

    /**
     * Retrieves the title-specific custom data for the character which is readable and writable by the client
     * @param request GetCharacterDataRequest
     * @return GetCharacterDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetCharacterData(final GetCharacterDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCharacterDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the title-specific custom data for the character which is readable and writable by the client */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetCharacterDataAsync(final GetCharacterDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetCharacterData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetCharacterDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the specified character's current inventory of virtual goods
     * @param request GetCharacterInventoryRequest
     * @return Async Task will return GetCharacterInventoryResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetCharacterInventoryAsync(final GetCharacterInventoryRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCharacterInventoryAsync(request);
            }
        });
    }

    /**
     * Retrieves the specified character's current inventory of virtual goods
     * @param request GetCharacterInventoryRequest
     * @return GetCharacterInventoryResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetCharacterInventory(final GetCharacterInventoryRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCharacterInventoryAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the specified character's current inventory of virtual goods */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetCharacterInventoryAsync(final GetCharacterInventoryRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetCharacterInventory"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetCharacterInventoryResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard
     * @param request GetCharacterLeaderboardRequest
     * @return Async Task will return GetCharacterLeaderboardResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetCharacterLeaderboardAsync(final GetCharacterLeaderboardRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCharacterLeaderboardAsync(request);
            }
        });
    }

    /**
     * Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard
     * @param request GetCharacterLeaderboardRequest
     * @return GetCharacterLeaderboardResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetCharacterLeaderboard(final GetCharacterLeaderboardRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCharacterLeaderboardAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetCharacterLeaderboardAsync(final GetCharacterLeaderboardRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetCharacterLeaderboard"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetCharacterLeaderboardResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the title-specific custom data for the character which can only be read by the client
     * @param request GetCharacterDataRequest
     * @return Async Task will return GetCharacterDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetCharacterReadOnlyDataAsync(final GetCharacterDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCharacterReadOnlyDataAsync(request);
            }
        });
    }

    /**
     * Retrieves the title-specific custom data for the character which can only be read by the client
     * @param request GetCharacterDataRequest
     * @return GetCharacterDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetCharacterReadOnlyData(final GetCharacterDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCharacterReadOnlyDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the title-specific custom data for the character which can only be read by the client */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetCharacterReadOnlyDataAsync(final GetCharacterDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetCharacterReadOnlyData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetCharacterDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the details of all title-specific statistics for the user
     * @param request GetCharacterStatisticsRequest
     * @return Async Task will return GetCharacterStatisticsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetCharacterStatisticsAsync(final GetCharacterStatisticsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCharacterStatisticsAsync(request);
            }
        });
    }

    /**
     * Retrieves the details of all title-specific statistics for the user
     * @param request GetCharacterStatisticsRequest
     * @return GetCharacterStatisticsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetCharacterStatistics(final GetCharacterStatisticsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCharacterStatisticsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the details of all title-specific statistics for the user */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetCharacterStatisticsAsync(final GetCharacterStatisticsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetCharacterStatistics"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetCharacterStatisticsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned
     * URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the
     * content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded,
     * the query to retrieve the data will fail. See this post for more information:
     * https://community.playfab.com/hc/en-us/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service. Also,
     * please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN rates apply.
     * @param request GetContentDownloadUrlRequest
     * @return Async Task will return GetContentDownloadUrlResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetContentDownloadUrlAsync(request);
            }
        });
    }

    /**
     * This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned
     * URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the
     * content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded,
     * the query to retrieve the data will fail. See this post for more information:
     * https://community.playfab.com/hc/en-us/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service. Also,
     * please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN rates apply.
     * @param request GetContentDownloadUrlRequest
     * @return GetContentDownloadUrlResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetContentDownloadUrl(final GetContentDownloadUrlRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetContentDownloadUrlAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned
     * URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the
     * content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded,
     * the query to retrieve the data will fail. See this post for more information:
     * https://community.playfab.com/hc/en-us/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service. Also,
     * please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN rates apply.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetContentDownloadUrlAsync(final GetContentDownloadUrlRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetContentDownloadUrl"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetContentDownloadUrlResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Get details about all current running game servers matching the given parameters.
     * @param request CurrentGamesRequest
     * @return Async Task will return CurrentGamesResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetCurrentGamesAsync(final CurrentGamesRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCurrentGamesAsync(request);
            }
        });
    }

    /**
     * Get details about all current running game servers matching the given parameters.
     * @param request CurrentGamesRequest
     * @return CurrentGamesResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetCurrentGames(final CurrentGamesRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetCurrentGamesAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Get details about all current running game servers matching the given parameters. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetCurrentGamesAsync(final CurrentGamesRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetCurrentGames"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        CurrentGamesResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves a list of ranked friends of the current player for the given statistic, starting from the indicated point in
     * the leaderboard
     * @param request GetFriendLeaderboardRequest
     * @return Async Task will return GetLeaderboardResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetFriendLeaderboardAsync(final GetFriendLeaderboardRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetFriendLeaderboardAsync(request);
            }
        });
    }

    /**
     * Retrieves a list of ranked friends of the current player for the given statistic, starting from the indicated point in
     * the leaderboard
     * @param request GetFriendLeaderboardRequest
     * @return GetLeaderboardResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetFriendLeaderboard(final GetFriendLeaderboardRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetFriendLeaderboardAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves a list of ranked friends of the current player for the given statistic, starting from the indicated point in
     * the leaderboard
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetFriendLeaderboardAsync(final GetFriendLeaderboardRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetFriendLeaderboard"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetLeaderboardResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves a list of ranked friends of the current player for the given statistic, centered on the requested PlayFab
     * user. If PlayFabId is empty or null will return currently logged in user.
     * @param request GetFriendLeaderboardAroundPlayerRequest
     * @return Async Task will return GetFriendLeaderboardAroundPlayerResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetFriendLeaderboardAroundPlayerAsync(final GetFriendLeaderboardAroundPlayerRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetFriendLeaderboardAroundPlayerAsync(request);
            }
        });
    }

    /**
     * Retrieves a list of ranked friends of the current player for the given statistic, centered on the requested PlayFab
     * user. If PlayFabId is empty or null will return currently logged in user.
     * @param request GetFriendLeaderboardAroundPlayerRequest
     * @return GetFriendLeaderboardAroundPlayerResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetFriendLeaderboardAroundPlayer(final GetFriendLeaderboardAroundPlayerRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetFriendLeaderboardAroundPlayerAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves a list of ranked friends of the current player for the given statistic, centered on the requested PlayFab
     * user. If PlayFabId is empty or null will return currently logged in user.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetFriendLeaderboardAroundPlayerAsync(final GetFriendLeaderboardAroundPlayerRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetFriendLeaderboardAroundPlayer"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetFriendLeaderboardAroundPlayerResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the current friend list for the local user, constrained to users who have PlayFab accounts. Friends from
     * linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends.
     * @param request GetFriendsListRequest
     * @return Async Task will return GetFriendsListResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetFriendsListAsync(final GetFriendsListRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetFriendsListAsync(request);
            }
        });
    }

    /**
     * Retrieves the current friend list for the local user, constrained to users who have PlayFab accounts. Friends from
     * linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends.
     * @param request GetFriendsListRequest
     * @return GetFriendsListResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetFriendsList(final GetFriendsListRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetFriendsListAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves the current friend list for the local user, constrained to users who have PlayFab accounts. Friends from
     * linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetFriendsListAsync(final GetFriendsListRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetFriendsList"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetFriendsListResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Get details about the regions hosting game servers matching the given parameters.
     * @param request GameServerRegionsRequest
     * @return Async Task will return GameServerRegionsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetGameServerRegionsAsync(final GameServerRegionsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetGameServerRegionsAsync(request);
            }
        });
    }

    /**
     * Get details about the regions hosting game servers matching the given parameters.
     * @param request GameServerRegionsRequest
     * @return GameServerRegionsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetGameServerRegions(final GameServerRegionsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetGameServerRegionsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Get details about the regions hosting game servers matching the given parameters. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetGameServerRegionsAsync(final GameServerRegionsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetGameServerRegions"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GameServerRegionsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard
     * @param request GetLeaderboardRequest
     * @return Async Task will return GetLeaderboardResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetLeaderboardAsync(final GetLeaderboardRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetLeaderboardAsync(request);
            }
        });
    }

    /**
     * Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard
     * @param request GetLeaderboardRequest
     * @return GetLeaderboardResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetLeaderboard(final GetLeaderboardRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetLeaderboardAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetLeaderboardAsync(final GetLeaderboardRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetLeaderboard"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetLeaderboardResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves a list of ranked characters for the given statistic, centered on the requested Character ID
     * @param request GetLeaderboardAroundCharacterRequest
     * @return Async Task will return GetLeaderboardAroundCharacterResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetLeaderboardAroundCharacterAsync(final GetLeaderboardAroundCharacterRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetLeaderboardAroundCharacterAsync(request);
            }
        });
    }

    /**
     * Retrieves a list of ranked characters for the given statistic, centered on the requested Character ID
     * @param request GetLeaderboardAroundCharacterRequest
     * @return GetLeaderboardAroundCharacterResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetLeaderboardAroundCharacter(final GetLeaderboardAroundCharacterRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetLeaderboardAroundCharacterAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves a list of ranked characters for the given statistic, centered on the requested Character ID */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetLeaderboardAroundCharacterAsync(final GetLeaderboardAroundCharacterRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetLeaderboardAroundCharacter"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetLeaderboardAroundCharacterResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or
     * null will return currently logged in user.
     * @param request GetLeaderboardAroundPlayerRequest
     * @return Async Task will return GetLeaderboardAroundPlayerResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetLeaderboardAroundPlayerAsync(final GetLeaderboardAroundPlayerRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetLeaderboardAroundPlayerAsync(request);
            }
        });
    }

    /**
     * Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or
     * null will return currently logged in user.
     * @param request GetLeaderboardAroundPlayerRequest
     * @return GetLeaderboardAroundPlayerResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetLeaderboardAroundPlayer(final GetLeaderboardAroundPlayerRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetLeaderboardAroundPlayerAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or
     * null will return currently logged in user.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetLeaderboardAroundPlayerAsync(final GetLeaderboardAroundPlayerRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetLeaderboardAroundPlayer"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetLeaderboardAroundPlayerResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves a list of all of the user's characters for the given statistic.
     * @param request GetLeaderboardForUsersCharactersRequest
     * @return Async Task will return GetLeaderboardForUsersCharactersResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetLeaderboardForUserCharactersAsync(final GetLeaderboardForUsersCharactersRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetLeaderboardForUserCharactersAsync(request);
            }
        });
    }

    /**
     * Retrieves a list of all of the user's characters for the given statistic.
     * @param request GetLeaderboardForUsersCharactersRequest
     * @return GetLeaderboardForUsersCharactersResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetLeaderboardForUserCharacters(final GetLeaderboardForUsersCharactersRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetLeaderboardForUserCharactersAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves a list of all of the user's characters for the given statistic. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetLeaderboardForUserCharactersAsync(final GetLeaderboardForUsersCharactersRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetLeaderboardForUserCharacters"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetLeaderboardForUsersCharactersResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * For payments flows where the provider requires playfab (the fulfiller) to initiate the transaction, but the client
     * completes the rest of the flow. In the Xsolla case, the token returned here will be passed to Xsolla by the client to
     * create a cart. Poll GetPurchase using the returned OrderId once you've completed the payment.
     * @param request GetPaymentTokenRequest
     * @return Async Task will return GetPaymentTokenResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPaymentTokenAsync(final GetPaymentTokenRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPaymentTokenAsync(request);
            }
        });
    }

    /**
     * For payments flows where the provider requires playfab (the fulfiller) to initiate the transaction, but the client
     * completes the rest of the flow. In the Xsolla case, the token returned here will be passed to Xsolla by the client to
     * create a cart. Poll GetPurchase using the returned OrderId once you've completed the payment.
     * @param request GetPaymentTokenRequest
     * @return GetPaymentTokenResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPaymentToken(final GetPaymentTokenRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPaymentTokenAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * For payments flows where the provider requires playfab (the fulfiller) to initiate the transaction, but the client
     * completes the rest of the flow. In the Xsolla case, the token returned here will be passed to Xsolla by the client to
     * create a cart. Poll GetPurchase using the returned OrderId once you've completed the payment.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPaymentTokenAsync(final GetPaymentTokenRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPaymentToken"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPaymentTokenResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Gets a Photon custom authentication token that can be used to securely join the player into a Photon room. See
     * https://api.playfab.com/docs/using-photon-with-playfab/ for more details.
     * @param request GetPhotonAuthenticationTokenRequest
     * @return Async Task will return GetPhotonAuthenticationTokenResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPhotonAuthenticationTokenAsync(final GetPhotonAuthenticationTokenRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPhotonAuthenticationTokenAsync(request);
            }
        });
    }

    /**
     * Gets a Photon custom authentication token that can be used to securely join the player into a Photon room. See
     * https://api.playfab.com/docs/using-photon-with-playfab/ for more details.
     * @param request GetPhotonAuthenticationTokenRequest
     * @return GetPhotonAuthenticationTokenResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPhotonAuthenticationToken(final GetPhotonAuthenticationTokenRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPhotonAuthenticationTokenAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Gets a Photon custom authentication token that can be used to securely join the player into a Photon room. See
     * https://api.playfab.com/docs/using-photon-with-playfab/ for more details.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPhotonAuthenticationTokenAsync(final GetPhotonAuthenticationTokenRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPhotonAuthenticationToken"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPhotonAuthenticationTokenResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves all of the user's different kinds of info.
     * @param request GetPlayerCombinedInfoRequest
     * @return Async Task will return GetPlayerCombinedInfoResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayerCombinedInfoAsync(final GetPlayerCombinedInfoRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerCombinedInfoAsync(request);
            }
        });
    }

    /**
     * Retrieves all of the user's different kinds of info.
     * @param request GetPlayerCombinedInfoRequest
     * @return GetPlayerCombinedInfoResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayerCombinedInfo(final GetPlayerCombinedInfoRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerCombinedInfoAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves all of the user's different kinds of info. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayerCombinedInfoAsync(final GetPlayerCombinedInfoRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayerCombinedInfo"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayerCombinedInfoResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the player's profile
     * @param request GetPlayerProfileRequest
     * @return Async Task will return GetPlayerProfileResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayerProfileAsync(final GetPlayerProfileRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerProfileAsync(request);
            }
        });
    }

    /**
     * Retrieves the player's profile
     * @param request GetPlayerProfileRequest
     * @return GetPlayerProfileResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayerProfile(final GetPlayerProfileRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerProfileAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the player's profile */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayerProfileAsync(final GetPlayerProfileRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayerProfile"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayerProfileResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * List all segments that a player currently belongs to at this moment in time.
     * @param request GetPlayerSegmentsRequest
     * @return Async Task will return GetPlayerSegmentsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayerSegmentsAsync(final GetPlayerSegmentsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerSegmentsAsync(request);
            }
        });
    }

    /**
     * List all segments that a player currently belongs to at this moment in time.
     * @param request GetPlayerSegmentsRequest
     * @return GetPlayerSegmentsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayerSegments(final GetPlayerSegmentsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerSegmentsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** List all segments that a player currently belongs to at this moment in time. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayerSegmentsAsync(final GetPlayerSegmentsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayerSegments"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayerSegmentsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local
     * player.
     * @param request GetPlayerStatisticsRequest
     * @return Async Task will return GetPlayerStatisticsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerStatisticsAsync(request);
            }
        });
    }

    /**
     * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local
     * player.
     * @param request GetPlayerStatisticsRequest
     * @return GetPlayerStatisticsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayerStatistics(final GetPlayerStatisticsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerStatisticsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local
     * player.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayerStatisticsAsync(final GetPlayerStatisticsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayerStatistics"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayerStatisticsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the information on the available versions of the specified statistic.
     * @param request GetPlayerStatisticVersionsRequest
     * @return Async Task will return GetPlayerStatisticVersionsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerStatisticVersionsAsync(request);
            }
        });
    }

    /**
     * Retrieves the information on the available versions of the specified statistic.
     * @param request GetPlayerStatisticVersionsRequest
     * @return GetPlayerStatisticVersionsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayerStatisticVersions(final GetPlayerStatisticVersionsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerStatisticVersionsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the information on the available versions of the specified statistic. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayerStatisticVersionsAsync(final GetPlayerStatisticVersionsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayerStatisticVersions"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayerStatisticVersionsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Get all tags with a given Namespace (optional) from a player profile.
     * @param request GetPlayerTagsRequest
     * @return Async Task will return GetPlayerTagsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayerTagsAsync(final GetPlayerTagsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerTagsAsync(request);
            }
        });
    }

    /**
     * Get all tags with a given Namespace (optional) from a player profile.
     * @param request GetPlayerTagsRequest
     * @return GetPlayerTagsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayerTags(final GetPlayerTagsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerTagsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Get all tags with a given Namespace (optional) from a player profile. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayerTagsAsync(final GetPlayerTagsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayerTags"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayerTagsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Gets all trades the player has either opened or accepted, optionally filtered by trade status.
     * @param request GetPlayerTradesRequest
     * @return Async Task will return GetPlayerTradesResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayerTradesAsync(final GetPlayerTradesRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerTradesAsync(request);
            }
        });
    }

    /**
     * Gets all trades the player has either opened or accepted, optionally filtered by trade status.
     * @param request GetPlayerTradesRequest
     * @return GetPlayerTradesResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayerTrades(final GetPlayerTradesRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayerTradesAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Gets all trades the player has either opened or accepted, optionally filtered by trade status. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayerTradesAsync(final GetPlayerTradesRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayerTrades"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayerTradesResponse result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Facebook identifiers.
     * @param request GetPlayFabIDsFromFacebookIDsRequest
     * @return Async Task will return GetPlayFabIDsFromFacebookIDsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayFabIDsFromFacebookIDsAsync(final GetPlayFabIDsFromFacebookIDsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromFacebookIDsAsync(request);
            }
        });
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Facebook identifiers.
     * @param request GetPlayFabIDsFromFacebookIDsRequest
     * @return GetPlayFabIDsFromFacebookIDsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayFabIDsFromFacebookIDs(final GetPlayFabIDsFromFacebookIDsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromFacebookIDsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the unique PlayFab identifiers for the given set of Facebook identifiers. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayFabIDsFromFacebookIDsAsync(final GetPlayFabIDsFromFacebookIDsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromFacebookIDs"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayFabIDsFromFacebookIDsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Facebook Instant Game identifiers.
     * @param request GetPlayFabIDsFromFacebookInstantGamesIdsRequest
     * @return Async Task will return GetPlayFabIDsFromFacebookInstantGamesIdsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayFabIDsFromFacebookInstantGamesIdsAsync(final GetPlayFabIDsFromFacebookInstantGamesIdsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromFacebookInstantGamesIdsAsync(request);
            }
        });
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Facebook Instant Game identifiers.
     * @param request GetPlayFabIDsFromFacebookInstantGamesIdsRequest
     * @return GetPlayFabIDsFromFacebookInstantGamesIdsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayFabIDsFromFacebookInstantGamesIds(final GetPlayFabIDsFromFacebookInstantGamesIdsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromFacebookInstantGamesIdsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the unique PlayFab identifiers for the given set of Facebook Instant Game identifiers. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayFabIDsFromFacebookInstantGamesIdsAsync(final GetPlayFabIDsFromFacebookInstantGamesIdsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromFacebookInstantGamesIds"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayFabIDsFromFacebookInstantGamesIdsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Game Center identifiers (referenced in the Game Center
     * Programming Guide as the Player Identifier).
     * @param request GetPlayFabIDsFromGameCenterIDsRequest
     * @return Async Task will return GetPlayFabIDsFromGameCenterIDsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayFabIDsFromGameCenterIDsAsync(final GetPlayFabIDsFromGameCenterIDsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromGameCenterIDsAsync(request);
            }
        });
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Game Center identifiers (referenced in the Game Center
     * Programming Guide as the Player Identifier).
     * @param request GetPlayFabIDsFromGameCenterIDsRequest
     * @return GetPlayFabIDsFromGameCenterIDsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayFabIDsFromGameCenterIDs(final GetPlayFabIDsFromGameCenterIDsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromGameCenterIDsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Game Center identifiers (referenced in the Game Center
     * Programming Guide as the Player Identifier).
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayFabIDsFromGameCenterIDsAsync(final GetPlayFabIDsFromGameCenterIDsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromGameCenterIDs"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayFabIDsFromGameCenterIDsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of generic service identifiers. A generic identifier is the
     * service name plus the service-specific ID for the player, as specified by the title when the generic identifier was
     * added to the player account.
     * @param request GetPlayFabIDsFromGenericIDsRequest
     * @return Async Task will return GetPlayFabIDsFromGenericIDsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayFabIDsFromGenericIDsAsync(final GetPlayFabIDsFromGenericIDsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromGenericIDsAsync(request);
            }
        });
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of generic service identifiers. A generic identifier is the
     * service name plus the service-specific ID for the player, as specified by the title when the generic identifier was
     * added to the player account.
     * @param request GetPlayFabIDsFromGenericIDsRequest
     * @return GetPlayFabIDsFromGenericIDsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayFabIDsFromGenericIDs(final GetPlayFabIDsFromGenericIDsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromGenericIDsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of generic service identifiers. A generic identifier is the
     * service name plus the service-specific ID for the player, as specified by the title when the generic identifier was
     * added to the player account.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayFabIDsFromGenericIDsAsync(final GetPlayFabIDsFromGenericIDsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromGenericIDs"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayFabIDsFromGenericIDsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Google identifiers. The Google identifiers are the IDs for
     * the user accounts, available as "id" in the Google+ People API calls.
     * @param request GetPlayFabIDsFromGoogleIDsRequest
     * @return Async Task will return GetPlayFabIDsFromGoogleIDsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayFabIDsFromGoogleIDsAsync(final GetPlayFabIDsFromGoogleIDsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromGoogleIDsAsync(request);
            }
        });
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Google identifiers. The Google identifiers are the IDs for
     * the user accounts, available as "id" in the Google+ People API calls.
     * @param request GetPlayFabIDsFromGoogleIDsRequest
     * @return GetPlayFabIDsFromGoogleIDsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayFabIDsFromGoogleIDs(final GetPlayFabIDsFromGoogleIDsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromGoogleIDsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Google identifiers. The Google identifiers are the IDs for
     * the user accounts, available as "id" in the Google+ People API calls.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayFabIDsFromGoogleIDsAsync(final GetPlayFabIDsFromGoogleIDsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromGoogleIDs"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayFabIDsFromGoogleIDsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Kongregate identifiers. The Kongregate identifiers are the
     * IDs for the user accounts, available as "user_id" from the Kongregate API methods(ex:
     * http://developers.kongregate.com/docs/client/getUserId).
     * @param request GetPlayFabIDsFromKongregateIDsRequest
     * @return Async Task will return GetPlayFabIDsFromKongregateIDsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayFabIDsFromKongregateIDsAsync(final GetPlayFabIDsFromKongregateIDsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromKongregateIDsAsync(request);
            }
        });
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Kongregate identifiers. The Kongregate identifiers are the
     * IDs for the user accounts, available as "user_id" from the Kongregate API methods(ex:
     * http://developers.kongregate.com/docs/client/getUserId).
     * @param request GetPlayFabIDsFromKongregateIDsRequest
     * @return GetPlayFabIDsFromKongregateIDsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayFabIDsFromKongregateIDs(final GetPlayFabIDsFromKongregateIDsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromKongregateIDsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Kongregate identifiers. The Kongregate identifiers are the
     * IDs for the user accounts, available as "user_id" from the Kongregate API methods(ex:
     * http://developers.kongregate.com/docs/client/getUserId).
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayFabIDsFromKongregateIDsAsync(final GetPlayFabIDsFromKongregateIDsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromKongregateIDs"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayFabIDsFromKongregateIDsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Nintendo Switch identifiers.
     * @param request GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest
     * @return Async Task will return GetPlayFabIDsFromNintendoSwitchDeviceIdsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayFabIDsFromNintendoSwitchDeviceIdsAsync(final GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromNintendoSwitchDeviceIdsAsync(request);
            }
        });
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Nintendo Switch identifiers.
     * @param request GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest
     * @return GetPlayFabIDsFromNintendoSwitchDeviceIdsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayFabIDsFromNintendoSwitchDeviceIds(final GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromNintendoSwitchDeviceIdsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the unique PlayFab identifiers for the given set of Nintendo Switch identifiers. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayFabIDsFromNintendoSwitchDeviceIdsAsync(final GetPlayFabIDsFromNintendoSwitchDeviceIdsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromNintendoSwitchDeviceIds"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayFabIDsFromNintendoSwitchDeviceIdsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers.
     * @param request GetPlayFabIDsFromPSNAccountIDsRequest
     * @return Async Task will return GetPlayFabIDsFromPSNAccountIDsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayFabIDsFromPSNAccountIDsAsync(final GetPlayFabIDsFromPSNAccountIDsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromPSNAccountIDsAsync(request);
            }
        });
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers.
     * @param request GetPlayFabIDsFromPSNAccountIDsRequest
     * @return GetPlayFabIDsFromPSNAccountIDsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayFabIDsFromPSNAccountIDs(final GetPlayFabIDsFromPSNAccountIDsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromPSNAccountIDsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the unique PlayFab identifiers for the given set of PlayStation Network identifiers. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayFabIDsFromPSNAccountIDsAsync(final GetPlayFabIDsFromPSNAccountIDsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromPSNAccountIDs"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayFabIDsFromPSNAccountIDsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers are the profile
     * IDs for the user accounts, available as SteamId in the Steamworks Community API calls.
     * @param request GetPlayFabIDsFromSteamIDsRequest
     * @return Async Task will return GetPlayFabIDsFromSteamIDsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayFabIDsFromSteamIDsAsync(final GetPlayFabIDsFromSteamIDsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromSteamIDsAsync(request);
            }
        });
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers are the profile
     * IDs for the user accounts, available as SteamId in the Steamworks Community API calls.
     * @param request GetPlayFabIDsFromSteamIDsRequest
     * @return GetPlayFabIDsFromSteamIDsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayFabIDsFromSteamIDs(final GetPlayFabIDsFromSteamIDsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromSteamIDsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers are the profile
     * IDs for the user accounts, available as SteamId in the Steamworks Community API calls.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayFabIDsFromSteamIDsAsync(final GetPlayFabIDsFromSteamIDsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromSteamIDs"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayFabIDsFromSteamIDsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Twitch identifiers. The Twitch identifiers are the IDs for
     * the user accounts, available as "_id" from the Twitch API methods (ex:
     * https://github.com/justintv/Twitch-API/blob/master/v3_resources/users.md#get-usersuser).
     * @param request GetPlayFabIDsFromTwitchIDsRequest
     * @return Async Task will return GetPlayFabIDsFromTwitchIDsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayFabIDsFromTwitchIDsAsync(final GetPlayFabIDsFromTwitchIDsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromTwitchIDsAsync(request);
            }
        });
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Twitch identifiers. The Twitch identifiers are the IDs for
     * the user accounts, available as "_id" from the Twitch API methods (ex:
     * https://github.com/justintv/Twitch-API/blob/master/v3_resources/users.md#get-usersuser).
     * @param request GetPlayFabIDsFromTwitchIDsRequest
     * @return GetPlayFabIDsFromTwitchIDsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayFabIDsFromTwitchIDs(final GetPlayFabIDsFromTwitchIDsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromTwitchIDsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of Twitch identifiers. The Twitch identifiers are the IDs for
     * the user accounts, available as "_id" from the Twitch API methods (ex:
     * https://github.com/justintv/Twitch-API/blob/master/v3_resources/users.md#get-usersuser).
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayFabIDsFromTwitchIDsAsync(final GetPlayFabIDsFromTwitchIDsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromTwitchIDs"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayFabIDsFromTwitchIDsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of XboxLive identifiers.
     * @param request GetPlayFabIDsFromXboxLiveIDsRequest
     * @return Async Task will return GetPlayFabIDsFromXboxLiveIDsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPlayFabIDsFromXboxLiveIDsAsync(final GetPlayFabIDsFromXboxLiveIDsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromXboxLiveIDsAsync(request);
            }
        });
    }

    /**
     * Retrieves the unique PlayFab identifiers for the given set of XboxLive identifiers.
     * @param request GetPlayFabIDsFromXboxLiveIDsRequest
     * @return GetPlayFabIDsFromXboxLiveIDsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPlayFabIDsFromXboxLiveIDs(final GetPlayFabIDsFromXboxLiveIDsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPlayFabIDsFromXboxLiveIDsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the unique PlayFab identifiers for the given set of XboxLive identifiers. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPlayFabIDsFromXboxLiveIDsAsync(final GetPlayFabIDsFromXboxLiveIDsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromXboxLiveIDs"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPlayFabIDsFromXboxLiveIDsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the key-value store of custom publisher settings
     * @param request GetPublisherDataRequest
     * @return Async Task will return GetPublisherDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPublisherDataAsync(final GetPublisherDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPublisherDataAsync(request);
            }
        });
    }

    /**
     * Retrieves the key-value store of custom publisher settings
     * @param request GetPublisherDataRequest
     * @return GetPublisherDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPublisherData(final GetPublisherDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPublisherDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the key-value store of custom publisher settings */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPublisherDataAsync(final GetPublisherDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPublisherData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPublisherDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves a purchase along with its current PlayFab status. Returns inventory items from the purchase that are still
     * active.
     * @param request GetPurchaseRequest
     * @return Async Task will return GetPurchaseResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetPurchaseAsync(final GetPurchaseRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPurchaseAsync(request);
            }
        });
    }

    /**
     * Retrieves a purchase along with its current PlayFab status. Returns inventory items from the purchase that are still
     * active.
     * @param request GetPurchaseRequest
     * @return GetPurchaseResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetPurchase(final GetPurchaseRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetPurchaseAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves a purchase along with its current PlayFab status. Returns inventory items from the purchase that are still
     * active.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetPurchaseAsync(final GetPurchaseRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPurchase"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetPurchaseResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves data stored in a shared group object, as well as the list of members in the group. Non-members of the group
     * may use this to retrieve group data, including membership, but they will not receive data for keys marked as private.
     * Shared Groups are designed for sharing data between a very small number of players, please see our guide:
     * https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     * @param request GetSharedGroupDataRequest
     * @return Async Task will return GetSharedGroupDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetSharedGroupDataAsync(final GetSharedGroupDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetSharedGroupDataAsync(request);
            }
        });
    }

    /**
     * Retrieves data stored in a shared group object, as well as the list of members in the group. Non-members of the group
     * may use this to retrieve group data, including membership, but they will not receive data for keys marked as private.
     * Shared Groups are designed for sharing data between a very small number of players, please see our guide:
     * https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     * @param request GetSharedGroupDataRequest
     * @return GetSharedGroupDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetSharedGroupData(final GetSharedGroupDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetSharedGroupDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Retrieves data stored in a shared group object, as well as the list of members in the group. Non-members of the group
     * may use this to retrieve group data, including membership, but they will not receive data for keys marked as private.
     * Shared Groups are designed for sharing data between a very small number of players, please see our guide:
     * https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetSharedGroupDataAsync(final GetSharedGroupDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetSharedGroupData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetSharedGroupDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the set of items defined for the specified store, including all prices defined
     * @param request GetStoreItemsRequest
     * @return Async Task will return GetStoreItemsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetStoreItemsAsync(final GetStoreItemsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetStoreItemsAsync(request);
            }
        });
    }

    /**
     * Retrieves the set of items defined for the specified store, including all prices defined
     * @param request GetStoreItemsRequest
     * @return GetStoreItemsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetStoreItems(final GetStoreItemsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetStoreItemsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the set of items defined for the specified store, including all prices defined */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetStoreItemsAsync(final GetStoreItemsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetStoreItems"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetStoreItemsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the current server time
     * @param request GetTimeRequest
     * @return Async Task will return GetTimeResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetTimeAsync(final GetTimeRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTimeAsync(request);
            }
        });
    }

    /**
     * Retrieves the current server time
     * @param request GetTimeRequest
     * @return GetTimeResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetTime(final GetTimeRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTimeAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the current server time */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetTimeAsync(final GetTimeRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetTime"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetTimeResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the key-value store of custom title settings
     * @param request GetTitleDataRequest
     * @return Async Task will return GetTitleDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetTitleDataAsync(final GetTitleDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTitleDataAsync(request);
            }
        });
    }

    /**
     * Retrieves the key-value store of custom title settings
     * @param request GetTitleDataRequest
     * @return GetTitleDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetTitleData(final GetTitleDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTitleDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the key-value store of custom title settings */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetTitleDataAsync(final GetTitleDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetTitleData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetTitleDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the title news feed, as configured in the developer portal
     * @param request GetTitleNewsRequest
     * @return Async Task will return GetTitleNewsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetTitleNewsAsync(final GetTitleNewsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTitleNewsAsync(request);
            }
        });
    }

    /**
     * Retrieves the title news feed, as configured in the developer portal
     * @param request GetTitleNewsRequest
     * @return GetTitleNewsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetTitleNews(final GetTitleNewsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTitleNewsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the title news feed, as configured in the developer portal */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetTitleNewsAsync(final GetTitleNewsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetTitleNews"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetTitleNewsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Returns the title's base 64 encoded RSA CSP blob.
     * @param request GetTitlePublicKeyRequest
     * @return Async Task will return GetTitlePublicKeyResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetTitlePublicKeyAsync(final GetTitlePublicKeyRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTitlePublicKeyAsync(request);
            }
        });
    }

    /**
     * Returns the title's base 64 encoded RSA CSP blob.
     * @param request GetTitlePublicKeyRequest
     * @return GetTitlePublicKeyResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetTitlePublicKey(final GetTitlePublicKeyRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTitlePublicKeyAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Returns the title's base 64 encoded RSA CSP blob. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetTitlePublicKeyAsync(final GetTitlePublicKeyRequest request) throws Exception {

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetTitlePublicKey"), request, null, null);
        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());
        GetTitlePublicKeyResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Gets the current status of an existing trade.
     * @param request GetTradeStatusRequest
     * @return Async Task will return GetTradeStatusResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetTradeStatusAsync(final GetTradeStatusRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTradeStatusAsync(request);
            }
        });
    }

    /**
     * Gets the current status of an existing trade.
     * @param request GetTradeStatusRequest
     * @return GetTradeStatusResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetTradeStatus(final GetTradeStatusRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTradeStatusAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Gets the current status of an existing trade. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetTradeStatusAsync(final GetTradeStatusRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetTradeStatus"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetTradeStatusResponse result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the title-specific custom data for the user which is readable and writable by the client
     * @param request GetUserDataRequest
     * @return Async Task will return GetUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetUserDataAsync(final GetUserDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetUserDataAsync(request);
            }
        });
    }

    /**
     * Retrieves the title-specific custom data for the user which is readable and writable by the client
     * @param request GetUserDataRequest
     * @return GetUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetUserData(final GetUserDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetUserDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the title-specific custom data for the user which is readable and writable by the client */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetUserDataAsync(final GetUserDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetUserData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetUserDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the user's current inventory of virtual goods
     * @param request GetUserInventoryRequest
     * @return Async Task will return GetUserInventoryResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetUserInventoryAsync(final GetUserInventoryRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetUserInventoryAsync(request);
            }
        });
    }

    /**
     * Retrieves the user's current inventory of virtual goods
     * @param request GetUserInventoryRequest
     * @return GetUserInventoryResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetUserInventory(final GetUserInventoryRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetUserInventoryAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the user's current inventory of virtual goods */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetUserInventoryAsync(final GetUserInventoryRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetUserInventory"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetUserInventoryResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the publisher-specific custom data for the user which is readable and writable by the client
     * @param request GetUserDataRequest
     * @return Async Task will return GetUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetUserPublisherDataAsync(final GetUserDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetUserPublisherDataAsync(request);
            }
        });
    }

    /**
     * Retrieves the publisher-specific custom data for the user which is readable and writable by the client
     * @param request GetUserDataRequest
     * @return GetUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetUserPublisherData(final GetUserDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetUserPublisherDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the publisher-specific custom data for the user which is readable and writable by the client */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetUserPublisherDataAsync(final GetUserDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetUserPublisherData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetUserDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the publisher-specific custom data for the user which can only be read by the client
     * @param request GetUserDataRequest
     * @return Async Task will return GetUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetUserPublisherReadOnlyDataAsync(final GetUserDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetUserPublisherReadOnlyDataAsync(request);
            }
        });
    }

    /**
     * Retrieves the publisher-specific custom data for the user which can only be read by the client
     * @param request GetUserDataRequest
     * @return GetUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetUserPublisherReadOnlyData(final GetUserDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetUserPublisherReadOnlyDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the publisher-specific custom data for the user which can only be read by the client */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetUserPublisherReadOnlyDataAsync(final GetUserDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetUserPublisherReadOnlyData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetUserDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Retrieves the title-specific custom data for the user which can only be read by the client
     * @param request GetUserDataRequest
     * @return Async Task will return GetUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetUserReadOnlyDataAsync(final GetUserDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetUserReadOnlyDataAsync(request);
            }
        });
    }

    /**
     * Retrieves the title-specific custom data for the user which can only be read by the client
     * @param request GetUserDataRequest
     * @return GetUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetUserReadOnlyData(final GetUserDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetUserReadOnlyDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Retrieves the title-specific custom data for the user which can only be read by the client */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetUserReadOnlyDataAsync(final GetUserDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetUserReadOnlyData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GetUserDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Requests a challenge from the server to be signed by Windows Hello Passport service to authenticate.
     * @param request GetWindowsHelloChallengeRequest
     * @return Async Task will return GetWindowsHelloChallengeResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetWindowsHelloChallengeAsync(final GetWindowsHelloChallengeRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetWindowsHelloChallengeAsync(request);
            }
        });
    }

    /**
     * Requests a challenge from the server to be signed by Windows Hello Passport service to authenticate.
     * @param request GetWindowsHelloChallengeRequest
     * @return GetWindowsHelloChallengeResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetWindowsHelloChallenge(final GetWindowsHelloChallengeRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetWindowsHelloChallengeAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Requests a challenge from the server to be signed by Windows Hello Passport service to authenticate. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetWindowsHelloChallengeAsync(final GetWindowsHelloChallengeRequest request) throws Exception {

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetWindowsHelloChallenge"), request, null, null);
        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());
        GetWindowsHelloChallengeResponse result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated
     * with the parent PlayFabId to guarantee uniqueness.
     * @param request GrantCharacterToUserRequest
     * @return Async Task will return GrantCharacterToUserResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GrantCharacterToUserAsync(final GrantCharacterToUserRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGrantCharacterToUserAsync(request);
            }
        });
    }

    /**
     * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated
     * with the parent PlayFabId to guarantee uniqueness.
     * @param request GrantCharacterToUserRequest
     * @return GrantCharacterToUserResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GrantCharacterToUser(final GrantCharacterToUserRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGrantCharacterToUserAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated
     * with the parent PlayFabId to guarantee uniqueness.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGrantCharacterToUserAsync(final GrantCharacterToUserRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GrantCharacterToUser"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        GrantCharacterToUserResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the Android device identifier to the user's PlayFab account
     * @param request LinkAndroidDeviceIDRequest
     * @return Async Task will return LinkAndroidDeviceIDResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkAndroidDeviceIDAsync(final LinkAndroidDeviceIDRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkAndroidDeviceIDAsync(request);
            }
        });
    }

    /**
     * Links the Android device identifier to the user's PlayFab account
     * @param request LinkAndroidDeviceIDRequest
     * @return LinkAndroidDeviceIDResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkAndroidDeviceID(final LinkAndroidDeviceIDRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkAndroidDeviceIDAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the Android device identifier to the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkAndroidDeviceIDAsync(final LinkAndroidDeviceIDRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkAndroidDeviceID"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkAndroidDeviceIDResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the custom identifier, generated by the title, to the user's PlayFab account
     * @param request LinkCustomIDRequest
     * @return Async Task will return LinkCustomIDResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkCustomIDAsync(final LinkCustomIDRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkCustomIDAsync(request);
            }
        });
    }

    /**
     * Links the custom identifier, generated by the title, to the user's PlayFab account
     * @param request LinkCustomIDRequest
     * @return LinkCustomIDResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkCustomID(final LinkCustomIDRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkCustomIDAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the custom identifier, generated by the title, to the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkCustomIDAsync(final LinkCustomIDRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkCustomID"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkCustomIDResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the Facebook account associated with the provided Facebook access token to the user's PlayFab account
     * @param request LinkFacebookAccountRequest
     * @return Async Task will return LinkFacebookAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkFacebookAccountAsync(final LinkFacebookAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkFacebookAccountAsync(request);
            }
        });
    }

    /**
     * Links the Facebook account associated with the provided Facebook access token to the user's PlayFab account
     * @param request LinkFacebookAccountRequest
     * @return LinkFacebookAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkFacebookAccount(final LinkFacebookAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkFacebookAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the Facebook account associated with the provided Facebook access token to the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkFacebookAccountAsync(final LinkFacebookAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkFacebookAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkFacebookAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the Facebook Instant Games Id to the user's PlayFab account
     * @param request LinkFacebookInstantGamesIdRequest
     * @return Async Task will return LinkFacebookInstantGamesIdResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkFacebookInstantGamesIdAsync(final LinkFacebookInstantGamesIdRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkFacebookInstantGamesIdAsync(request);
            }
        });
    }

    /**
     * Links the Facebook Instant Games Id to the user's PlayFab account
     * @param request LinkFacebookInstantGamesIdRequest
     * @return LinkFacebookInstantGamesIdResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkFacebookInstantGamesId(final LinkFacebookInstantGamesIdRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkFacebookInstantGamesIdAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the Facebook Instant Games Id to the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkFacebookInstantGamesIdAsync(final LinkFacebookInstantGamesIdRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkFacebookInstantGamesId"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkFacebookInstantGamesIdResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the Game Center account associated with the provided Game Center ID to the user's PlayFab account
     * @param request LinkGameCenterAccountRequest
     * @return Async Task will return LinkGameCenterAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkGameCenterAccountAsync(final LinkGameCenterAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkGameCenterAccountAsync(request);
            }
        });
    }

    /**
     * Links the Game Center account associated with the provided Game Center ID to the user's PlayFab account
     * @param request LinkGameCenterAccountRequest
     * @return LinkGameCenterAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkGameCenterAccount(final LinkGameCenterAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkGameCenterAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the Game Center account associated with the provided Game Center ID to the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkGameCenterAccountAsync(final LinkGameCenterAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkGameCenterAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkGameCenterAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the currently signed-in user account to their Google account, using their Google account credentials
     * @param request LinkGoogleAccountRequest
     * @return Async Task will return LinkGoogleAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkGoogleAccountAsync(final LinkGoogleAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkGoogleAccountAsync(request);
            }
        });
    }

    /**
     * Links the currently signed-in user account to their Google account, using their Google account credentials
     * @param request LinkGoogleAccountRequest
     * @return LinkGoogleAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkGoogleAccount(final LinkGoogleAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkGoogleAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the currently signed-in user account to their Google account, using their Google account credentials */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkGoogleAccountAsync(final LinkGoogleAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkGoogleAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkGoogleAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the vendor-specific iOS device identifier to the user's PlayFab account
     * @param request LinkIOSDeviceIDRequest
     * @return Async Task will return LinkIOSDeviceIDResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkIOSDeviceIDAsync(final LinkIOSDeviceIDRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkIOSDeviceIDAsync(request);
            }
        });
    }

    /**
     * Links the vendor-specific iOS device identifier to the user's PlayFab account
     * @param request LinkIOSDeviceIDRequest
     * @return LinkIOSDeviceIDResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkIOSDeviceID(final LinkIOSDeviceIDRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkIOSDeviceIDAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the vendor-specific iOS device identifier to the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkIOSDeviceIDAsync(final LinkIOSDeviceIDRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkIOSDeviceID"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkIOSDeviceIDResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the Kongregate identifier to the user's PlayFab account
     * @param request LinkKongregateAccountRequest
     * @return Async Task will return LinkKongregateAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkKongregateAsync(final LinkKongregateAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkKongregateAsync(request);
            }
        });
    }

    /**
     * Links the Kongregate identifier to the user's PlayFab account
     * @param request LinkKongregateAccountRequest
     * @return LinkKongregateAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkKongregate(final LinkKongregateAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkKongregateAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the Kongregate identifier to the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkKongregateAsync(final LinkKongregateAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkKongregate"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkKongregateAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the NintendoSwitchDeviceId to the user's PlayFab account
     * @param request LinkNintendoSwitchDeviceIdRequest
     * @return Async Task will return LinkNintendoSwitchDeviceIdResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkNintendoSwitchDeviceIdAsync(final LinkNintendoSwitchDeviceIdRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkNintendoSwitchDeviceIdAsync(request);
            }
        });
    }

    /**
     * Links the NintendoSwitchDeviceId to the user's PlayFab account
     * @param request LinkNintendoSwitchDeviceIdRequest
     * @return LinkNintendoSwitchDeviceIdResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkNintendoSwitchDeviceId(final LinkNintendoSwitchDeviceIdRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkNintendoSwitchDeviceIdAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the NintendoSwitchDeviceId to the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkNintendoSwitchDeviceIdAsync(final LinkNintendoSwitchDeviceIdRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkNintendoSwitchDeviceId"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkNintendoSwitchDeviceIdResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links an OpenID Connect account to a user's PlayFab account, based on an existing relationship between a title and an
     * Open ID Connect provider and the OpenId Connect JWT from that provider.
     * @param request LinkOpenIdConnectRequest
     * @return Async Task will return EmptyResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkOpenIdConnectAsync(final LinkOpenIdConnectRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkOpenIdConnectAsync(request);
            }
        });
    }

    /**
     * Links an OpenID Connect account to a user's PlayFab account, based on an existing relationship between a title and an
     * Open ID Connect provider and the OpenId Connect JWT from that provider.
     * @param request LinkOpenIdConnectRequest
     * @return EmptyResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkOpenIdConnect(final LinkOpenIdConnectRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkOpenIdConnectAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Links an OpenID Connect account to a user's PlayFab account, based on an existing relationship between a title and an
     * Open ID Connect provider and the OpenId Connect JWT from that provider.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkOpenIdConnectAsync(final LinkOpenIdConnectRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkOpenIdConnect"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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;
    }

    /**
     * Links the PlayStation Network account associated with the provided access code to the user's PlayFab account
     * @param request LinkPSNAccountRequest
     * @return Async Task will return LinkPSNAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkPSNAccountAsync(final LinkPSNAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkPSNAccountAsync(request);
            }
        });
    }

    /**
     * Links the PlayStation Network account associated with the provided access code to the user's PlayFab account
     * @param request LinkPSNAccountRequest
     * @return LinkPSNAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkPSNAccount(final LinkPSNAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkPSNAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the PlayStation Network account associated with the provided access code to the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkPSNAccountAsync(final LinkPSNAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkPSNAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkPSNAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the Steam account associated with the provided Steam authentication ticket to the user's PlayFab account
     * @param request LinkSteamAccountRequest
     * @return Async Task will return LinkSteamAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkSteamAccountAsync(final LinkSteamAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkSteamAccountAsync(request);
            }
        });
    }

    /**
     * Links the Steam account associated with the provided Steam authentication ticket to the user's PlayFab account
     * @param request LinkSteamAccountRequest
     * @return LinkSteamAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkSteamAccount(final LinkSteamAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkSteamAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the Steam account associated with the provided Steam authentication ticket to the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkSteamAccountAsync(final LinkSteamAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkSteamAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkSteamAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the Twitch account associated with the token to the user's PlayFab account.
     * @param request LinkTwitchAccountRequest
     * @return Async Task will return LinkTwitchAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkTwitchAsync(final LinkTwitchAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkTwitchAsync(request);
            }
        });
    }

    /**
     * Links the Twitch account associated with the token to the user's PlayFab account.
     * @param request LinkTwitchAccountRequest
     * @return LinkTwitchAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkTwitch(final LinkTwitchAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkTwitchAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the Twitch account associated with the token to the user's PlayFab account. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkTwitchAsync(final LinkTwitchAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkTwitch"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkTwitchAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Link Windows Hello authentication to the current PlayFab Account
     * @param request LinkWindowsHelloAccountRequest
     * @return Async Task will return LinkWindowsHelloAccountResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkWindowsHelloAsync(final LinkWindowsHelloAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkWindowsHelloAsync(request);
            }
        });
    }

    /**
     * Link Windows Hello authentication to the current PlayFab Account
     * @param request LinkWindowsHelloAccountRequest
     * @return LinkWindowsHelloAccountResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkWindowsHello(final LinkWindowsHelloAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkWindowsHelloAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Link Windows Hello authentication to the current PlayFab Account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkWindowsHelloAsync(final LinkWindowsHelloAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkWindowsHello"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkWindowsHelloAccountResponse result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Links the Xbox Live account associated with the provided access code to the user's PlayFab account
     * @param request LinkXboxAccountRequest
     * @return Async Task will return LinkXboxAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LinkXboxAccountAsync(final LinkXboxAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkXboxAccountAsync(request);
            }
        });
    }

    /**
     * Links the Xbox Live account associated with the provided access code to the user's PlayFab account
     * @param request LinkXboxAccountRequest
     * @return LinkXboxAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LinkXboxAccount(final LinkXboxAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLinkXboxAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Links the Xbox Live account associated with the provided access code to the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLinkXboxAccountAsync(final LinkXboxAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkXboxAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        LinkXboxAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using the Android device identifier, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user
     * @param request LoginWithAndroidDeviceIDRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithAndroidDeviceIDAsync(final LoginWithAndroidDeviceIDRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithAndroidDeviceIDAsync(request);
            }
        });
    }

    /**
     * Signs the user in using the Android device identifier, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user
     * @param request LoginWithAndroidDeviceIDRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithAndroidDeviceID(final LoginWithAndroidDeviceIDRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithAndroidDeviceIDAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user in using the Android device identifier, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithAndroidDeviceIDAsync(final LoginWithAndroidDeviceIDRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithAndroidDeviceID"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using a custom unique identifier generated by the title, returning a session identifier that can
     * subsequently be used for API calls which require an authenticated user
     * @param request LoginWithCustomIDRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithCustomIDAsync(final LoginWithCustomIDRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithCustomIDAsync(request);
            }
        });
    }

    /**
     * Signs the user in using a custom unique identifier generated by the title, returning a session identifier that can
     * subsequently be used for API calls which require an authenticated user
     * @param request LoginWithCustomIDRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithCustomID(final LoginWithCustomIDRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithCustomIDAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user in using a custom unique identifier generated by the title, returning a session identifier that can
     * subsequently be used for API calls which require an authenticated user
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithCustomIDAsync(final LoginWithCustomIDRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithCustomID"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls
     * which require an authenticated user. Unlike most other login API calls, LoginWithEmailAddress does not permit the
     * creation of new accounts via the CreateAccountFlag. Email addresses may be used to create accounts via
     * RegisterPlayFabUser.
     * @param request LoginWithEmailAddressRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithEmailAddressAsync(final LoginWithEmailAddressRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithEmailAddressAsync(request);
            }
        });
    }

    /**
     * Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls
     * which require an authenticated user. Unlike most other login API calls, LoginWithEmailAddress does not permit the
     * creation of new accounts via the CreateAccountFlag. Email addresses may be used to create accounts via
     * RegisterPlayFabUser.
     * @param request LoginWithEmailAddressRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithEmailAddress(final LoginWithEmailAddressRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithEmailAddressAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls
     * which require an authenticated user. Unlike most other login API calls, LoginWithEmailAddress does not permit the
     * creation of new accounts via the CreateAccountFlag. Email addresses may be used to create accounts via
     * RegisterPlayFabUser.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithEmailAddressAsync(final LoginWithEmailAddressRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithEmailAddress"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using a Facebook access token, returning a session identifier that can subsequently be used for API
     * calls which require an authenticated user
     * @param request LoginWithFacebookRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithFacebookAsync(final LoginWithFacebookRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithFacebookAsync(request);
            }
        });
    }

    /**
     * Signs the user in using a Facebook access token, returning a session identifier that can subsequently be used for API
     * calls which require an authenticated user
     * @param request LoginWithFacebookRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithFacebook(final LoginWithFacebookRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithFacebookAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user in using a Facebook access token, returning a session identifier that can subsequently be used for API
     * calls which require an authenticated user
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithFacebookAsync(final LoginWithFacebookRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithFacebook"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using a Facebook Instant Games ID, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user. Requires Facebook Instant Games to be configured.
     * @param request LoginWithFacebookInstantGamesIdRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithFacebookInstantGamesIdAsync(final LoginWithFacebookInstantGamesIdRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithFacebookInstantGamesIdAsync(request);
            }
        });
    }

    /**
     * Signs the user in using a Facebook Instant Games ID, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user. Requires Facebook Instant Games to be configured.
     * @param request LoginWithFacebookInstantGamesIdRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithFacebookInstantGamesId(final LoginWithFacebookInstantGamesIdRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithFacebookInstantGamesIdAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user in using a Facebook Instant Games ID, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user. Requires Facebook Instant Games to be configured.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithFacebookInstantGamesIdAsync(final LoginWithFacebookInstantGamesIdRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithFacebookInstantGamesId"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using an iOS Game Center player identifier, returning a session identifier that can subsequently be
     * used for API calls which require an authenticated user
     * @param request LoginWithGameCenterRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithGameCenterAsync(final LoginWithGameCenterRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithGameCenterAsync(request);
            }
        });
    }

    /**
     * Signs the user in using an iOS Game Center player identifier, returning a session identifier that can subsequently be
     * used for API calls which require an authenticated user
     * @param request LoginWithGameCenterRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithGameCenter(final LoginWithGameCenterRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithGameCenterAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user in using an iOS Game Center player identifier, returning a session identifier that can subsequently be
     * used for API calls which require an authenticated user
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithGameCenterAsync(final LoginWithGameCenterRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithGameCenter"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using their Google account credentials
     * @param request LoginWithGoogleAccountRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithGoogleAccountAsync(final LoginWithGoogleAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithGoogleAccountAsync(request);
            }
        });
    }

    /**
     * Signs the user in using their Google account credentials
     * @param request LoginWithGoogleAccountRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithGoogleAccount(final LoginWithGoogleAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithGoogleAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Signs the user in using their Google account credentials */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithGoogleAccountAsync(final LoginWithGoogleAccountRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithGoogleAccount"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using the vendor-specific iOS device identifier, returning a session identifier that can subsequently
     * be used for API calls which require an authenticated user
     * @param request LoginWithIOSDeviceIDRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithIOSDeviceIDAsync(final LoginWithIOSDeviceIDRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithIOSDeviceIDAsync(request);
            }
        });
    }

    /**
     * Signs the user in using the vendor-specific iOS device identifier, returning a session identifier that can subsequently
     * be used for API calls which require an authenticated user
     * @param request LoginWithIOSDeviceIDRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithIOSDeviceID(final LoginWithIOSDeviceIDRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithIOSDeviceIDAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user in using the vendor-specific iOS device identifier, returning a session identifier that can subsequently
     * be used for API calls which require an authenticated user
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithIOSDeviceIDAsync(final LoginWithIOSDeviceIDRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithIOSDeviceID"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using a Kongregate player account.
     * @param request LoginWithKongregateRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithKongregateAsync(final LoginWithKongregateRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithKongregateAsync(request);
            }
        });
    }

    /**
     * Signs the user in using a Kongregate player account.
     * @param request LoginWithKongregateRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithKongregate(final LoginWithKongregateRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithKongregateAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Signs the user in using a Kongregate player account. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithKongregateAsync(final LoginWithKongregateRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithKongregate"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using a Nintendo Switch Device ID, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user
     * @param request LoginWithNintendoSwitchDeviceIdRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithNintendoSwitchDeviceIdAsync(final LoginWithNintendoSwitchDeviceIdRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithNintendoSwitchDeviceIdAsync(request);
            }
        });
    }

    /**
     * Signs the user in using a Nintendo Switch Device ID, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user
     * @param request LoginWithNintendoSwitchDeviceIdRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithNintendoSwitchDeviceId(final LoginWithNintendoSwitchDeviceIdRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithNintendoSwitchDeviceIdAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user in using a Nintendo Switch Device ID, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithNintendoSwitchDeviceIdAsync(final LoginWithNintendoSwitchDeviceIdRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithNintendoSwitchDeviceId"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Logs in a user with an Open ID Connect JWT created by an existing relationship between a title and an Open ID Connect
     * provider.
     * @param request LoginWithOpenIdConnectRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithOpenIdConnectAsync(final LoginWithOpenIdConnectRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithOpenIdConnectAsync(request);
            }
        });
    }

    /**
     * Logs in a user with an Open ID Connect JWT created by an existing relationship between a title and an Open ID Connect
     * provider.
     * @param request LoginWithOpenIdConnectRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithOpenIdConnect(final LoginWithOpenIdConnectRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithOpenIdConnectAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Logs in a user with an Open ID Connect JWT created by an existing relationship between a title and an Open ID Connect
     * provider.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithOpenIdConnectAsync(final LoginWithOpenIdConnectRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithOpenIdConnect"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls
     * which require an authenticated user. Unlike most other login API calls, LoginWithPlayFab does not permit the creation of
     * new accounts via the CreateAccountFlag. Username/Password credentials may be used to create accounts via
     * RegisterPlayFabUser, or added to existing accounts using AddUsernamePassword.
     * @param request LoginWithPlayFabRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithPlayFabAsync(final LoginWithPlayFabRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithPlayFabAsync(request);
            }
        });
    }

    /**
     * Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls
     * which require an authenticated user. Unlike most other login API calls, LoginWithPlayFab does not permit the creation of
     * new accounts via the CreateAccountFlag. Username/Password credentials may be used to create accounts via
     * RegisterPlayFabUser, or added to existing accounts using AddUsernamePassword.
     * @param request LoginWithPlayFabRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithPlayFab(final LoginWithPlayFabRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithPlayFabAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls
     * which require an authenticated user. Unlike most other login API calls, LoginWithPlayFab does not permit the creation of
     * new accounts via the CreateAccountFlag. Username/Password credentials may be used to create accounts via
     * RegisterPlayFabUser, or added to existing accounts using AddUsernamePassword.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithPlayFabAsync(final LoginWithPlayFabRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithPlayFab"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently
     * be used for API calls which require an authenticated user
     * @param request LoginWithPSNRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithPSNAsync(final LoginWithPSNRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithPSNAsync(request);
            }
        });
    }

    /**
     * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently
     * be used for API calls which require an authenticated user
     * @param request LoginWithPSNRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithPSN(final LoginWithPSNRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithPSNAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user in using a PlayStation Network authentication code, returning a session identifier that can subsequently
     * be used for API calls which require an authenticated user
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithPSNAsync(final LoginWithPSNRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithPSN"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using a Steam authentication ticket, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user
     * @param request LoginWithSteamRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithSteamAsync(final LoginWithSteamRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithSteamAsync(request);
            }
        });
    }

    /**
     * Signs the user in using a Steam authentication ticket, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user
     * @param request LoginWithSteamRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithSteam(final LoginWithSteamRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithSteamAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user in using a Steam authentication ticket, returning a session identifier that can subsequently be used for
     * API calls which require an authenticated user
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithSteamAsync(final LoginWithSteamRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithSteam"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using a Twitch access token.
     * @param request LoginWithTwitchRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithTwitchAsync(final LoginWithTwitchRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithTwitchAsync(request);
            }
        });
    }

    /**
     * Signs the user in using a Twitch access token.
     * @param request LoginWithTwitchRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithTwitch(final LoginWithTwitchRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithTwitchAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Signs the user in using a Twitch access token. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithTwitchAsync(final LoginWithTwitchRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithTwitch"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Completes the Windows Hello login flow by returning the signed value of the challange from GetWindowsHelloChallenge.
     * Windows Hello has a 2 step client to server authentication scheme. Step one is to request from the server a challenge
     * string. Step two is to request the user sign the string via Windows Hello and then send the signed value back to the
     * server.
     * @param request LoginWithWindowsHelloRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithWindowsHelloAsync(final LoginWithWindowsHelloRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithWindowsHelloAsync(request);
            }
        });
    }

    /**
     * Completes the Windows Hello login flow by returning the signed value of the challange from GetWindowsHelloChallenge.
     * Windows Hello has a 2 step client to server authentication scheme. Step one is to request from the server a challenge
     * string. Step two is to request the user sign the string via Windows Hello and then send the signed value back to the
     * server.
     * @param request LoginWithWindowsHelloRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithWindowsHello(final LoginWithWindowsHelloRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithWindowsHelloAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Completes the Windows Hello login flow by returning the signed value of the challange from GetWindowsHelloChallenge.
     * Windows Hello has a 2 step client to server authentication scheme. Step one is to request from the server a challenge
     * string. Step two is to request the user sign the string via Windows Hello and then send the signed value back to the
     * server.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithWindowsHelloAsync(final LoginWithWindowsHelloRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithWindowsHello"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls
     * which require an authenticated user
     * @param request LoginWithXboxRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> LoginWithXboxAsync(final LoginWithXboxRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithXboxAsync(request);
            }
        });
    }

    /**
     * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls
     * which require an authenticated user
     * @param request LoginWithXboxRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult LoginWithXbox(final LoginWithXboxRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateLoginWithXboxAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Signs the user in using a Xbox Live Token, returning a session identifier that can subsequently be used for API calls
     * which require an authenticated user
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateLoginWithXboxAsync(final LoginWithXboxRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LoginWithXbox"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Attempts to locate a game session matching the given parameters. If the goal is to match the player into a specific
     * active session, only the LobbyId is required. Otherwise, the BuildVersion, GameMode, and Region are all required
     * parameters. Note that parameters specified in the search are required (they are not weighting factors). If a slot is
     * found in a server instance matching the parameters, the slot will be assigned to that player, removing it from the
     * availabe set. In that case, the information on the game session will be returned, otherwise the Status returned will be
     * GameNotFound.
     * @param request MatchmakeRequest
     * @return Async Task will return MatchmakeResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> MatchmakeAsync(final MatchmakeRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateMatchmakeAsync(request);
            }
        });
    }

    /**
     * Attempts to locate a game session matching the given parameters. If the goal is to match the player into a specific
     * active session, only the LobbyId is required. Otherwise, the BuildVersion, GameMode, and Region are all required
     * parameters. Note that parameters specified in the search are required (they are not weighting factors). If a slot is
     * found in a server instance matching the parameters, the slot will be assigned to that player, removing it from the
     * availabe set. In that case, the information on the game session will be returned, otherwise the Status returned will be
     * GameNotFound.
     * @param request MatchmakeRequest
     * @return MatchmakeResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult Matchmake(final MatchmakeRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateMatchmakeAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Attempts to locate a game session matching the given parameters. If the goal is to match the player into a specific
     * active session, only the LobbyId is required. Otherwise, the BuildVersion, GameMode, and Region are all required
     * parameters. Note that parameters specified in the search are required (they are not weighting factors). If a slot is
     * found in a server instance matching the parameters, the slot will be assigned to that player, removing it from the
     * availabe set. In that case, the information on the game session will be returned, otherwise the Status returned will be
     * GameNotFound.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateMatchmakeAsync(final MatchmakeRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/Matchmake"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        MatchmakeResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Opens a new outstanding trade. Note that a given item instance may only be in one open trade at a time.
     * @param request OpenTradeRequest
     * @return Async Task will return OpenTradeResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> OpenTradeAsync(final OpenTradeRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateOpenTradeAsync(request);
            }
        });
    }

    /**
     * Opens a new outstanding trade. Note that a given item instance may only be in one open trade at a time.
     * @param request OpenTradeRequest
     * @return OpenTradeResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult OpenTrade(final OpenTradeRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateOpenTradeAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Opens a new outstanding trade. Note that a given item instance may only be in one open trade at a time. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateOpenTradeAsync(final OpenTradeRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/OpenTrade"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        OpenTradeResponse result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Selects a payment option for purchase order created via StartPurchase
     * @param request PayForPurchaseRequest
     * @return Async Task will return PayForPurchaseResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> PayForPurchaseAsync(final PayForPurchaseRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privatePayForPurchaseAsync(request);
            }
        });
    }

    /**
     * Selects a payment option for purchase order created via StartPurchase
     * @param request PayForPurchaseRequest
     * @return PayForPurchaseResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult PayForPurchase(final PayForPurchaseRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privatePayForPurchaseAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Selects a payment option for purchase order created via StartPurchase */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privatePayForPurchaseAsync(final PayForPurchaseRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/PayForPurchase"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        PayForPurchaseResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, as well as what
     * the client believes the price to be. This lets the server fail the purchase if the price has changed.
     * @param request PurchaseItemRequest
     * @return Async Task will return PurchaseItemResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> PurchaseItemAsync(final PurchaseItemRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privatePurchaseItemAsync(request);
            }
        });
    }

    /**
     * Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, as well as what
     * the client believes the price to be. This lets the server fail the purchase if the price has changed.
     * @param request PurchaseItemRequest
     * @return PurchaseItemResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult PurchaseItem(final PurchaseItemRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privatePurchaseItemAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, as well as what
     * the client believes the price to be. This lets the server fail the purchase if the price has changed.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privatePurchaseItemAsync(final PurchaseItemRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/PurchaseItem"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        PurchaseItemResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the
     * Economy->Catalogs tab in the PlayFab Game Manager.
     * @param request RedeemCouponRequest
     * @return Async Task will return RedeemCouponResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RedeemCouponAsync(final RedeemCouponRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRedeemCouponAsync(request);
            }
        });
    }

    /**
     * Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the
     * Economy->Catalogs tab in the PlayFab Game Manager.
     * @param request RedeemCouponRequest
     * @return RedeemCouponResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RedeemCoupon(final RedeemCouponRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRedeemCouponAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the
     * Economy->Catalogs tab in the PlayFab Game Manager.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRedeemCouponAsync(final RedeemCouponRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/RedeemCoupon"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        RedeemCouponResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Uses the supplied OAuth code to refresh the internally cached player PSN auth token
     * @param request RefreshPSNAuthTokenRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RefreshPSNAuthTokenAsync(final RefreshPSNAuthTokenRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRefreshPSNAuthTokenAsync(request);
            }
        });
    }

    /**
     * Uses the supplied OAuth code to refresh the internally cached player PSN auth token
     * @param request RefreshPSNAuthTokenRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RefreshPSNAuthToken(final RefreshPSNAuthTokenRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRefreshPSNAuthTokenAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Uses the supplied OAuth code to refresh the internally cached player PSN auth token */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRefreshPSNAuthTokenAsync(final RefreshPSNAuthTokenRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/RefreshPSNAuthToken"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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;
    }

    /**
     * Registers the iOS device to receive push notifications
     * @param request RegisterForIOSPushNotificationRequest
     * @return Async Task will return RegisterForIOSPushNotificationResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RegisterForIOSPushNotificationAsync(final RegisterForIOSPushNotificationRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRegisterForIOSPushNotificationAsync(request);
            }
        });
    }

    /**
     * Registers the iOS device to receive push notifications
     * @param request RegisterForIOSPushNotificationRequest
     * @return RegisterForIOSPushNotificationResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RegisterForIOSPushNotification(final RegisterForIOSPushNotificationRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRegisterForIOSPushNotificationAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Registers the iOS device to receive push notifications */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRegisterForIOSPushNotificationAsync(final RegisterForIOSPushNotificationRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/RegisterForIOSPushNotification"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        RegisterForIOSPushNotificationResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Registers a new Playfab user account, returning a session identifier that can subsequently be used for API calls which
     * require an authenticated user. You must supply either a username or an email address.
     * @param request RegisterPlayFabUserRequest
     * @return Async Task will return RegisterPlayFabUserResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RegisterPlayFabUserAsync(final RegisterPlayFabUserRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRegisterPlayFabUserAsync(request);
            }
        });
    }

    /**
     * Registers a new Playfab user account, returning a session identifier that can subsequently be used for API calls which
     * require an authenticated user. You must supply either a username or an email address.
     * @param request RegisterPlayFabUserRequest
     * @return RegisterPlayFabUserResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RegisterPlayFabUser(final RegisterPlayFabUserRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRegisterPlayFabUserAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Registers a new Playfab user account, returning a session identifier that can subsequently be used for API calls which
     * require an authenticated user. You must supply either a username or an email address.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRegisterPlayFabUserAsync(final RegisterPlayFabUserRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/RegisterPlayFabUser"), request, null, null);
        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());
        RegisterPlayFabUserResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Registers a new PlayFab user account using Windows Hello authentication, returning a session ticket that can
     * subsequently be used for API calls which require an authenticated user
     * @param request RegisterWithWindowsHelloRequest
     * @return Async Task will return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RegisterWithWindowsHelloAsync(final RegisterWithWindowsHelloRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRegisterWithWindowsHelloAsync(request);
            }
        });
    }

    /**
     * Registers a new PlayFab user account using Windows Hello authentication, returning a session ticket that can
     * subsequently be used for API calls which require an authenticated user
     * @param request RegisterWithWindowsHelloRequest
     * @return LoginResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RegisterWithWindowsHello(final RegisterWithWindowsHelloRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRegisterWithWindowsHelloAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Registers a new PlayFab user account using Windows Hello authentication, returning a session ticket that can
     * subsequently be used for API calls which require an authenticated user
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRegisterWithWindowsHelloAsync(final RegisterWithWindowsHelloRequest request) throws Exception {
        request.TitleId = PlayFabSettings.TitleId != null ? PlayFabSettings.TitleId : request.TitleId;
        if (request.TitleId == null) throw new Exception ("Must be have PlayFabSettings.TitleId set to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/RegisterWithWindowsHello"), request, null, null);
        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());
        LoginResult result = resultData.data;
        PlayFabSettings.ClientSessionTicket = result.SessionTicket != null ? result.SessionTicket : PlayFabSettings.ClientSessionTicket;
        if (result.EntityToken != null) PlayFabSettings.EntityToken = result.EntityToken.EntityToken != null ? result.EntityToken.EntityToken : PlayFabSettings.EntityToken;
        MultiStepClientLogin(resultData.data.SettingsForUser.NeedsAttribution);

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Removes a contact email from the player's profile.
     * @param request RemoveContactEmailRequest
     * @return Async Task will return RemoveContactEmailResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RemoveContactEmailAsync(final RemoveContactEmailRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRemoveContactEmailAsync(request);
            }
        });
    }

    /**
     * Removes a contact email from the player's profile.
     * @param request RemoveContactEmailRequest
     * @return RemoveContactEmailResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RemoveContactEmail(final RemoveContactEmailRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRemoveContactEmailAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Removes a contact email from the player's profile. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRemoveContactEmailAsync(final RemoveContactEmailRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/RemoveContactEmail"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        RemoveContactEmailResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Removes a specified user from the friend list of the local user
     * @param request RemoveFriendRequest
     * @return Async Task will return RemoveFriendResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RemoveFriendAsync(final RemoveFriendRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRemoveFriendAsync(request);
            }
        });
    }

    /**
     * Removes a specified user from the friend list of the local user
     * @param request RemoveFriendRequest
     * @return RemoveFriendResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RemoveFriend(final RemoveFriendRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRemoveFriendAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Removes a specified user from the friend list of the local user */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRemoveFriendAsync(final RemoveFriendRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/RemoveFriend"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        RemoveFriendResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Removes the specified generic service identifier from the player's PlayFab account.
     * @param request RemoveGenericIDRequest
     * @return Async Task will return RemoveGenericIDResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RemoveGenericIDAsync(final RemoveGenericIDRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRemoveGenericIDAsync(request);
            }
        });
    }

    /**
     * Removes the specified generic service identifier from the player's PlayFab account.
     * @param request RemoveGenericIDRequest
     * @return RemoveGenericIDResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RemoveGenericID(final RemoveGenericIDRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRemoveGenericIDAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Removes the specified generic service identifier from the player's PlayFab account. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRemoveGenericIDAsync(final RemoveGenericIDRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/RemoveGenericID"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        RemoveGenericIDResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Removes users from the set of those able to update the shared data and the set of users in the group. Only users in the
     * group can remove members. If as a result of the call, zero users remain with access, the group and its associated data
     * will be deleted. Shared Groups are designed for sharing data between a very small number of players, please see our
     * guide: https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     * @param request RemoveSharedGroupMembersRequest
     * @return Async Task will return RemoveSharedGroupMembersResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RemoveSharedGroupMembersAsync(final RemoveSharedGroupMembersRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRemoveSharedGroupMembersAsync(request);
            }
        });
    }

    /**
     * Removes users from the set of those able to update the shared data and the set of users in the group. Only users in the
     * group can remove members. If as a result of the call, zero users remain with access, the group and its associated data
     * will be deleted. Shared Groups are designed for sharing data between a very small number of players, please see our
     * guide: https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     * @param request RemoveSharedGroupMembersRequest
     * @return RemoveSharedGroupMembersResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RemoveSharedGroupMembers(final RemoveSharedGroupMembersRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRemoveSharedGroupMembersAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Removes users from the set of those able to update the shared data and the set of users in the group. Only users in the
     * group can remove members. If as a result of the call, zero users remain with access, the group and its associated data
     * will be deleted. Shared Groups are designed for sharing data between a very small number of players, please see our
     * guide: https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRemoveSharedGroupMembersAsync(final RemoveSharedGroupMembersRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/RemoveSharedGroupMembers"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        RemoveSharedGroupMembersResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Write a PlayStream event to describe the provided player device information. This API method is not designed to be
     * called directly by developers. Each PlayFab client SDK will eventually report this information automatically.
     * @param request DeviceInfoRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ReportDeviceInfoAsync(final DeviceInfoRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateReportDeviceInfoAsync(request);
            }
        });
    }

    /**
     * Write a PlayStream event to describe the provided player device information. This API method is not designed to be
     * called directly by developers. Each PlayFab client SDK will eventually report this information automatically.
     * @param request DeviceInfoRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ReportDeviceInfo(final DeviceInfoRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateReportDeviceInfoAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Write a PlayStream event to describe the provided player device information. This API method is not designed to be
     * called directly by developers. Each PlayFab client SDK will eventually report this information automatically.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateReportDeviceInfoAsync(final DeviceInfoRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ReportDeviceInfo"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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;
    }

    /**
     * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title
     * can take action concerning potentially toxic players.
     * @param request ReportPlayerClientRequest
     * @return Async Task will return ReportPlayerClientResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ReportPlayerAsync(final ReportPlayerClientRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateReportPlayerAsync(request);
            }
        });
    }

    /**
     * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title
     * can take action concerning potentially toxic players.
     * @param request ReportPlayerClientRequest
     * @return ReportPlayerClientResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ReportPlayer(final ReportPlayerClientRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateReportPlayerAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Submit a report for another player (due to bad bahavior, etc.), so that customer service representatives for the title
     * can take action concerning potentially toxic players.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateReportPlayerAsync(final ReportPlayerClientRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ReportPlayer"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        ReportPlayerClientResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Restores all in-app purchases based on the given restore receipt
     * @param request RestoreIOSPurchasesRequest
     * @return Async Task will return RestoreIOSPurchasesResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RestoreIOSPurchasesAsync(final RestoreIOSPurchasesRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRestoreIOSPurchasesAsync(request);
            }
        });
    }

    /**
     * Restores all in-app purchases based on the given restore receipt
     * @param request RestoreIOSPurchasesRequest
     * @return RestoreIOSPurchasesResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RestoreIOSPurchases(final RestoreIOSPurchasesRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRestoreIOSPurchasesAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Restores all in-app purchases based on the given restore receipt */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRestoreIOSPurchasesAsync(final RestoreIOSPurchasesRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/RestoreIOSPurchases"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        RestoreIOSPurchasesResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to
     * change the password.If an account recovery email template ID is provided, an email using the custom email template will
     * be used.
     * @param request SendAccountRecoveryEmailRequest
     * @return Async Task will return SendAccountRecoveryEmailResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> SendAccountRecoveryEmailAsync(final SendAccountRecoveryEmailRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateSendAccountRecoveryEmailAsync(request);
            }
        });
    }

    /**
     * Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to
     * change the password.If an account recovery email template ID is provided, an email using the custom email template will
     * be used.
     * @param request SendAccountRecoveryEmailRequest
     * @return SendAccountRecoveryEmailResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult SendAccountRecoveryEmail(final SendAccountRecoveryEmailRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateSendAccountRecoveryEmailAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to
     * change the password.If an account recovery email template ID is provided, an email using the custom email template will
     * be used.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateSendAccountRecoveryEmailAsync(final SendAccountRecoveryEmailRequest request) throws Exception {

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/SendAccountRecoveryEmail"), request, null, null);
        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());
        SendAccountRecoveryEmailResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Updates the tag list for a specified user in the friend list of the local user
     * @param request SetFriendTagsRequest
     * @return Async Task will return SetFriendTagsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> SetFriendTagsAsync(final SetFriendTagsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateSetFriendTagsAsync(request);
            }
        });
    }

    /**
     * Updates the tag list for a specified user in the friend list of the local user
     * @param request SetFriendTagsRequest
     * @return SetFriendTagsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult SetFriendTags(final SetFriendTagsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateSetFriendTagsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Updates the tag list for a specified user in the friend list of the local user */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateSetFriendTagsAsync(final SetFriendTagsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/SetFriendTags"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        SetFriendTagsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's
     * secret use the Admin or Server API method SetPlayerSecret.
     * @param request SetPlayerSecretRequest
     * @return Async Task will return SetPlayerSecretResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> SetPlayerSecretAsync(final SetPlayerSecretRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateSetPlayerSecretAsync(request);
            }
        });
    }

    /**
     * Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's
     * secret use the Admin or Server API method SetPlayerSecret.
     * @param request SetPlayerSecretRequest
     * @return SetPlayerSecretResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult SetPlayerSecret(final SetPlayerSecretRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateSetPlayerSecretAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's
     * secret use the Admin or Server API method SetPlayerSecret.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateSetPlayerSecretAsync(final SetPlayerSecretRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/SetPlayerSecret"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        SetPlayerSecretResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Start a new game server with a given configuration, add the current player and return the connection information.
     * @param request StartGameRequest
     * @return Async Task will return StartGameResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> StartGameAsync(final StartGameRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateStartGameAsync(request);
            }
        });
    }

    /**
     * Start a new game server with a given configuration, add the current player and return the connection information.
     * @param request StartGameRequest
     * @return StartGameResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult StartGame(final StartGameRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateStartGameAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Start a new game server with a given configuration, add the current player and return the connection information. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateStartGameAsync(final StartGameRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/StartGame"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        StartGameResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Creates an order for a list of items from the title catalog
     * @param request StartPurchaseRequest
     * @return Async Task will return StartPurchaseResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> StartPurchaseAsync(final StartPurchaseRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateStartPurchaseAsync(request);
            }
        });
    }

    /**
     * Creates an order for a list of items from the title catalog
     * @param request StartPurchaseRequest
     * @return StartPurchaseResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult StartPurchase(final StartPurchaseRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateStartPurchaseAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Creates an order for a list of items from the title catalog */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateStartPurchaseAsync(final StartPurchaseRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/StartPurchase"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        StartPurchaseResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Decrements the user's balance of the specified virtual currency by the stated amount. It is possible to make a VC
     * balance negative with this API.
     * @param request SubtractUserVirtualCurrencyRequest
     * @return Async Task will return ModifyUserVirtualCurrencyResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> SubtractUserVirtualCurrencyAsync(final SubtractUserVirtualCurrencyRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateSubtractUserVirtualCurrencyAsync(request);
            }
        });
    }

    /**
     * Decrements the user's balance of the specified virtual currency by the stated amount. It is possible to make a VC
     * balance negative with this API.
     * @param request SubtractUserVirtualCurrencyRequest
     * @return ModifyUserVirtualCurrencyResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult SubtractUserVirtualCurrency(final SubtractUserVirtualCurrencyRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateSubtractUserVirtualCurrencyAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Decrements the user's balance of the specified virtual currency by the stated amount. It is possible to make a VC
     * balance negative with this API.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateSubtractUserVirtualCurrencyAsync(final SubtractUserVirtualCurrencyRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/SubtractUserVirtualCurrency"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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;
    }

    /**
     * Unlinks the related Android device identifier from the user's PlayFab account
     * @param request UnlinkAndroidDeviceIDRequest
     * @return Async Task will return UnlinkAndroidDeviceIDResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkAndroidDeviceIDAsync(final UnlinkAndroidDeviceIDRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkAndroidDeviceIDAsync(request);
            }
        });
    }

    /**
     * Unlinks the related Android device identifier from the user's PlayFab account
     * @param request UnlinkAndroidDeviceIDRequest
     * @return UnlinkAndroidDeviceIDResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkAndroidDeviceID(final UnlinkAndroidDeviceIDRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkAndroidDeviceIDAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related Android device identifier from the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkAndroidDeviceIDAsync(final UnlinkAndroidDeviceIDRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkAndroidDeviceID"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkAndroidDeviceIDResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks the related custom identifier from the user's PlayFab account
     * @param request UnlinkCustomIDRequest
     * @return Async Task will return UnlinkCustomIDResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkCustomIDAsync(final UnlinkCustomIDRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkCustomIDAsync(request);
            }
        });
    }

    /**
     * Unlinks the related custom identifier from the user's PlayFab account
     * @param request UnlinkCustomIDRequest
     * @return UnlinkCustomIDResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkCustomID(final UnlinkCustomIDRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkCustomIDAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related custom identifier from the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkCustomIDAsync(final UnlinkCustomIDRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkCustomID"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkCustomIDResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks the related Facebook account from the user's PlayFab account
     * @param request UnlinkFacebookAccountRequest
     * @return Async Task will return UnlinkFacebookAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkFacebookAccountAsync(final UnlinkFacebookAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkFacebookAccountAsync(request);
            }
        });
    }

    /**
     * Unlinks the related Facebook account from the user's PlayFab account
     * @param request UnlinkFacebookAccountRequest
     * @return UnlinkFacebookAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkFacebookAccount(final UnlinkFacebookAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkFacebookAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related Facebook account from the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkFacebookAccountAsync(final UnlinkFacebookAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkFacebookAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkFacebookAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks the related Facebook Instant Game Ids from the user's PlayFab account
     * @param request UnlinkFacebookInstantGamesIdRequest
     * @return Async Task will return UnlinkFacebookInstantGamesIdResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkFacebookInstantGamesIdAsync(final UnlinkFacebookInstantGamesIdRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkFacebookInstantGamesIdAsync(request);
            }
        });
    }

    /**
     * Unlinks the related Facebook Instant Game Ids from the user's PlayFab account
     * @param request UnlinkFacebookInstantGamesIdRequest
     * @return UnlinkFacebookInstantGamesIdResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkFacebookInstantGamesId(final UnlinkFacebookInstantGamesIdRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkFacebookInstantGamesIdAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related Facebook Instant Game Ids from the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkFacebookInstantGamesIdAsync(final UnlinkFacebookInstantGamesIdRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkFacebookInstantGamesId"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkFacebookInstantGamesIdResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks the related Game Center account from the user's PlayFab account
     * @param request UnlinkGameCenterAccountRequest
     * @return Async Task will return UnlinkGameCenterAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkGameCenterAccountAsync(final UnlinkGameCenterAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkGameCenterAccountAsync(request);
            }
        });
    }

    /**
     * Unlinks the related Game Center account from the user's PlayFab account
     * @param request UnlinkGameCenterAccountRequest
     * @return UnlinkGameCenterAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkGameCenterAccount(final UnlinkGameCenterAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkGameCenterAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related Game Center account from the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkGameCenterAccountAsync(final UnlinkGameCenterAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkGameCenterAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkGameCenterAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks the related Google account from the user's PlayFab account
     * (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods).
     * @param request UnlinkGoogleAccountRequest
     * @return Async Task will return UnlinkGoogleAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkGoogleAccountAsync(final UnlinkGoogleAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkGoogleAccountAsync(request);
            }
        });
    }

    /**
     * Unlinks the related Google account from the user's PlayFab account
     * (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods).
     * @param request UnlinkGoogleAccountRequest
     * @return UnlinkGoogleAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkGoogleAccount(final UnlinkGoogleAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkGoogleAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Unlinks the related Google account from the user's PlayFab account
     * (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods).
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkGoogleAccountAsync(final UnlinkGoogleAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkGoogleAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkGoogleAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks the related iOS device identifier from the user's PlayFab account
     * @param request UnlinkIOSDeviceIDRequest
     * @return Async Task will return UnlinkIOSDeviceIDResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkIOSDeviceIDAsync(final UnlinkIOSDeviceIDRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkIOSDeviceIDAsync(request);
            }
        });
    }

    /**
     * Unlinks the related iOS device identifier from the user's PlayFab account
     * @param request UnlinkIOSDeviceIDRequest
     * @return UnlinkIOSDeviceIDResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkIOSDeviceID(final UnlinkIOSDeviceIDRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkIOSDeviceIDAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related iOS device identifier from the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkIOSDeviceIDAsync(final UnlinkIOSDeviceIDRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkIOSDeviceID"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkIOSDeviceIDResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks the related Kongregate identifier from the user's PlayFab account
     * @param request UnlinkKongregateAccountRequest
     * @return Async Task will return UnlinkKongregateAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkKongregateAsync(final UnlinkKongregateAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkKongregateAsync(request);
            }
        });
    }

    /**
     * Unlinks the related Kongregate identifier from the user's PlayFab account
     * @param request UnlinkKongregateAccountRequest
     * @return UnlinkKongregateAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkKongregate(final UnlinkKongregateAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkKongregateAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related Kongregate identifier from the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkKongregateAsync(final UnlinkKongregateAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkKongregate"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkKongregateAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks the related NintendoSwitchDeviceId from the user's PlayFab account
     * @param request UnlinkNintendoSwitchDeviceIdRequest
     * @return Async Task will return UnlinkNintendoSwitchDeviceIdResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkNintendoSwitchDeviceIdAsync(final UnlinkNintendoSwitchDeviceIdRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkNintendoSwitchDeviceIdAsync(request);
            }
        });
    }

    /**
     * Unlinks the related NintendoSwitchDeviceId from the user's PlayFab account
     * @param request UnlinkNintendoSwitchDeviceIdRequest
     * @return UnlinkNintendoSwitchDeviceIdResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkNintendoSwitchDeviceId(final UnlinkNintendoSwitchDeviceIdRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkNintendoSwitchDeviceIdAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related NintendoSwitchDeviceId from the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkNintendoSwitchDeviceIdAsync(final UnlinkNintendoSwitchDeviceIdRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkNintendoSwitchDeviceId"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkNintendoSwitchDeviceIdResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks an OpenID Connect account from a user's PlayFab account, based on the connection ID of an existing relationship
     * between a title and an Open ID Connect provider.
     * @param request UninkOpenIdConnectRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkOpenIdConnectAsync(final UninkOpenIdConnectRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkOpenIdConnectAsync(request);
            }
        });
    }

    /**
     * Unlinks an OpenID Connect account from a user's PlayFab account, based on the connection ID of an existing relationship
     * between a title and an Open ID Connect provider.
     * @param request UninkOpenIdConnectRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkOpenIdConnect(final UninkOpenIdConnectRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkOpenIdConnectAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Unlinks an OpenID Connect account from a user's PlayFab account, based on the connection ID of an existing relationship
     * between a title and an Open ID Connect provider.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkOpenIdConnectAsync(final UninkOpenIdConnectRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkOpenIdConnect"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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;
    }

    /**
     * Unlinks the related PSN account from the user's PlayFab account
     * @param request UnlinkPSNAccountRequest
     * @return Async Task will return UnlinkPSNAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkPSNAccountAsync(final UnlinkPSNAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkPSNAccountAsync(request);
            }
        });
    }

    /**
     * Unlinks the related PSN account from the user's PlayFab account
     * @param request UnlinkPSNAccountRequest
     * @return UnlinkPSNAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkPSNAccount(final UnlinkPSNAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkPSNAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related PSN account from the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkPSNAccountAsync(final UnlinkPSNAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkPSNAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkPSNAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks the related Steam account from the user's PlayFab account
     * @param request UnlinkSteamAccountRequest
     * @return Async Task will return UnlinkSteamAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkSteamAccountAsync(final UnlinkSteamAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkSteamAccountAsync(request);
            }
        });
    }

    /**
     * Unlinks the related Steam account from the user's PlayFab account
     * @param request UnlinkSteamAccountRequest
     * @return UnlinkSteamAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkSteamAccount(final UnlinkSteamAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkSteamAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related Steam account from the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkSteamAccountAsync(final UnlinkSteamAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkSteamAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkSteamAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks the related Twitch account from the user's PlayFab account.
     * @param request UnlinkTwitchAccountRequest
     * @return Async Task will return UnlinkTwitchAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkTwitchAsync(final UnlinkTwitchAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkTwitchAsync(request);
            }
        });
    }

    /**
     * Unlinks the related Twitch account from the user's PlayFab account.
     * @param request UnlinkTwitchAccountRequest
     * @return UnlinkTwitchAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkTwitch(final UnlinkTwitchAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkTwitchAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related Twitch account from the user's PlayFab account. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkTwitchAsync(final UnlinkTwitchAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkTwitch"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkTwitchAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlink Windows Hello authentication from the current PlayFab Account
     * @param request UnlinkWindowsHelloAccountRequest
     * @return Async Task will return UnlinkWindowsHelloAccountResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkWindowsHelloAsync(final UnlinkWindowsHelloAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkWindowsHelloAsync(request);
            }
        });
    }

    /**
     * Unlink Windows Hello authentication from the current PlayFab Account
     * @param request UnlinkWindowsHelloAccountRequest
     * @return UnlinkWindowsHelloAccountResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkWindowsHello(final UnlinkWindowsHelloAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkWindowsHelloAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlink Windows Hello authentication from the current PlayFab Account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkWindowsHelloAsync(final UnlinkWindowsHelloAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkWindowsHello"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkWindowsHelloAccountResponse result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Unlinks the related Xbox Live account from the user's PlayFab account
     * @param request UnlinkXboxAccountRequest
     * @return Async Task will return UnlinkXboxAccountResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlinkXboxAccountAsync(final UnlinkXboxAccountRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkXboxAccountAsync(request);
            }
        });
    }

    /**
     * Unlinks the related Xbox Live account from the user's PlayFab account
     * @param request UnlinkXboxAccountRequest
     * @return UnlinkXboxAccountResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlinkXboxAccount(final UnlinkXboxAccountRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlinkXboxAccountAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Unlinks the related Xbox Live account from the user's PlayFab account */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlinkXboxAccountAsync(final UnlinkXboxAccountRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkXboxAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlinkXboxAccountResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Opens the specified container, with the specified key (when required), and returns the contents of the opened container.
     * If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented,
     * consistent with the operation of ConsumeItem.
     * @param request UnlockContainerInstanceRequest
     * @return Async Task will return UnlockContainerItemResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlockContainerInstanceAsync(final UnlockContainerInstanceRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlockContainerInstanceAsync(request);
            }
        });
    }

    /**
     * Opens the specified container, with the specified key (when required), and returns the contents of the opened container.
     * If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented,
     * consistent with the operation of ConsumeItem.
     * @param request UnlockContainerInstanceRequest
     * @return UnlockContainerItemResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlockContainerInstance(final UnlockContainerInstanceRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlockContainerInstanceAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Opens the specified container, with the specified key (when required), and returns the contents of the opened container.
     * If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented,
     * consistent with the operation of ConsumeItem.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlockContainerInstanceAsync(final UnlockContainerInstanceRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlockContainerInstance"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlockContainerItemResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an
     * appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are
     * consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem.
     * @param request UnlockContainerItemRequest
     * @return Async Task will return UnlockContainerItemResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UnlockContainerItemAsync(final UnlockContainerItemRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlockContainerItemAsync(request);
            }
        });
    }

    /**
     * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an
     * appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are
     * consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem.
     * @param request UnlockContainerItemRequest
     * @return UnlockContainerItemResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UnlockContainerItem(final UnlockContainerItemRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUnlockContainerItemAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an
     * appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are
     * consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUnlockContainerItemAsync(final UnlockContainerItemRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlockContainerItem"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UnlockContainerItemResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Update the avatar URL of the player
     * @param request UpdateAvatarUrlRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UpdateAvatarUrlAsync(final UpdateAvatarUrlRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateAvatarUrlAsync(request);
            }
        });
    }

    /**
     * Update the avatar URL of the player
     * @param request UpdateAvatarUrlRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UpdateAvatarUrl(final UpdateAvatarUrlRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateAvatarUrlAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Update the avatar URL of the player */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUpdateAvatarUrlAsync(final UpdateAvatarUrlRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UpdateAvatarUrl"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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 and updates the title-specific custom data for the user's character which is readable and writable by the client
     * @param request UpdateCharacterDataRequest
     * @return Async Task will return UpdateCharacterDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UpdateCharacterDataAsync(final UpdateCharacterDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateCharacterDataAsync(request);
            }
        });
    }

    /**
     * Creates and updates the title-specific custom data for the user's character which is readable and writable by the client
     * @param request UpdateCharacterDataRequest
     * @return UpdateCharacterDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UpdateCharacterData(final UpdateCharacterDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateCharacterDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Creates and updates the title-specific custom data for the user's character which is readable and writable by the client */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUpdateCharacterDataAsync(final UpdateCharacterDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UpdateCharacterData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UpdateCharacterDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not
     * permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features.
     * @param request UpdateCharacterStatisticsRequest
     * @return Async Task will return UpdateCharacterStatisticsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UpdateCharacterStatisticsAsync(final UpdateCharacterStatisticsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateCharacterStatisticsAsync(request);
            }
        });
    }

    /**
     * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not
     * permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features.
     * @param request UpdateCharacterStatisticsRequest
     * @return UpdateCharacterStatisticsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UpdateCharacterStatistics(final UpdateCharacterStatisticsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateCharacterStatisticsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Updates the values of the specified title-specific statistics for the specific character. By default, clients are not
     * permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUpdateCharacterStatisticsAsync(final UpdateCharacterStatisticsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UpdateCharacterStatistics"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UpdateCharacterStatisticsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to
     * update statistics. Developers may override this setting in the Game Manager > Settings > API Features.
     * @param request UpdatePlayerStatisticsRequest
     * @return Async Task will return UpdatePlayerStatisticsResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdatePlayerStatisticsAsync(request);
            }
        });
    }

    /**
     * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to
     * update statistics. Developers may override this setting in the Game Manager > Settings > API Features.
     * @param request UpdatePlayerStatisticsRequest
     * @return UpdatePlayerStatisticsResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UpdatePlayerStatistics(final UpdatePlayerStatisticsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdatePlayerStatisticsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to
     * update statistics. Developers may override this setting in the Game Manager > Settings > API Features.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUpdatePlayerStatisticsAsync(final UpdatePlayerStatisticsRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UpdatePlayerStatistics"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UpdatePlayerStatisticsResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated
     * or added in this call will be readable by users not in the group. By default, data permissions are set to Private.
     * Regardless of the permission setting, only members of the group can update the data. Shared Groups are designed for
     * sharing data between a very small number of players, please see our guide:
     * https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     * @param request UpdateSharedGroupDataRequest
     * @return Async Task will return UpdateSharedGroupDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UpdateSharedGroupDataAsync(final UpdateSharedGroupDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateSharedGroupDataAsync(request);
            }
        });
    }

    /**
     * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated
     * or added in this call will be readable by users not in the group. By default, data permissions are set to Private.
     * Regardless of the permission setting, only members of the group can update the data. Shared Groups are designed for
     * sharing data between a very small number of players, please see our guide:
     * https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     * @param request UpdateSharedGroupDataRequest
     * @return UpdateSharedGroupDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UpdateSharedGroupData(final UpdateSharedGroupDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateSharedGroupDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated
     * or added in this call will be readable by users not in the group. By default, data permissions are set to Private.
     * Regardless of the permission setting, only members of the group can update the data. Shared Groups are designed for
     * sharing data between a very small number of players, please see our guide:
     * https://api.playfab.com/docs/tutorials/landing-players/shared-groups
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUpdateSharedGroupDataAsync(final UpdateSharedGroupDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UpdateSharedGroupData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UpdateSharedGroupDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Creates and updates the title-specific custom data for the user which is readable and writable by the client
     * @param request UpdateUserDataRequest
     * @return Async Task will return UpdateUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UpdateUserDataAsync(final UpdateUserDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateUserDataAsync(request);
            }
        });
    }

    /**
     * Creates and updates the title-specific custom data for the user which is readable and writable by the client
     * @param request UpdateUserDataRequest
     * @return UpdateUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UpdateUserData(final UpdateUserDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateUserDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Creates and updates the title-specific custom data for the user which is readable and writable by the client */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUpdateUserDataAsync(final UpdateUserDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UpdateUserData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UpdateUserDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Creates and updates the publisher-specific custom data for the user which is readable and writable by the client
     * @param request UpdateUserDataRequest
     * @return Async Task will return UpdateUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UpdateUserPublisherDataAsync(final UpdateUserDataRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateUserPublisherDataAsync(request);
            }
        });
    }

    /**
     * Creates and updates the publisher-specific custom data for the user which is readable and writable by the client
     * @param request UpdateUserDataRequest
     * @return UpdateUserDataResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UpdateUserPublisherData(final UpdateUserDataRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateUserPublisherDataAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Creates and updates the publisher-specific custom data for the user which is readable and writable by the client */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUpdateUserPublisherDataAsync(final UpdateUserDataRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UpdateUserPublisherData"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UpdateUserDataResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Updates the title specific display name for the user
     * @param request UpdateUserTitleDisplayNameRequest
     * @return Async Task will return UpdateUserTitleDisplayNameResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UpdateUserTitleDisplayNameAsync(final UpdateUserTitleDisplayNameRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateUserTitleDisplayNameAsync(request);
            }
        });
    }

    /**
     * Updates the title specific display name for the user
     * @param request UpdateUserTitleDisplayNameRequest
     * @return UpdateUserTitleDisplayNameResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UpdateUserTitleDisplayName(final UpdateUserTitleDisplayNameRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateUserTitleDisplayNameAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Updates the title specific display name for the user */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUpdateUserTitleDisplayNameAsync(final UpdateUserTitleDisplayNameRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UpdateUserTitleDisplayName"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        UpdateUserTitleDisplayNameResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Validates with Amazon that the receipt for an Amazon App Store in-app purchase is valid and that it matches the
     * purchased catalog item
     * @param request ValidateAmazonReceiptRequest
     * @return Async Task will return ValidateAmazonReceiptResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ValidateAmazonIAPReceiptAsync(final ValidateAmazonReceiptRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateValidateAmazonIAPReceiptAsync(request);
            }
        });
    }

    /**
     * Validates with Amazon that the receipt for an Amazon App Store in-app purchase is valid and that it matches the
     * purchased catalog item
     * @param request ValidateAmazonReceiptRequest
     * @return ValidateAmazonReceiptResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ValidateAmazonIAPReceipt(final ValidateAmazonReceiptRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateValidateAmazonIAPReceiptAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Validates with Amazon that the receipt for an Amazon App Store in-app purchase is valid and that it matches the
     * purchased catalog item
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateValidateAmazonIAPReceiptAsync(final ValidateAmazonReceiptRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ValidateAmazonIAPReceipt"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        ValidateAmazonReceiptResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Validates a Google Play purchase and gives the corresponding item to the player.
     * @param request ValidateGooglePlayPurchaseRequest
     * @return Async Task will return ValidateGooglePlayPurchaseResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ValidateGooglePlayPurchaseAsync(final ValidateGooglePlayPurchaseRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateValidateGooglePlayPurchaseAsync(request);
            }
        });
    }

    /**
     * Validates a Google Play purchase and gives the corresponding item to the player.
     * @param request ValidateGooglePlayPurchaseRequest
     * @return ValidateGooglePlayPurchaseResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ValidateGooglePlayPurchase(final ValidateGooglePlayPurchaseRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateValidateGooglePlayPurchaseAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Validates a Google Play purchase and gives the corresponding item to the player. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateValidateGooglePlayPurchaseAsync(final ValidateGooglePlayPurchaseRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ValidateGooglePlayPurchase"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        ValidateGooglePlayPurchaseResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Validates with the Apple store that the receipt for an iOS in-app purchase is valid and that it matches the purchased
     * catalog item
     * @param request ValidateIOSReceiptRequest
     * @return Async Task will return ValidateIOSReceiptResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ValidateIOSReceiptAsync(final ValidateIOSReceiptRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateValidateIOSReceiptAsync(request);
            }
        });
    }

    /**
     * Validates with the Apple store that the receipt for an iOS in-app purchase is valid and that it matches the purchased
     * catalog item
     * @param request ValidateIOSReceiptRequest
     * @return ValidateIOSReceiptResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ValidateIOSReceipt(final ValidateIOSReceiptRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateValidateIOSReceiptAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Validates with the Apple store that the receipt for an iOS in-app purchase is valid and that it matches the purchased
     * catalog item
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateValidateIOSReceiptAsync(final ValidateIOSReceiptRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ValidateIOSReceipt"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        ValidateIOSReceiptResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Validates with Windows that the receipt for an Windows App Store in-app purchase is valid and that it matches the
     * purchased catalog item
     * @param request ValidateWindowsReceiptRequest
     * @return Async Task will return ValidateWindowsReceiptResult
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ValidateWindowsStoreReceiptAsync(final ValidateWindowsReceiptRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateValidateWindowsStoreReceiptAsync(request);
            }
        });
    }

    /**
     * Validates with Windows that the receipt for an Windows App Store in-app purchase is valid and that it matches the
     * purchased catalog item
     * @param request ValidateWindowsReceiptRequest
     * @return ValidateWindowsReceiptResult
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ValidateWindowsStoreReceipt(final ValidateWindowsReceiptRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateValidateWindowsStoreReceiptAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Validates with Windows that the receipt for an Windows App Store in-app purchase is valid and that it matches the
     * purchased catalog item
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateValidateWindowsStoreReceiptAsync(final ValidateWindowsReceiptRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ValidateWindowsStoreReceipt"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        ValidateWindowsReceiptResult result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Writes a character-based event into PlayStream.
     * @param request WriteClientCharacterEventRequest
     * @return Async Task will return WriteEventResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> WriteCharacterEventAsync(final WriteClientCharacterEventRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateWriteCharacterEventAsync(request);
            }
        });
    }

    /**
     * Writes a character-based event into PlayStream.
     * @param request WriteClientCharacterEventRequest
     * @return WriteEventResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult WriteCharacterEvent(final WriteClientCharacterEventRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateWriteCharacterEventAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Writes a character-based event into PlayStream. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateWriteCharacterEventAsync(final WriteClientCharacterEventRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/WriteCharacterEvent"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        WriteEventResponse result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Writes a player-based event into PlayStream.
     * @param request WriteClientPlayerEventRequest
     * @return Async Task will return WriteEventResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> WritePlayerEventAsync(final WriteClientPlayerEventRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateWritePlayerEventAsync(request);
            }
        });
    }

    /**
     * Writes a player-based event into PlayStream.
     * @param request WriteClientPlayerEventRequest
     * @return WriteEventResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult WritePlayerEvent(final WriteClientPlayerEventRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateWritePlayerEventAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Writes a player-based event into PlayStream. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateWritePlayerEventAsync(final WriteClientPlayerEventRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/WritePlayerEvent"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        WriteEventResponse result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    /**
     * Writes a title-based event into PlayStream.
     * @param request WriteTitleEventRequest
     * @return Async Task will return WriteEventResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> WriteTitleEventAsync(final WriteTitleEventRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateWriteTitleEventAsync(request);
            }
        });
    }

    /**
     * Writes a title-based event into PlayStream.
     * @param request WriteTitleEventRequest
     * @return WriteEventResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult WriteTitleEvent(final WriteTitleEventRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateWriteTitleEventAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Writes a title-based event into PlayStream. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateWriteTitleEventAsync(final WriteTitleEventRequest request) throws Exception {
        if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/WriteTitleEvent"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
        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());
        WriteEventResponse result = resultData.data;

        PlayFabResult pfResult = new PlayFabResult();
        pfResult.Result = result;
        return pfResult;
    }

    public static void MultiStepClientLogin(Boolean needsAttribution) {
        if (needsAttribution && !PlayFabSettings.DisableAdvertising && PlayFabSettings.AdvertisingIdType != null && PlayFabSettings.AdvertisingIdValue != null) {
            PlayFabClientModels.AttributeInstallRequest request = new PlayFabClientModels.AttributeInstallRequest();
            if (PlayFabSettings.AdvertisingIdType == PlayFabSettings.AD_TYPE_IDFA)
                request.Idfa = PlayFabSettings.AdvertisingIdValue;
            else if (PlayFabSettings.AdvertisingIdType == PlayFabSettings.AD_TYPE_ANDROID_ID)
                request.Adid = PlayFabSettings.AdvertisingIdValue;
            else
                return;
            FutureTask> task = AttributeInstallAsync(request);
            task.run();
        }
    }
}