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

com.playfab.PlayFabMultiplayerAPI 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.PlayFabMultiplayerModels.*;
import com.playfab.PlayFabErrors.*;
import com.playfab.PlayFabSettings;
import java.util.concurrent.*;
import java.util.*;
import com.google.gson.*;
import com.google.gson.reflect.*;

    /** API methods for managing multiplayer servers. */
public class PlayFabMultiplayerAPI {
    private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();

    /**
     * Creates a multiplayer server build with a custom container.
     * @param request CreateBuildWithCustomContainerRequest
     * @return Async Task will return CreateBuildWithCustomContainerResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CreateBuildWithCustomContainerAsync(final CreateBuildWithCustomContainerRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateBuildWithCustomContainerAsync(request);
            }
        });
    }

    /**
     * Creates a multiplayer server build with a custom container.
     * @param request CreateBuildWithCustomContainerRequest
     * @return CreateBuildWithCustomContainerResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CreateBuildWithCustomContainer(final CreateBuildWithCustomContainerRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateBuildWithCustomContainerAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Creates a multiplayer server build with a custom container. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCreateBuildWithCustomContainerAsync(final CreateBuildWithCustomContainerRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/CreateBuildWithCustomContainer"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        CreateBuildWithCustomContainerResponse result = resultData.data;

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

    /**
     * Creates a multiplayer server build with a managed container.
     * @param request CreateBuildWithManagedContainerRequest
     * @return Async Task will return CreateBuildWithManagedContainerResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CreateBuildWithManagedContainerAsync(final CreateBuildWithManagedContainerRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateBuildWithManagedContainerAsync(request);
            }
        });
    }

    /**
     * Creates a multiplayer server build with a managed container.
     * @param request CreateBuildWithManagedContainerRequest
     * @return CreateBuildWithManagedContainerResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CreateBuildWithManagedContainer(final CreateBuildWithManagedContainerRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateBuildWithManagedContainerAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Creates a multiplayer server build with a managed container. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCreateBuildWithManagedContainerAsync(final CreateBuildWithManagedContainerRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/CreateBuildWithManagedContainer"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        CreateBuildWithManagedContainerResponse result = resultData.data;

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

    /**
     * Creates a remote user to log on to a VM for a multiplayer server build.
     * @param request CreateRemoteUserRequest
     * @return Async Task will return CreateRemoteUserResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> CreateRemoteUserAsync(final CreateRemoteUserRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateRemoteUserAsync(request);
            }
        });
    }

    /**
     * Creates a remote user to log on to a VM for a multiplayer server build.
     * @param request CreateRemoteUserRequest
     * @return CreateRemoteUserResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult CreateRemoteUser(final CreateRemoteUserRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateCreateRemoteUserAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Creates a remote user to log on to a VM for a multiplayer server build. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateCreateRemoteUserAsync(final CreateRemoteUserRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/CreateRemoteUser"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        CreateRemoteUserResponse result = resultData.data;

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

    /**
     * Deletes a multiplayer server game asset for a title.
     * @param request DeleteAssetRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> DeleteAssetAsync(final DeleteAssetRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteAssetAsync(request);
            }
        });
    }

    /**
     * Deletes a multiplayer server game asset for a title.
     * @param request DeleteAssetRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult DeleteAsset(final DeleteAssetRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteAssetAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Deletes a multiplayer server game asset for a title. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateDeleteAssetAsync(final DeleteAssetRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/DeleteAsset"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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;
    }

    /**
     * Deletes a multiplayer server build.
     * @param request DeleteBuildRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> DeleteBuildAsync(final DeleteBuildRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteBuildAsync(request);
            }
        });
    }

    /**
     * Deletes a multiplayer server build.
     * @param request DeleteBuildRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult DeleteBuild(final DeleteBuildRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteBuildAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Deletes a multiplayer server build. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateDeleteBuildAsync(final DeleteBuildRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/DeleteBuild"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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;
    }

    /**
     * Deletes a multiplayer server game certificate.
     * @param request DeleteCertificateRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> DeleteCertificateAsync(final DeleteCertificateRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteCertificateAsync(request);
            }
        });
    }

    /**
     * Deletes a multiplayer server game certificate.
     * @param request DeleteCertificateRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult DeleteCertificate(final DeleteCertificateRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteCertificateAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Deletes a multiplayer server game certificate. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateDeleteCertificateAsync(final DeleteCertificateRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/DeleteCertificate"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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;
    }

    /**
     * Deletes a remote user to log on to a VM for a multiplayer server build.
     * @param request DeleteRemoteUserRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> DeleteRemoteUserAsync(final DeleteRemoteUserRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteRemoteUserAsync(request);
            }
        });
    }

    /**
     * Deletes a remote user to log on to a VM for a multiplayer server build.
     * @param request DeleteRemoteUserRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult DeleteRemoteUser(final DeleteRemoteUserRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateDeleteRemoteUserAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Deletes a remote user to log on to a VM for a multiplayer server build. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateDeleteRemoteUserAsync(final DeleteRemoteUserRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/DeleteRemoteUser"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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;
    }

    /**
     * Enables the multiplayer server feature for a title.
     * @param request EnableMultiplayerServersForTitleRequest
     * @return Async Task will return EnableMultiplayerServersForTitleResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> EnableMultiplayerServersForTitleAsync(final EnableMultiplayerServersForTitleRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateEnableMultiplayerServersForTitleAsync(request);
            }
        });
    }

    /**
     * Enables the multiplayer server feature for a title.
     * @param request EnableMultiplayerServersForTitleRequest
     * @return EnableMultiplayerServersForTitleResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult EnableMultiplayerServersForTitle(final EnableMultiplayerServersForTitleRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateEnableMultiplayerServersForTitleAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Enables the multiplayer server feature for a title. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateEnableMultiplayerServersForTitleAsync(final EnableMultiplayerServersForTitleRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/EnableMultiplayerServersForTitle"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        EnableMultiplayerServersForTitleResponse result = resultData.data;

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

    /**
     * Gets the URL to upload assets to.
     * @param request GetAssetUploadUrlRequest
     * @return Async Task will return GetAssetUploadUrlResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetAssetUploadUrlAsync(final GetAssetUploadUrlRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetAssetUploadUrlAsync(request);
            }
        });
    }

    /**
     * Gets the URL to upload assets to.
     * @param request GetAssetUploadUrlRequest
     * @return GetAssetUploadUrlResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetAssetUploadUrl(final GetAssetUploadUrlRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetAssetUploadUrlAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Gets the URL to upload assets to. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetAssetUploadUrlAsync(final GetAssetUploadUrlRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/GetAssetUploadUrl"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        GetAssetUploadUrlResponse result = resultData.data;

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

    /**
     * Gets a multiplayer server build.
     * @param request GetBuildRequest
     * @return Async Task will return GetBuildResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetBuildAsync(final GetBuildRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetBuildAsync(request);
            }
        });
    }

    /**
     * Gets a multiplayer server build.
     * @param request GetBuildRequest
     * @return GetBuildResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetBuild(final GetBuildRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetBuildAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Gets a multiplayer server build. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetBuildAsync(final GetBuildRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/GetBuild"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        GetBuildResponse result = resultData.data;

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

    /**
     * Gets the credentials to the container registry.
     * @param request GetContainerRegistryCredentialsRequest
     * @return Async Task will return GetContainerRegistryCredentialsResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetContainerRegistryCredentialsAsync(final GetContainerRegistryCredentialsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetContainerRegistryCredentialsAsync(request);
            }
        });
    }

    /**
     * Gets the credentials to the container registry.
     * @param request GetContainerRegistryCredentialsRequest
     * @return GetContainerRegistryCredentialsResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetContainerRegistryCredentials(final GetContainerRegistryCredentialsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetContainerRegistryCredentialsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Gets the credentials to the container registry. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetContainerRegistryCredentialsAsync(final GetContainerRegistryCredentialsRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/GetContainerRegistryCredentials"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        GetContainerRegistryCredentialsResponse result = resultData.data;

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

    /**
     * Gets multiplayer server session details for a build.
     * @param request GetMultiplayerServerDetailsRequest
     * @return Async Task will return GetMultiplayerServerDetailsResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetMultiplayerServerDetailsAsync(final GetMultiplayerServerDetailsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetMultiplayerServerDetailsAsync(request);
            }
        });
    }

    /**
     * Gets multiplayer server session details for a build.
     * @param request GetMultiplayerServerDetailsRequest
     * @return GetMultiplayerServerDetailsResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetMultiplayerServerDetails(final GetMultiplayerServerDetailsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetMultiplayerServerDetailsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Gets multiplayer server session details for a build. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetMultiplayerServerDetailsAsync(final GetMultiplayerServerDetailsRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/GetMultiplayerServerDetails"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        GetMultiplayerServerDetailsResponse result = resultData.data;

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

    /**
     * Gets a remote login endpoint to a VM that is hosting a multiplayer server build.
     * @param request GetRemoteLoginEndpointRequest
     * @return Async Task will return GetRemoteLoginEndpointResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetRemoteLoginEndpointAsync(final GetRemoteLoginEndpointRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetRemoteLoginEndpointAsync(request);
            }
        });
    }

    /**
     * Gets a remote login endpoint to a VM that is hosting a multiplayer server build.
     * @param request GetRemoteLoginEndpointRequest
     * @return GetRemoteLoginEndpointResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetRemoteLoginEndpoint(final GetRemoteLoginEndpointRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetRemoteLoginEndpointAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Gets a remote login endpoint to a VM that is hosting a multiplayer server build. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetRemoteLoginEndpointAsync(final GetRemoteLoginEndpointRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/GetRemoteLoginEndpoint"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        GetRemoteLoginEndpointResponse result = resultData.data;

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

    /**
     * Gets the status of whether a title is enabled for the multiplayer server feature.
     * @param request GetTitleEnabledForMultiplayerServersStatusRequest
     * @return Async Task will return GetTitleEnabledForMultiplayerServersStatusResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> GetTitleEnabledForMultiplayerServersStatusAsync(final GetTitleEnabledForMultiplayerServersStatusRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTitleEnabledForMultiplayerServersStatusAsync(request);
            }
        });
    }

    /**
     * Gets the status of whether a title is enabled for the multiplayer server feature.
     * @param request GetTitleEnabledForMultiplayerServersStatusRequest
     * @return GetTitleEnabledForMultiplayerServersStatusResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult GetTitleEnabledForMultiplayerServersStatus(final GetTitleEnabledForMultiplayerServersStatusRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateGetTitleEnabledForMultiplayerServersStatusAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Gets the status of whether a title is enabled for the multiplayer server feature. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateGetTitleEnabledForMultiplayerServersStatusAsync(final GetTitleEnabledForMultiplayerServersStatusRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/GetTitleEnabledForMultiplayerServersStatus"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        GetTitleEnabledForMultiplayerServersStatusResponse result = resultData.data;

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

    /**
     * Lists archived multiplayer server sessions for a build.
     * @param request ListMultiplayerServersRequest
     * @return Async Task will return ListMultiplayerServersResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ListArchivedMultiplayerServersAsync(final ListMultiplayerServersRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListArchivedMultiplayerServersAsync(request);
            }
        });
    }

    /**
     * Lists archived multiplayer server sessions for a build.
     * @param request ListMultiplayerServersRequest
     * @return ListMultiplayerServersResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ListArchivedMultiplayerServers(final ListMultiplayerServersRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListArchivedMultiplayerServersAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Lists archived multiplayer server sessions for a build. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateListArchivedMultiplayerServersAsync(final ListMultiplayerServersRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/ListArchivedMultiplayerServers"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        ListMultiplayerServersResponse result = resultData.data;

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

    /**
     * Lists multiplayer server game assets for a title.
     * @param request ListAssetSummariesRequest
     * @return Async Task will return ListAssetSummariesResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ListAssetSummariesAsync(final ListAssetSummariesRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListAssetSummariesAsync(request);
            }
        });
    }

    /**
     * Lists multiplayer server game assets for a title.
     * @param request ListAssetSummariesRequest
     * @return ListAssetSummariesResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ListAssetSummaries(final ListAssetSummariesRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListAssetSummariesAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Lists multiplayer server game assets for a title. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateListAssetSummariesAsync(final ListAssetSummariesRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/ListAssetSummaries"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        ListAssetSummariesResponse result = resultData.data;

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

    /**
     * Lists summarized details of all multiplayer server builds for a title.
     * @param request ListBuildSummariesRequest
     * @return Async Task will return ListBuildSummariesResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ListBuildSummariesAsync(final ListBuildSummariesRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListBuildSummariesAsync(request);
            }
        });
    }

    /**
     * Lists summarized details of all multiplayer server builds for a title.
     * @param request ListBuildSummariesRequest
     * @return ListBuildSummariesResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ListBuildSummaries(final ListBuildSummariesRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListBuildSummariesAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Lists summarized details of all multiplayer server builds for a title. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateListBuildSummariesAsync(final ListBuildSummariesRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/ListBuildSummaries"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        ListBuildSummariesResponse result = resultData.data;

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

    /**
     * Lists multiplayer server game certificates for a title.
     * @param request ListCertificateSummariesRequest
     * @return Async Task will return ListCertificateSummariesResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ListCertificateSummariesAsync(final ListCertificateSummariesRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListCertificateSummariesAsync(request);
            }
        });
    }

    /**
     * Lists multiplayer server game certificates for a title.
     * @param request ListCertificateSummariesRequest
     * @return ListCertificateSummariesResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ListCertificateSummaries(final ListCertificateSummariesRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListCertificateSummariesAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Lists multiplayer server game certificates for a title. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateListCertificateSummariesAsync(final ListCertificateSummariesRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/ListCertificateSummaries"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        ListCertificateSummariesResponse result = resultData.data;

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

    /**
     * Lists custom container images for a title.
     * @param request ListContainerImagesRequest
     * @return Async Task will return ListContainerImagesResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ListContainerImagesAsync(final ListContainerImagesRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListContainerImagesAsync(request);
            }
        });
    }

    /**
     * Lists custom container images for a title.
     * @param request ListContainerImagesRequest
     * @return ListContainerImagesResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ListContainerImages(final ListContainerImagesRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListContainerImagesAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Lists custom container images for a title. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateListContainerImagesAsync(final ListContainerImagesRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/ListContainerImages"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        ListContainerImagesResponse result = resultData.data;

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

    /**
     * Lists the tags for a custom container image.
     * @param request ListContainerImageTagsRequest
     * @return Async Task will return ListContainerImageTagsResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ListContainerImageTagsAsync(final ListContainerImageTagsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListContainerImageTagsAsync(request);
            }
        });
    }

    /**
     * Lists the tags for a custom container image.
     * @param request ListContainerImageTagsRequest
     * @return ListContainerImageTagsResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ListContainerImageTags(final ListContainerImageTagsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListContainerImageTagsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Lists the tags for a custom container image. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateListContainerImageTagsAsync(final ListContainerImageTagsRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/ListContainerImageTags"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        ListContainerImageTagsResponse result = resultData.data;

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

    /**
     * Lists multiplayer server sessions for a build.
     * @param request ListMultiplayerServersRequest
     * @return Async Task will return ListMultiplayerServersResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ListMultiplayerServersAsync(final ListMultiplayerServersRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListMultiplayerServersAsync(request);
            }
        });
    }

    /**
     * Lists multiplayer server sessions for a build.
     * @param request ListMultiplayerServersRequest
     * @return ListMultiplayerServersResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ListMultiplayerServers(final ListMultiplayerServersRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListMultiplayerServersAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Lists multiplayer server sessions for a build. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateListMultiplayerServersAsync(final ListMultiplayerServersRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/ListMultiplayerServers"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        ListMultiplayerServersResponse result = resultData.data;

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

    /**
     * Lists quality of service servers.
     * @param request ListQosServersRequest
     * @return Async Task will return ListQosServersResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ListQosServersAsync(final ListQosServersRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListQosServersAsync(request);
            }
        });
    }

    /**
     * Lists quality of service servers.
     * @param request ListQosServersRequest
     * @return ListQosServersResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ListQosServers(final ListQosServersRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListQosServersAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Lists quality of service servers. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateListQosServersAsync(final ListQosServersRequest request) throws Exception {

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/ListQosServers"), 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());
        ListQosServersResponse result = resultData.data;

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

    /**
     * Lists virtual machines for a title.
     * @param request ListVirtualMachineSummariesRequest
     * @return Async Task will return ListVirtualMachineSummariesResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ListVirtualMachineSummariesAsync(final ListVirtualMachineSummariesRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListVirtualMachineSummariesAsync(request);
            }
        });
    }

    /**
     * Lists virtual machines for a title.
     * @param request ListVirtualMachineSummariesRequest
     * @return ListVirtualMachineSummariesResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ListVirtualMachineSummaries(final ListVirtualMachineSummariesRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateListVirtualMachineSummariesAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Lists virtual machines for a title. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateListVirtualMachineSummariesAsync(final ListVirtualMachineSummariesRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/ListVirtualMachineSummaries"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        ListVirtualMachineSummariesResponse result = resultData.data;

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

    /**
     * Request a multiplayer server session. Accepts tokens for title and if game client accesss is enabled, allows game client
     * to request a server with player entity token.
     * @param request RequestMultiplayerServerRequest
     * @return Async Task will return RequestMultiplayerServerResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RequestMultiplayerServerAsync(final RequestMultiplayerServerRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRequestMultiplayerServerAsync(request);
            }
        });
    }

    /**
     * Request a multiplayer server session. Accepts tokens for title and if game client accesss is enabled, allows game client
     * to request a server with player entity token.
     * @param request RequestMultiplayerServerRequest
     * @return RequestMultiplayerServerResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RequestMultiplayerServer(final RequestMultiplayerServerRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRequestMultiplayerServerAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /**
     * Request a multiplayer server session. Accepts tokens for title and if game client accesss is enabled, allows game client
     * to request a server with player entity token.
     */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRequestMultiplayerServerAsync(final RequestMultiplayerServerRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/RequestMultiplayerServer"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        RequestMultiplayerServerResponse result = resultData.data;

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

    /**
     * Rolls over the credentials to the container registry.
     * @param request RolloverContainerRegistryCredentialsRequest
     * @return Async Task will return RolloverContainerRegistryCredentialsResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> RolloverContainerRegistryCredentialsAsync(final RolloverContainerRegistryCredentialsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRolloverContainerRegistryCredentialsAsync(request);
            }
        });
    }

    /**
     * Rolls over the credentials to the container registry.
     * @param request RolloverContainerRegistryCredentialsRequest
     * @return RolloverContainerRegistryCredentialsResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult RolloverContainerRegistryCredentials(final RolloverContainerRegistryCredentialsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateRolloverContainerRegistryCredentialsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Rolls over the credentials to the container registry. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateRolloverContainerRegistryCredentialsAsync(final RolloverContainerRegistryCredentialsRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/RolloverContainerRegistryCredentials"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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());
        RolloverContainerRegistryCredentialsResponse result = resultData.data;

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

    /**
     * Shuts down a multiplayer server session.
     * @param request ShutdownMultiplayerServerRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> ShutdownMultiplayerServerAsync(final ShutdownMultiplayerServerRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateShutdownMultiplayerServerAsync(request);
            }
        });
    }

    /**
     * Shuts down a multiplayer server session.
     * @param request ShutdownMultiplayerServerRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult ShutdownMultiplayerServer(final ShutdownMultiplayerServerRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateShutdownMultiplayerServerAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Shuts down a multiplayer server session. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateShutdownMultiplayerServerAsync(final ShutdownMultiplayerServerRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/ShutdownMultiplayerServer"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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;
    }

    /**
     * Updates a multiplayer server build's regions.
     * @param request UpdateBuildRegionsRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UpdateBuildRegionsAsync(final UpdateBuildRegionsRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateBuildRegionsAsync(request);
            }
        });
    }

    /**
     * Updates a multiplayer server build's regions.
     * @param request UpdateBuildRegionsRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UpdateBuildRegions(final UpdateBuildRegionsRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUpdateBuildRegionsAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Updates a multiplayer server build's regions. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUpdateBuildRegionsAsync(final UpdateBuildRegionsRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/UpdateBuildRegions"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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;
    }

    /**
     * Uploads a multiplayer server game certificate.
     * @param request UploadCertificateRequest
     * @return Async Task will return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static FutureTask> UploadCertificateAsync(final UploadCertificateRequest request) {
        return new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUploadCertificateAsync(request);
            }
        });
    }

    /**
     * Uploads a multiplayer server game certificate.
     * @param request UploadCertificateRequest
     * @return EmptyResponse
     */
    @SuppressWarnings("unchecked")
    public static PlayFabResult UploadCertificate(final UploadCertificateRequest request) {
        FutureTask> task = new FutureTask(new Callable>() {
            public PlayFabResult call() throws Exception {
                return privateUploadCertificateAsync(request);
            }
        });
        try {
            task.run();
            return task.get();
        } catch(Exception e) {
            return null;
        }
    }

    /** Uploads a multiplayer server game certificate. */
    @SuppressWarnings("unchecked")
    private static PlayFabResult privateUploadCertificateAsync(final UploadCertificateRequest request) throws Exception {
        if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

        FutureTask task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/MultiplayerServer/UploadCertificate"), request, "X-EntityToken", PlayFabSettings.EntityToken);
        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;
    }
}