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. API methods for managing parties. */
public class PlayFabMultiplayerAPI {
private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();
/**
* Cancel all active tickets the player is a member of in a given queue.
* @param request CancelAllMatchmakingTicketsForPlayerRequest
* @return Async Task will return CancelAllMatchmakingTicketsForPlayerResult
*/
@SuppressWarnings("unchecked")
public static FutureTask> CancelAllMatchmakingTicketsForPlayerAsync(final CancelAllMatchmakingTicketsForPlayerRequest request) {
return new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateCancelAllMatchmakingTicketsForPlayerAsync(request);
}
});
}
/**
* Cancel all active tickets the player is a member of in a given queue.
* @param request CancelAllMatchmakingTicketsForPlayerRequest
* @return CancelAllMatchmakingTicketsForPlayerResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult CancelAllMatchmakingTicketsForPlayer(final CancelAllMatchmakingTicketsForPlayerRequest request) {
FutureTask> task = new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateCancelAllMatchmakingTicketsForPlayerAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}
/** Cancel all active tickets the player is a member of in a given queue. */
@SuppressWarnings("unchecked")
private static PlayFabResult privateCancelAllMatchmakingTicketsForPlayerAsync(final CancelAllMatchmakingTicketsForPlayerRequest 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("/Match/CancelAllMatchmakingTicketsForPlayer"), 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());
CancelAllMatchmakingTicketsForPlayerResult result = resultData.data;
PlayFabResult pfResult = new PlayFabResult();
pfResult.Result = result;
return pfResult;
}
/**
* Cancel a matchmaking ticket.
* @param request CancelMatchmakingTicketRequest
* @return Async Task will return CancelMatchmakingTicketResult
*/
@SuppressWarnings("unchecked")
public static FutureTask> CancelMatchmakingTicketAsync(final CancelMatchmakingTicketRequest request) {
return new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateCancelMatchmakingTicketAsync(request);
}
});
}
/**
* Cancel a matchmaking ticket.
* @param request CancelMatchmakingTicketRequest
* @return CancelMatchmakingTicketResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult CancelMatchmakingTicket(final CancelMatchmakingTicketRequest request) {
FutureTask> task = new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateCancelMatchmakingTicketAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}
/** Cancel a matchmaking ticket. */
@SuppressWarnings("unchecked")
private static PlayFabResult privateCancelMatchmakingTicketAsync(final CancelMatchmakingTicketRequest 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("/Match/CancelMatchmakingTicket"), 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());
CancelMatchmakingTicketResult result = resultData.data;
PlayFabResult pfResult = new PlayFabResult();
pfResult.Result = result;
return pfResult;
}
/**
* 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;
}
/**
* Create a matchmaking ticket as a client.
* @param request CreateMatchmakingTicketRequest
* @return Async Task will return CreateMatchmakingTicketResult
*/
@SuppressWarnings("unchecked")
public static FutureTask> CreateMatchmakingTicketAsync(final CreateMatchmakingTicketRequest request) {
return new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateCreateMatchmakingTicketAsync(request);
}
});
}
/**
* Create a matchmaking ticket as a client.
* @param request CreateMatchmakingTicketRequest
* @return CreateMatchmakingTicketResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult CreateMatchmakingTicket(final CreateMatchmakingTicketRequest request) {
FutureTask> task = new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateCreateMatchmakingTicketAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}
/** Create a matchmaking ticket as a client. */
@SuppressWarnings("unchecked")
private static PlayFabResult privateCreateMatchmakingTicketAsync(final CreateMatchmakingTicketRequest 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("/Match/CreateMatchmakingTicket"), 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());
CreateMatchmakingTicketResult 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;
}
/**
* Create a matchmaking ticket as a server. The matchmaking service automatically starts matching the ticket against other
* matchmaking tickets.
* @param request CreateServerMatchmakingTicketRequest
* @return Async Task will return CreateMatchmakingTicketResult
*/
@SuppressWarnings("unchecked")
public static FutureTask> CreateServerMatchmakingTicketAsync(final CreateServerMatchmakingTicketRequest request) {
return new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateCreateServerMatchmakingTicketAsync(request);
}
});
}
/**
* Create a matchmaking ticket as a server. The matchmaking service automatically starts matching the ticket against other
* matchmaking tickets.
* @param request CreateServerMatchmakingTicketRequest
* @return CreateMatchmakingTicketResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult CreateServerMatchmakingTicket(final CreateServerMatchmakingTicketRequest request) {
FutureTask> task = new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateCreateServerMatchmakingTicketAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}
/**
* Create a matchmaking ticket as a server. The matchmaking service automatically starts matching the ticket against other
* matchmaking tickets.
*/
@SuppressWarnings("unchecked")
private static PlayFabResult privateCreateServerMatchmakingTicketAsync(final CreateServerMatchmakingTicketRequest 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("/Match/CreateServerMatchmakingTicket"), 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());
CreateMatchmakingTicketResult 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;
}
/**
* Get a match.
* @param request GetMatchRequest
* @return Async Task will return GetMatchResult
*/
@SuppressWarnings("unchecked")
public static FutureTask> GetMatchAsync(final GetMatchRequest request) {
return new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateGetMatchAsync(request);
}
});
}
/**
* Get a match.
* @param request GetMatchRequest
* @return GetMatchResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult GetMatch(final GetMatchRequest request) {
FutureTask> task = new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateGetMatchAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}
/** Get a match. */
@SuppressWarnings("unchecked")
private static PlayFabResult privateGetMatchAsync(final GetMatchRequest 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("/Match/GetMatch"), 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());
GetMatchResult result = resultData.data;
PlayFabResult pfResult = new PlayFabResult();
pfResult.Result = result;
return pfResult;
}
/**
* Get a matchmaking queue configuration.
* @param request GetMatchmakingQueueRequest
* @return Async Task will return GetMatchmakingQueueResult
*/
@SuppressWarnings("unchecked")
public static FutureTask> GetMatchmakingQueueAsync(final GetMatchmakingQueueRequest request) {
return new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateGetMatchmakingQueueAsync(request);
}
});
}
/**
* Get a matchmaking queue configuration.
* @param request GetMatchmakingQueueRequest
* @return GetMatchmakingQueueResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult GetMatchmakingQueue(final GetMatchmakingQueueRequest request) {
FutureTask> task = new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateGetMatchmakingQueueAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}
/** Get a matchmaking queue configuration. */
@SuppressWarnings("unchecked")
private static PlayFabResult privateGetMatchmakingQueueAsync(final GetMatchmakingQueueRequest 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("/Match/GetMatchmakingQueue"), 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());
GetMatchmakingQueueResult result = resultData.data;
PlayFabResult pfResult = new PlayFabResult();
pfResult.Result = result;
return pfResult;
}
/**
* Get a matchmaking ticket by ticket Id.
* @param request GetMatchmakingTicketRequest
* @return Async Task will return GetMatchmakingTicketResult
*/
@SuppressWarnings("unchecked")
public static FutureTask> GetMatchmakingTicketAsync(final GetMatchmakingTicketRequest request) {
return new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateGetMatchmakingTicketAsync(request);
}
});
}
/**
* Get a matchmaking ticket by ticket Id.
* @param request GetMatchmakingTicketRequest
* @return GetMatchmakingTicketResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult GetMatchmakingTicket(final GetMatchmakingTicketRequest request) {
FutureTask> task = new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateGetMatchmakingTicketAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}
/** Get a matchmaking ticket by ticket Id. */
@SuppressWarnings("unchecked")
private static PlayFabResult privateGetMatchmakingTicketAsync(final GetMatchmakingTicketRequest 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("/Match/GetMatchmakingTicket"), 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());
GetMatchmakingTicketResult result = resultData.data;
PlayFabResult pfResult = new PlayFabResult