Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.playfab.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.
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